From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
To: Paul Moore <paul@paul-moore.com>
Cc: Rinat Gadelshin <rgadelsh@gmail.com>,
linux-audit@redhat.com, audit@vger.kernel.org
Subject: Re: Can AUDIT_LIST_RULES causes kthreadd-spam?
Date: Fri, 5 May 2023 07:53:41 +0900 [thread overview]
Message-ID: <415a4871-4d84-a31f-5417-e850a98bbffd@I-love.SAKURA.ne.jp> (raw)
In-Reply-To: <CAHC9VhTfxqrWaJrBccDY9LJR+Fggr__zufD-Wd=0VZwN5bBU6g@mail.gmail.com>
On 2023/05/05 3:40, Paul Moore wrote:
> On Wed, May 3, 2023 at 10:50 PM Tetsuo Handa
> <penguin-kernel@i-love.sakura.ne.jp> wrote:
>> On 2023/05/04 7:12, Rinat Gadelshin wrote:
>>> On 04.05.2023 00:27, Paul Moore wrote:
>>>> Can you be more specific about the kernel threads you are seeing, are
>>>> you seeing multiple "kauditd" threads?
>>>>
>>>> % ps -fC kauditd
>>>> UID PID PPID C STIME TTY TIME CMD
>>>> root 89 2 0 Apr28 ? 00:00:00 [kauditd]
>>
>> I don't think so.
>>
>> kernel audit subsystem uses kthread_run() in order to run short-lived kernel threads.
>
> Thanks Tetsuo, I agree that's far more likely. Ever since I took over
> shepherding the audit code, all of the thread issues have been around
> the main audit queue thread so it's a bit reflexive to assume that is
> the case :)
>
Since kthread_run(audit_send_list_thread) is called by audit_receive_msg(AUDIT_LIST_RULES)
via audit_list_rules_send(), trying to audit fork request via AUDIT_LIST_RULES will cause
spams. Maybe something is going wrong with "And such events occurred 1208 times when
AUDIT_LIST_RULES is sending." part; let's wait for what printk() says.
By the way, why do we need to use kthread_run() for short-lived tasks? Can't we use
a dedicated workqueue which would significantly reduce frequency of fork request for
AUDIT_LIST_RULES request?
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
next prev parent reply other threads:[~2023-05-04 22:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 21:14 Can AUDIT_LIST_RULES causes kthreadd-spam? Rinat Gadelshin
2023-05-03 21:27 ` Paul Moore
2023-05-03 22:12 ` Rinat Gadelshin
2023-05-04 2:50 ` Tetsuo Handa
2023-05-04 18:40 ` Paul Moore
2023-05-04 22:53 ` Tetsuo Handa [this message]
2023-05-05 22:12 ` Rinat Gadelshin
2023-05-06 6:50 ` Tetsuo Handa
2023-05-10 12:12 ` Rinat Gadelshin
2023-05-10 13:30 ` Tetsuo Handa
2023-05-10 13:48 ` Steve Grubb
2023-05-24 10:38 ` Rinat Gadelshin
2023-05-24 10:48 ` Tetsuo Handa
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=415a4871-4d84-a31f-5417-e850a98bbffd@I-love.SAKURA.ne.jp \
--to=penguin-kernel@i-love.sakura.ne.jp \
--cc=audit@vger.kernel.org \
--cc=linux-audit@redhat.com \
--cc=paul@paul-moore.com \
--cc=rgadelsh@gmail.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;
as well as URLs for NNTP newsgroup(s).