From: Mimi Zohar <zohar@linux.ibm.com>
To: liqiong <liqiong@nfschina.com>
Cc: kernel test robot <lkp@intel.com>,
kbuild-all@lists.01.org, linux-integrity@vger.kernel.org,
THOBY Simon <Simon.THOBY@viveris.fr>
Subject: Re: [zohar-integrity:next-integrity-testing 1/1] security/integrity/ima/ima_policy.c:684:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
Date: Fri, 17 Sep 2021 10:27:40 -0400 [thread overview]
Message-ID: <b22ad457ce54955ab160f4f48940887ebdee94d4.camel@linux.ibm.com> (raw)
In-Reply-To: <1b6c2bf0-cd29-436b-9cdc-2e2a6405601a@nfschina.com>
On Thu, 2021-09-16 at 20:05 +0800, liqiong wrote:
> Hi Mini,
>
> I got this sparse warnings, should i fix it ?
>
> It seems the follow patch can fix, but i don't think should do
> this check (ima_rules_tmp == NULL).
>
>
> -static struct list_head *ima_rules = &ima_default_rules;
> +static struct list_head __rcu *ima_rules = (struct list_head __rcu *)(&ima_default_rules);
>
> ima_rules_tmp = rcu_dereference(ima_rules);
> +if (ima_rules_tmp == NULL)
> + return ;
Agreed, the "__rcu" annotation is missing. Probably both ima_rules
and ima_rules_tmp should be annotated with "__rcu". Agreed,
ima_rules_tmp will either point to the default or custom policy rules.
No need for the check.
Please post a new version of the patch, with "Reported-by: kernel test
robot <lkp@intel.com> (Fix sparse: incompatible types in comparison
expression)".
thanks,
Mimi
next prev parent reply other threads:[~2021-09-17 14:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-14 22:30 [zohar-integrity:next-integrity-testing 1/1] security/integrity/ima/ima_policy.c:684:25: sparse: sparse: incompatible types in comparison expression (different address spaces): kernel test robot
2021-09-16 12:05 ` liqiong
2021-09-17 14:27 ` Mimi Zohar [this message]
2021-09-18 2:49 ` liqiong
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=b22ad457ce54955ab160f4f48940887ebdee94d4.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=Simon.THOBY@viveris.fr \
--cc=kbuild-all@lists.01.org \
--cc=linux-integrity@vger.kernel.org \
--cc=liqiong@nfschina.com \
--cc=lkp@intel.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