* [PATCH] io_uring/register: fix comment about task_no_new_privs
@ 2026-03-09 14:34 Jann Horn
2026-03-09 14:40 ` Jens Axboe
2026-03-09 14:52 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Jann Horn @ 2026-03-09 14:34 UTC (permalink / raw)
To: Jens Axboe; +Cc: io-uring, linux-kernel, Jann Horn
The actual code is right, but the comment is the wrong way around.
Fixes: ed82f35b926b ("io_uring: allow registration of per-task restrictions")
Signed-off-by: Jann Horn <jannh@google.com>
---
| 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--git a/io_uring/register.c b/io_uring/register.c
index 6015a3e9ce69..3378014e51fb 100644
--- a/io_uring/register.c
+++ b/io_uring/register.c
@@ -202,7 +202,7 @@ static int io_register_restrictions_task(void __user *arg, unsigned int nr_args)
return -EPERM;
/*
* Similar to seccomp, disallow setting a filter if task_no_new_privs
- * is true and we're not CAP_SYS_ADMIN.
+ * is false and we're not CAP_SYS_ADMIN.
*/
if (!task_no_new_privs(current) &&
!ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))
@@ -238,7 +238,7 @@ static int io_register_bpf_filter_task(void __user *arg, unsigned int nr_args)
/*
* Similar to seccomp, disallow setting a filter if task_no_new_privs
- * is true and we're not CAP_SYS_ADMIN.
+ * is false and we're not CAP_SYS_ADMIN.
*/
if (!task_no_new_privs(current) &&
!ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))
---
base-commit: 55a6202e7bbea301c06ad1bb0e18f7799cac383e
change-id: 20260309-uring-nnp-comment-fix-2d33b61cee0a
--
Jann Horn <jannh@google.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring/register: fix comment about task_no_new_privs
2026-03-09 14:34 [PATCH] io_uring/register: fix comment about task_no_new_privs Jann Horn
@ 2026-03-09 14:40 ` Jens Axboe
2026-03-09 14:52 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2026-03-09 14:40 UTC (permalink / raw)
To: Jann Horn; +Cc: io-uring, linux-kernel
On 3/9/26 8:34 AM, Jann Horn wrote:
> The actual code is right, but the comment is the wrong way around.
Huh indeed, wonder how that happened. Thanks for spotting that, will get
it added.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] io_uring/register: fix comment about task_no_new_privs
2026-03-09 14:34 [PATCH] io_uring/register: fix comment about task_no_new_privs Jann Horn
2026-03-09 14:40 ` Jens Axboe
@ 2026-03-09 14:52 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2026-03-09 14:52 UTC (permalink / raw)
To: Jann Horn; +Cc: io-uring, linux-kernel
On Mon, 09 Mar 2026 15:34:41 +0100, Jann Horn wrote:
> The actual code is right, but the comment is the wrong way around.
>
>
Applied, thanks!
[1/1] io_uring/register: fix comment about task_no_new_privs
commit: 3306a589e598b50a5bbdfe837371670b507043c0
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-09 14:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 14:34 [PATCH] io_uring/register: fix comment about task_no_new_privs Jann Horn
2026-03-09 14:40 ` Jens Axboe
2026-03-09 14:52 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox