From: Paul Moore <paul@paul-moore.com>
To: Eiichi Tsukata <eiichi.tsukata@nutanix.com>,
eparis@redhat.com, linux-kernel@vger.kernel.org,
audit@vger.kernel.org
Subject: Re: [PATCH v2 1/5] audit: refactor queue full checks
Date: Fri, 19 May 2023 16:54:36 -0400 [thread overview]
Message-ID: <1be99c1ede70b5c385acc16b59347d02.paul@paul-moore.com> (raw)
In-Reply-To: <20230511052116.19452-2-eiichi.tsukata@nutanix.com>
On May 11, 2023 Eiichi Tsukata <eiichi.tsukata@nutanix.com> wrote:
>
> Currently audit queue full checks are done in multiple places.
> Consolidate them into one audit_queue_full().
>
> Signed-off-by: Eiichi Tsukata <eiichi.tsukata@nutanix.com>
> ---
> kernel/audit.c | 21 +++++++++++----------
> 1 file changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 9bc0b0301198..c15694e1a76b 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -341,6 +341,12 @@ static inline int audit_rate_check(void)
> return retval;
> }
>
> +static inline int audit_queue_full(const struct sk_buff_head *queue)
> +{
> + return audit_backlog_limit &&
> + (skb_queue_len(queue) > audit_backlog_limit);
> +}
Regardless of the other patches in this series, this seems like a
good candidate to merge, but could you make it return a 'bool'
instead of an 'int'?
--
paul-moore.com
next prev parent reply other threads:[~2023-05-19 20:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 5:21 [PATCH v2 0/5] audit: refactors and fixes for potential deadlocks Eiichi Tsukata
2023-05-11 5:21 ` [PATCH v2 1/5] audit: refactor queue full checks Eiichi Tsukata
2023-05-19 20:54 ` Paul Moore [this message]
2023-05-22 4:19 ` Eiichi Tsukata
2023-05-11 5:21 ` [PATCH v2 2/5] audit: account backlog waiting time in audit_receive() Eiichi Tsukata
2023-05-19 20:54 ` Paul Moore
2023-05-22 4:22 ` Eiichi Tsukata
2023-05-23 20:55 ` Paul Moore
2023-05-11 5:21 ` [PATCH v2 3/5] audit: convert DECLARE_WAITQUEUE to DEFINE_WAIT Eiichi Tsukata
2023-05-19 20:54 ` Paul Moore
2023-05-11 5:21 ` [PATCH v2 4/5] audit: check if audit_queue is full after prepare_to_wait_exclusive() Eiichi Tsukata
2023-05-19 20:54 ` Paul Moore
2023-05-22 4:28 ` Eiichi Tsukata
2023-05-23 21:02 ` Paul Moore
2023-05-11 5:21 ` [PATCH v2 5/5] audit: do not use exclusive wait in audit_receive() Eiichi Tsukata
2023-05-19 20:54 ` Paul Moore
2023-05-22 4:44 ` Eiichi Tsukata
2023-05-23 3:58 ` Eiichi Tsukata
2023-05-23 21:07 ` 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=1be99c1ede70b5c385acc16b59347d02.paul@paul-moore.com \
--to=paul@paul-moore.com \
--cc=audit@vger.kernel.org \
--cc=eiichi.tsukata@nutanix.com \
--cc=eparis@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®