Ejemplo n.º 1
0
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
	if (force_o_largefile())
		flags |= O_LARGEFILE;

	return do_sys_open(AT_FDCWD, filename, flags, mode);
}
Ejemplo n.º 2
0
//Alternatives...
int __mod_open_fd(const char* filename, int flags, int mode)
{
	int fd;
	mm_segment_t old_fs = get_fs();
	set_fs(KERNEL_DS);
	//
	fd = do_sys_open(AT_FDCWD, filename, flags, mode);
	//
	set_fs(old_fs);
	return fd;
}
Ejemplo n.º 3
0
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
	long ret;

	if (force_o_largefile())
		flags |= O_LARGEFILE;

	ret = do_sys_open(AT_FDCWD, filename, flags, mode);
	/* avoid REGPARM breakage on x86: */
	asmlinkage_protect(3, ret, filename, flags, mode);
	return ret;
}
Ejemplo n.º 4
0
asmlinkage long sys_open(const char __user *filename, int flags, int mode)
{
	long ret;

	if (force_o_largefile())
		flags |= O_LARGEFILE;

	ret = do_sys_open(AT_FDCWD, filename, flags, mode);
	/* avoid REGPARM breakage on x86: */
	prevent_tail_call(ret);
	return ret;
}
Ejemplo n.º 5
0
asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
			   int mode)
{
	long ret;

	if (force_o_largefile())
		flags |= O_LARGEFILE;

	ret = do_sys_open(dfd, filename, flags, mode);
	/* avoid REGPARM breakage on x86: */
	asmlinkage_protect(4, ret, dfd, filename, flags, mode);
	return ret;
}
Ejemplo n.º 6
0
SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,
		umode_t, mode)
{
	long ret;

	if (force_o_largefile())
		flags |= O_LARGEFILE;

	ret = do_sys_open(dfd, filename, flags, mode);
	
	asmlinkage_protect(4, ret, dfd, filename, flags, mode);
	return ret;
}
Ejemplo n.º 7
0
asmlinkage long sparc32_open(const char __user *filename,
			     int flags, int mode)
{
	return do_sys_open(AT_FDCWD, filename, flags, mode);
}
Ejemplo n.º 8
0
Archivo: open.c Proyecto: krzk/linux
/*
 * Exactly like sys_openat(), except that it doesn't set the
 * O_LARGEFILE flag.
 */
COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode)
{
	return do_sys_open(dfd, filename, flags, mode);
}
Ejemplo n.º 9
0
Archivo: open.c Proyecto: krzk/linux
/*
 * Exactly like sys_open(), except that it doesn't set the
 * O_LARGEFILE flag.
 */
COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
	return do_sys_open(AT_FDCWD, filename, flags, mode);
}