From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Cédric Le Goater" <clg@kaod.org>, linuxppc-dev@lists.ozlabs.org
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Subject: Re: [PATCH 6/6] powerpc/compat_sys: Declare syscalls
Date: Tue, 15 Mar 2022 12:45:22 +0100 [thread overview]
Message-ID: <4cfd1a57-f3c1-86ff-3acc-61b1cc8a3602@csgroup.eu> (raw)
In-Reply-To: <20210819125656.14498-7-clg@kaod.org>
Le 19/08/2021 à 14:56, Cédric Le Goater a écrit :
> This fixes a compile error with W=1.
>
> Cc: Christophe Leroy <christophe.leroy@c-s.fr>
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Instead of doing that, we should use COMPAT_SYSCALL_DEFINEx macros in
the function definitions.
Thanks
Christophe
> ---
> arch/powerpc/include/asm/syscalls.h | 31 +++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/syscalls.h b/arch/powerpc/include/asm/syscalls.h
> index 398171fdcd9f..1d5f2abaa38a 100644
> --- a/arch/powerpc/include/asm/syscalls.h
> +++ b/arch/powerpc/include/asm/syscalls.h
> @@ -6,6 +6,7 @@
> #include <linux/compiler.h>
> #include <linux/linkage.h>
> #include <linux/types.h>
> +#include <linux/compat.h>
>
> struct rtas_args;
>
> @@ -18,5 +19,35 @@ asmlinkage long sys_mmap2(unsigned long addr, size_t len,
> asmlinkage long ppc64_personality(unsigned long personality);
> asmlinkage long sys_rtas(struct rtas_args __user *uargs);
>
> +#ifdef CONFIG_COMPAT
> +unsigned long compat_sys_mmap2(unsigned long addr, size_t len,
> + unsigned long prot, unsigned long flags,
> + unsigned long fd, unsigned long pgoff);
> +
> +compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count,
> + u32 reg6, u32 pos1, u32 pos2);
> +
> +compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count,
> + u32 reg6, u32 pos1, u32 pos2);
> +
> +compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offset1, u32 offset2, u32 count);
> +
> +asmlinkage int compat_sys_truncate64(const char __user *path, u32 reg4,
> + unsigned long len1, unsigned long len2);
> +
> +asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offset1, u32 offset2,
> + u32 len1, u32 len2);
> +
> +asmlinkage int compat_sys_ftruncate64(unsigned int fd, u32 reg4, unsigned long len1,
> + unsigned long len2);
> +
> +long ppc32_fadvise64(int fd, u32 unused, u32 offset1, u32 offset2,
> + size_t len, int advice);
> +
> +asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags,
> + unsigned int offset1, unsigned int offset2,
> + unsigned int nbytes1, unsigned int nbytes2);
> +#endif
> +
> #endif /* __KERNEL__ */
> #endif /* __ASM_POWERPC_SYSCALLS_H */
next prev parent reply other threads:[~2022-03-15 11:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 12:56 [PATCH 0/6] W=1 fixes Cédric Le Goater
2021-08-19 12:56 ` [PATCH 1/6] powerpc/prom: Introduce early_reserve_mem_old() Cédric Le Goater
2021-08-19 14:42 ` Christophe Leroy
2021-08-20 12:22 ` Michael Ellerman
2021-08-23 8:20 ` Cédric Le Goater
2021-08-19 12:56 ` [PATCH 2/6] powerpc/pseries/vas: Declare pseries_vas_fault_thread_fn() as static Cédric Le Goater
2021-08-19 12:56 ` [PATCH 3/6] KVM: PPC: Book3S PR: Declare kvmppc_handle_exit_pr() Cédric Le Goater
2021-08-19 14:44 ` Christophe Leroy
2021-08-20 12:22 ` Michael Ellerman
2021-08-19 12:56 ` [PATCH 4/6] KVM: PPC: Book3S PR: Remove unused variable Cédric Le Goater
2021-08-19 12:56 ` [PATCH 5/6] audit: Declare ppc32_classify_syscall() Cédric Le Goater
2021-08-19 14:56 ` Christophe Leroy
2021-08-19 18:36 ` Christophe Leroy
2021-08-23 8:28 ` Christophe Leroy
2021-08-23 8:35 ` Cédric Le Goater
2021-08-19 12:56 ` [PATCH 6/6] powerpc/compat_sys: Declare syscalls Cédric Le Goater
2021-08-20 12:25 ` Michael Ellerman
2022-03-15 11:45 ` Christophe Leroy [this message]
2021-08-27 13:15 ` [PATCH 0/6] W=1 fixes Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4cfd1a57-f3c1-86ff-3acc-61b1cc8a3602@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=christophe.leroy@c-s.fr \
--cc=clg@kaod.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).