[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHC9VhSre7fiAVNtbyVcjg3v3uUwzOm0grNbmo1ppKOyh1B=jg@mail.gmail.com>
Date: Mon, 21 Aug 2023 12:43:47 -0400
From: Paul Moore <paul@...l-moore.com>
To: Aaditya raj <rajaditya073@...il.com>
Cc: linux-security-module@...r.kernel.org, jmorris@...ei.org,
keescook@...omium.org, john.johansen@...onical.com,
penguin-kernel@...ove.sakura.ne.jp, stephen.smalley.work@...il.com,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
mic@...ikod.net
Subject: Re: Watchdog bark! bark due to excessive logging from SELinux in Linux-modules;
On Mon, Aug 21, 2023 at 7:14 AM Aaditya raj <rajaditya073@...il.com> wrote:
>
> Hi Team ,
>
> There is an Watchdog bark issue seen due to excessive logging from SELinux , I have attached a patch to restrict excessive logging , please review the patch and please let me know if there is any issue.
>
> I have modified the file “security/selinux/hooks.c” on line number 1353 , replaced pr_warn with pr_warn_ratelimited.
>
> ---
> security/selinux/hooks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Can you provide more information about what kernel you are using and
the filesystem(s) you have mounted which are causing this error,
including how they are mounted? I wouldn't expect a normal system to
flood the logs with many of these warnings, so I'm wondering if
something else is wrong ...
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index d06e350fedee..83f3e5a0ccc6 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -1350,7 +1350,7 @@ static int inode_doinit_use_xattr(struct inode *inode, struct dentry *dentry,
> if (rc < 0) {
> kfree(context);
> if (rc != -ENODATA) {
> - pr_warn("SELinux: %s: getxattr returned %d for dev=%s ino=%ld\n",
> + pr_warn_ratelimited("SELinux: %s: getxattr returned %d for dev=%s ino=%ld\n",
> __func__, -rc, inode->i_sb->s_id, inode->i_ino);
> return rc;
> }
--
paul-moore.com
Powered by blists - more mailing lists