From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
Rohan McLure <rmclure@linux.ibm.com>,
Nicholas Piggin <npiggin@gmail.com>,
maqianga@uniontech.com, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH AUTOSEL 6.0 07/11] powerpc: Remove direct call to personality syscall handler
Date: Fri, 14 Oct 2022 09:51:33 -0400 [thread overview]
Message-ID: <20221014135139.2109024-7-sashal@kernel.org> (raw)
In-Reply-To: <20221014135139.2109024-1-sashal@kernel.org>
From: Rohan McLure <rmclure@linux.ibm.com>
[ Upstream commit 4df0221f9ded8c39aecfb1a80cef346026671cb7 ]
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: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220921065605.1051927-13-rmclure@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 fc999140bc27..690afd77e7fe 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -88,7 +88,7 @@ long 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.35.1
next prev parent reply other threads:[~2022-10-14 13:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20221014135139.2109024-1-sashal@kernel.org>
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 02/11] powerpc/selftests: Use timersub() for gettimeofday() Sasha Levin
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 04/11] powerpc/math-emu: Remove -w build flag and fix warnings Sasha Levin
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 05/11] powerpc/85xx: Fix fall-through warning for Clang Sasha Levin
2022-10-14 13:51 ` Sasha Levin [this message]
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 08/11] powerpc/perf: Fix branch_filter support for multiple filters Sasha Levin
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 09/11] powerpc/rtas: block error injection when locked down Sasha Levin
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 10/11] powerpc/mm: Fix UBSAN warning reported on hugetlb Sasha Levin
2022-10-14 13:51 ` [PATCH AUTOSEL 6.0 11/11] powerpc/64: Fix msr_check_and_set/clear MSR[EE] race Sasha Levin
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=20221014135139.2109024-7-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maqianga@uniontech.com \
--cc=npiggin@gmail.com \
--cc=rmclure@linux.ibm.com \
--cc=stable@vger.kernel.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).