* [PATCH 00/13] Make user_regset_copyin_ignore() *void*
@ 2022-10-14 21:22 Sergey Shtylyov
2022-10-14 21:22 ` [PATCH 10/13] powerpc: ptrace: user_regset_copyin_ignore() always returns 0 Sergey Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Sergey Shtylyov @ 2022-10-14 21:22 UTC (permalink / raw)
To: Oleg Nesterov, Russell King, Catalin Marinas, Will Deacon,
Brian Cain, Thomas Bogendoerfer, Dinh Nguyen, Jonas Bonn,
Stefan Kristiansson, Stafford Horne, James E.J. Bottomley,
Helge Deller, Michael Ellerman, Nicholas Piggin, Christophe Leroy,
Yoshinori Sato, Rich Felker, David S. Miller, linux-arm-kernel,
linux-hexagon, linux-ia64, linux-kernel, linux-mips, linux-parisc,
linux-sh, linuxppc-dev, openrisc, sparclinux
Cc: Andrew Morton, lvc-patches, lvc-project
Here are 13 patches against the 'next-20221014' tag of the 'linux-next.git'
repo. I'm not sure how this cross-arch series should be merged -- perhaps
thru Andrew Morton's tree?
user_regset_copyin_ignore() apparently cannot fail and so always returns 0.
Let's first remove the result checks in several architectures that call this
function and then make user_regset_copyin_ignore() return *void* instead of
*int*...
Sergey Shtylyov (13):
arc: ptrace: user_regset_copyin_ignore() always returns 0
arm: ptrace: user_regset_copyin_ignore() always returns 0
arm64: ptrace: user_regset_copyin_ignore() always returns 0
hexagon: ptrace: user_regset_copyin_ignore() always returns 0
ia64: ptrace: user_regset_copyin_ignore() always returns 0
mips: ptrace: user_regset_copyin_ignore() always returns 0
nios2: ptrace: user_regset_copyin_ignore() always returns 0
openrisc: ptrace: user_regset_copyin_ignore() always returns 0
parisc: ptrace: user_regset_copyin_ignore() always returns 0
powerpc: ptrace: user_regset_copyin_ignore() always returns 0
sh: ptrace: user_regset_copyin_ignore() always returns 0
sparc: ptrace: user_regset_copyin_ignore() always returns 0
regset: make user_regset_copyin_ignore() *void*
arch/arc/kernel/ptrace.c | 2 +-
arch/arm/kernel/ptrace.c | 8 +++-----
arch/arm64/kernel/ptrace.c | 16 ++++------------
arch/hexagon/kernel/ptrace.c | 7 +++----
arch/ia64/kernel/ptrace.c | 20 +++++++++-----------
arch/mips/kernel/ptrace.c | 9 +++++----
arch/nios2/kernel/ptrace.c | 6 +++---
arch/openrisc/kernel/ptrace.c | 8 +++-----
arch/parisc/kernel/ptrace.c | 15 +++++++++------
arch/powerpc/kernel/ptrace/ptrace-tm.c | 10 +++++-----
arch/powerpc/kernel/ptrace/ptrace-view.c | 10 +++++-----
arch/sh/kernel/ptrace_32.c | 8 ++++----
arch/sparc/kernel/ptrace_32.c | 9 +++++----
arch/sparc/kernel/ptrace_64.c | 23 +++++++++++------------
include/linux/regset.h | 15 +++++++--------
15 files changed, 77 insertions(+), 89 deletions(-)
--
2.26.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 10/13] powerpc: ptrace: user_regset_copyin_ignore() always returns 0
2022-10-14 21:22 [PATCH 00/13] Make user_regset_copyin_ignore() *void* Sergey Shtylyov
@ 2022-10-14 21:22 ` Sergey Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergey Shtylyov @ 2022-10-14 21:22 UTC (permalink / raw)
To: Oleg Nesterov, Michael Ellerman, Nicholas Piggin,
Christophe Leroy, linuxppc-dev, linux-kernel
Cc: Andrew Morton
user_regset_copyin_ignore() always returns 0, so checking its result seems
pointless -- don't do this anymore...
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
arch/powerpc/kernel/ptrace/ptrace-tm.c | 10 +++++-----
arch/powerpc/kernel/ptrace/ptrace-view.c | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace/ptrace-tm.c b/arch/powerpc/kernel/ptrace/ptrace-tm.c
index 44045363a903..210ea834e603 100644
--- a/arch/powerpc/kernel/ptrace/ptrace-tm.c
+++ b/arch/powerpc/kernel/ptrace/ptrace-tm.c
@@ -170,9 +170,9 @@ int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset,
(PT_MAX_PUT_REG + 1) * sizeof(reg));
if (PT_MAX_PUT_REG + 1 < PT_TRAP && !ret)
- ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
- (PT_MAX_PUT_REG + 1) * sizeof(reg),
- PT_TRAP * sizeof(reg));
+ user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+ (PT_MAX_PUT_REG + 1) * sizeof(reg),
+ PT_TRAP * sizeof(reg));
if (!ret && count > 0) {
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®,
@@ -183,8 +183,8 @@ int tm_cgpr_set(struct task_struct *target, const struct user_regset *regset,
}
if (!ret)
- ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
- (PT_TRAP + 1) * sizeof(reg), -1);
+ user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+ (PT_TRAP + 1) * sizeof(reg), -1);
return ret;
}
diff --git a/arch/powerpc/kernel/ptrace/ptrace-view.c b/arch/powerpc/kernel/ptrace/ptrace-view.c
index 076d867412c7..ca0bf8da48fd 100644
--- a/arch/powerpc/kernel/ptrace/ptrace-view.c
+++ b/arch/powerpc/kernel/ptrace/ptrace-view.c
@@ -267,9 +267,9 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset,
(PT_MAX_PUT_REG + 1) * sizeof(reg));
if (PT_MAX_PUT_REG + 1 < PT_TRAP && !ret)
- ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
- (PT_MAX_PUT_REG + 1) * sizeof(reg),
- PT_TRAP * sizeof(reg));
+ user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+ (PT_MAX_PUT_REG + 1) * sizeof(reg),
+ PT_TRAP * sizeof(reg));
if (!ret && count > 0) {
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, ®,
@@ -280,8 +280,8 @@ static int gpr_set(struct task_struct *target, const struct user_regset *regset,
}
if (!ret)
- ret = user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
- (PT_TRAP + 1) * sizeof(reg), -1);
+ user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf,
+ (PT_TRAP + 1) * sizeof(reg), -1);
return ret;
}
--
2.26.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-14 21:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-14 21:22 [PATCH 00/13] Make user_regset_copyin_ignore() *void* Sergey Shtylyov
2022-10-14 21:22 ` [PATCH 10/13] powerpc: ptrace: user_regset_copyin_ignore() always returns 0 Sergey Shtylyov
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).