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 5.10 4/7] powerpc: Remove direct call to personality syscall handler
Date: Fri, 14 Oct 2022 09:53:30 -0400 [thread overview]
Message-ID: <20221014135334.2109814-4-sashal@kernel.org> (raw)
In-Reply-To: <20221014135334.2109814-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 078608ec2e92..ce1553469b51 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -104,7 +104,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 14:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 13:53 [PATCH AUTOSEL 5.10 1/7] powerpc/selftests: Use timersub() for gettimeofday() Sasha Levin
2022-10-14 13:53 ` [PATCH AUTOSEL 5.10 2/7] powerpc/math-emu: Remove -w build flag and fix warnings Sasha Levin
2022-10-14 13:53 ` [PATCH AUTOSEL 5.10 3/7] powerpc/85xx: Fix fall-through warning for Clang Sasha Levin
2022-10-14 13:53 ` Sasha Levin [this message]
2022-10-14 13:53 ` [PATCH AUTOSEL 5.10 5/7] powerpc/perf: Fix branch_filter support for multiple filters Sasha Levin
2022-10-14 13:53 ` [PATCH AUTOSEL 5.10 6/7] powerpc/mm: Fix UBSAN warning reported on hugetlb Sasha Levin
2022-10-14 13:53 ` [PATCH AUTOSEL 5.10 7/7] 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=20221014135334.2109814-4-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).