* [PATCH] select: Fix unbalanced user_access_end()
@ 2025-01-13 8:37 Christophe Leroy
2025-01-13 14:39 ` Christian Brauner
2025-01-13 19:47 ` Al Viro
0 siblings, 2 replies; 3+ messages in thread
From: Christophe Leroy @ 2025-01-13 8:37 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara
Cc: Christophe Leroy, linux-kernel, linuxppc-dev, linux-fsdevel
While working on implementing user access validation on powerpc
I got the following warnings on a pmac32_defconfig build:
CC fs/select.o
fs/select.o: warning: objtool: sys_pselect6+0x1bc: redundant UACCESS disable
fs/select.o: warning: objtool: sys_pselect6_time32+0x1bc: redundant UACCESS disable
On powerpc/32s, user_read_access_begin/end() are no-ops, but the
failure path has a user_access_end() instead of user_read_access_end()
which means an access end without any prior access begin.
Replace that user_access_end() by user_read_access_end().
Fixes: 7e71609f64ec ("pselect6() and friends: take handling the combined 6th/7th args into helper")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
fs/select.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/select.c b/fs/select.c
index e223d1fe9d55..7da531b1cf6b 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -786,7 +786,7 @@ static inline int get_sigset_argpack(struct sigset_argpack *to,
}
return 0;
Efault:
- user_access_end();
+ user_read_access_end();
return -EFAULT;
}
@@ -1355,7 +1355,7 @@ static inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
}
return 0;
Efault:
- user_access_end();
+ user_read_access_end();
return -EFAULT;
}
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] select: Fix unbalanced user_access_end()
2025-01-13 8:37 [PATCH] select: Fix unbalanced user_access_end() Christophe Leroy
@ 2025-01-13 14:39 ` Christian Brauner
2025-01-13 19:47 ` Al Viro
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-01-13 14:39 UTC (permalink / raw)
To: Christophe Leroy
Cc: Christian Brauner, linux-kernel, linuxppc-dev, linux-fsdevel,
Alexander Viro, Jan Kara
On Mon, 13 Jan 2025 09:37:24 +0100, Christophe Leroy wrote:
> While working on implementing user access validation on powerpc
> I got the following warnings on a pmac32_defconfig build:
>
> CC fs/select.o
> fs/select.o: warning: objtool: sys_pselect6+0x1bc: redundant UACCESS disable
> fs/select.o: warning: objtool: sys_pselect6_time32+0x1bc: redundant UACCESS disable
>
> [...]
Applied to the vfs-6.14.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.14.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.14.misc
[1/1] select: Fix unbalanced user_access_end()
https://git.kernel.org/vfs/vfs/c/83e724bcabc5
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] select: Fix unbalanced user_access_end()
2025-01-13 8:37 [PATCH] select: Fix unbalanced user_access_end() Christophe Leroy
2025-01-13 14:39 ` Christian Brauner
@ 2025-01-13 19:47 ` Al Viro
1 sibling, 0 replies; 3+ messages in thread
From: Al Viro @ 2025-01-13 19:47 UTC (permalink / raw)
To: Christophe Leroy
Cc: Christian Brauner, Jan Kara, linux-kernel, linuxppc-dev,
linux-fsdevel
On Mon, Jan 13, 2025 at 09:37:24AM +0100, Christophe Leroy wrote:
> While working on implementing user access validation on powerpc
> I got the following warnings on a pmac32_defconfig build:
>
> CC fs/select.o
> fs/select.o: warning: objtool: sys_pselect6+0x1bc: redundant UACCESS disable
> fs/select.o: warning: objtool: sys_pselect6_time32+0x1bc: redundant UACCESS disable
>
> On powerpc/32s, user_read_access_begin/end() are no-ops, but the
> failure path has a user_access_end() instead of user_read_access_end()
> which means an access end without any prior access begin.
>
> Replace that user_access_end() by user_read_access_end().
ACK.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-13 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 8:37 [PATCH] select: Fix unbalanced user_access_end() Christophe Leroy
2025-01-13 14:39 ` Christian Brauner
2025-01-13 19:47 ` Al Viro
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).