From: Julian Orth <ju.orth@gmail.com>
To: Paul Moore <paul@paul-moore.com>, Eric Paris <eparis@redhat.com>
Cc: ju.orth@gmail.com, linux-audit@redhat.com,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 0/1] audit,io_uring,io-wq: call __audit_uring_exit for dummy contexts
Date: Tue, 17 May 2022 12:32:52 +0200 [thread overview]
Message-ID: <20220517103253.22601-1-ju.orth@gmail.com> (raw)
After porting my wayland compositor to io_uring, I noticed that my logs
were getting spammed with the following messages (tested with 5.17.7 and
5.18.0-rc7):
WARNING: CPU: 10 PID: 983 at kernel/auditsc.c:2041 __audit_syscall_entry+0x1>
Modules linked in: vrf wireguard curve25519_x86_64 libchacha20poly1305 chach>
ipmi_msghandler crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mb>
CPU: 10 PID: 983 Comm: jay Tainted: G W 5.18.0-rc7-dirty #5 1>
Hardware name: Gigabyte Technology Co., Ltd. B450M DS3H/B450M DS3H-CF, BIOS >
RIP: 0010:__audit_syscall_entry+0x111/0x140
Code: e8 24 69 ff ff 48 8b 34 24 48 8b 54 24 08 85 c0 48 8b 4c 24 10 4c 8b 4>
RSP: 0018:ffffa6e480887de8 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff969c92f22400 RCX: 0000000000000001
RDX: 0000000000000001 RSI: 0000000000000007 RDI: ffff969c8fa4c080
RBP: 00000000000001aa R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000001 R12: 00000000000001aa
R13: ffffa6e480887f58 R14: 00000000000001aa R15: 0000000000000000
FS: 00007fefe020f040(0000) GS:ffff96a39ea80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fefac429000 CR3: 0000000103674000 CR4: 00000000003506e0
Call Trace:
<TASK>
? get_signal+0x8d/0x990
syscall_trace_enter.constprop.0+0x121/0x1a0
do_syscall_64+0x36/0x80
? arch_do_signal_or_restart+0x44/0x750
? syscall_exit_to_user_mode+0x22/0x40
? exit_to_user_mode_prepare+0xd3/0x140
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fefe0d0b67d
Code: 5d c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 4>
RSP: 002b:00007fff383a6c58 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
RAX: ffffffffffffffda RBX: 00005595f1c25e00 RCX: 00007fefe0d0b67d
RDX: 0000000000000001 RSI: 0000000000000001 RDI: 0000000000000007
RBP: 00005595f1c1b700 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000005 R14: 00005595f1c21f60 R15: 0000000000000001
</TASK>
---[ end trace 0000000000000000 ]---
audit: unrecoverable error in audit_syscall_entry()
I traced this to the context not being reset after audit_uring_entry if
the created context was a dummy context. I am surprised that I would be
the first one to find this problem but maybe io_uring is rarely used on
systems where auditing is enabled or a recent kernel change elsewhere
caused this problem to surface.
Julian Orth (1):
audit,io_uring,io-wq: call __audit_uring_exit for dummy contexts
include/linux/audit.h | 2 +-
kernel/auditsc.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
--
2.36.1
next reply other threads:[~2022-05-17 10:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 10:32 Julian Orth [this message]
2022-05-17 10:32 ` [PATCH 1/1] audit,io_uring,io-wq: call __audit_uring_exit for dummy contexts Julian Orth
2022-05-17 13:12 ` Paul Moore
2022-05-17 21:34 ` Paul Moore
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=20220517103253.22601-1-ju.orth@gmail.com \
--to=ju.orth@gmail.com \
--cc=axboe@kernel.dk \
--cc=eparis@redhat.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
/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