* [PATCH v2 02/14] powerpc: Remove direct call to personality syscall handler
@ 2022-07-25 6:25 Rohan McLure
2022-08-01 10:00 ` Andrew Donnellan
0 siblings, 1 reply; 2+ messages in thread
From: Rohan McLure @ 2022-07-25 6:25 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Rohan McLure, npiggin
Syscall handlers should not be invoked internally by their symbol names,
as these symbols defined by the architecture-defined SYSCALL_DEFINE
macro. Fortunately, in the case of ppc64_personality, its call to
sys_personality can be replaced with an invocation to the
equivalent ksys_personality inline helper in <linux/syscalls.h>.
Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
---
V1 -> V2: Use inline helper to deduplicate bodies in compat/regular
implementations.
---
arch/powerpc/kernel/syscalls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index ca20083dd0ae..22755502afc0 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -89,7 +89,7 @@ static inline long do_ppc64_personality(unsigned long personality)
if (personality(current->personality) == PER_LINUX32
&& personality(personality) == PER_LINUX)
personality = (personality & ~PER_MASK) | PER_LINUX32;
- ret = sys_personality(personality);
+ ret = ksys_personality(personality);
if (personality(ret) == PER_LINUX32)
ret = (ret & ~PER_MASK) | PER_LINUX;
return ret;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 02/14] powerpc: Remove direct call to personality syscall handler
2022-07-25 6:25 [PATCH v2 02/14] powerpc: Remove direct call to personality syscall handler Rohan McLure
@ 2022-08-01 10:00 ` Andrew Donnellan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Donnellan @ 2022-08-01 10:00 UTC (permalink / raw)
To: Rohan McLure, linuxppc-dev; +Cc: npiggin
On Mon, 2022-07-25 at 16:25 +1000, Rohan McLure wrote:
> Syscall handlers should not be invoked internally by their symbol
> names,
> as these symbols defined by the architecture-defined SYSCALL_DEFINE
> macro. Fortunately, in the case of ppc64_personality, its call to
> sys_personality can be replaced with an invocation to the
> equivalent ksys_personality inline helper in <linux/syscalls.h>.
>
> Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
> ---
> V1 -> V2: Use inline helper to deduplicate bodies in compat/regular
> implementations.
> ---
> arch/powerpc/kernel/syscalls.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/syscalls.c
> b/arch/powerpc/kernel/syscalls.c
> index ca20083dd0ae..22755502afc0 100644
> --- a/arch/powerpc/kernel/syscalls.c
> +++ b/arch/powerpc/kernel/syscalls.c
> @@ -89,7 +89,7 @@ static inline long do_ppc64_personality(unsigned
> long personality)
> if (personality(current->personality) == PER_LINUX32
> && personality(personality) == PER_LINUX)
> personality = (personality & ~PER_MASK) |
> PER_LINUX32;
> - ret = sys_personality(personality);
> + ret = ksys_personality(personality);
> if (personality(ret) == PER_LINUX32)
> ret = (ret & ~PER_MASK) | PER_LINUX;
> return ret;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-08-01 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-25 6:25 [PATCH v2 02/14] powerpc: Remove direct call to personality syscall handler Rohan McLure
2022-08-01 10:00 ` Andrew Donnellan
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).