Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rv32:syscall: fix fallocate|fadvise64_64|ftruncate64|pread64|pwrite64 #5

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ COMPAT_SYSCALL_DEFINE2(ftruncate, unsigned int, fd, compat_ulong_t, length)

/* LFS versions of truncate are only needed on 32 bit machines */
#if BITS_PER_LONG == 32
#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE3(truncate64, const char __user *, path, compat_arg_u64_dual(length))
{
return do_sys_truncate(path, compat_arg_u64_glue(length));
Expand Down Expand Up @@ -362,7 +362,7 @@ int ksys_fallocate(int fd, int mode, loff_t offset, loff_t len)
return error;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE6(fallocate, int, fd, int, mode,
compat_arg_u64_dual(offset),
compat_arg_u64_dual(len))
Expand Down
4 changes: 2 additions & 2 deletions fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ ssize_t ksys_pread64(unsigned int fd, char __user *buf, size_t count,
return ret;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE5(pread64, unsigned int, fd, char __user *, buf,
size_t, count, compat_arg_u64_dual(pos))
{
Expand Down Expand Up @@ -711,7 +711,7 @@ ssize_t ksys_pwrite64(unsigned int fd, const char __user *buf,
return ret;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)
SYSCALL_DEFINE5(pwrite64, unsigned int, fd, const char __user *, buf,
size_t, count, compat_arg_u64_dual(pos))
{
Expand Down
2 changes: 1 addition & 1 deletion mm/fadvise.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int ksys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice)
return ret;
}

#ifdef CONFIG_ARCH_HAS_64ILP32_KERNEL
#if defined(CONFIG_ARCH_HAS_64ILP32_KERNEL) || defined(CONFIG_ARCH_RV32I)

SYSCALL_DEFINE6(fadvise64_64, int, fd, compat_arg_u64_dual(offset),
compat_arg_u64_dual(len), int, advice)
Expand Down
Loading