From: Rong Chen <rong.a.chen@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
kernel test robot <lkp@intel.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
linux-kernel@vger.kernel.org,
Michael Ellerman <mpe@ellerman.id.au>
Subject: Re: [kbuild-all] Re: arch/powerpc/kernel/signal_32.c:297:2: warning: Value stored to 'msr' is never read [clang-analyzer-deadcode.DeadStores]
Date: Wed, 25 Aug 2021 16:48:23 +0800 [thread overview]
Message-ID: <6e7edeb5-07fc-fedc-7f9c-0e2eb23e22bb@intel.com> (raw)
In-Reply-To: <79754a11-fa14-756a-fc30-5cb139a286b6@csgroup.eu>
On 8/24/21 3:29 PM, Christophe Leroy wrote:
>
>
> Le 24/08/2021 à 08:59, Chen, Rong A a écrit :
>>
>>
>> On 8/23/2021 10:35 PM, Christophe Leroy wrote:
>>>
>>>
>>> Le 23/08/2021 à 12:59, kernel test robot a écrit :
>>>> tree:
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>> master
>>>> head: e22ce8eb631bdc47a4a4ea7ecf4e4ba499db4f93
>>>> commit: ef75e73182949a94bde169a774de1b62ae21fbbc powerpc/signal32:
>>>> Transform save_user_regs() and save_tm_user_regs() in 'unsafe' version
>>>> date: 9 months ago
>>>> config: powerpc-randconfig-c003-20210821 (attached as .config)
>>>> compiler: clang version 14.0.0
>>>> (https://github.com/llvm/llvm-project
>>>> d9c5613e856cf2addfbf892fc4c1ce9ef9feceaa)
>>>> reproduce (this is a W=1 build):
>>>> wget
>>>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>>>> -O ~/bin/make.cross
>>>> chmod +x ~/bin/make.cross
>>>> # install powerpc cross compiling tool for clang build
>>>> # apt-get install binutils-powerpc-linux-gnu
>>>> #
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef75e73182949a94bde169a774de1b62ae21fbbc
>>>>
>>>> git remote add linus
>>>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>>> git fetch --no-tags linus master
>>>> git checkout ef75e73182949a94bde169a774de1b62ae21fbbc
>>>> # save the attached .config to linux build tree
>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross
>>>> ARCH=powerpc clang-analyzer
>>>>
>>>> If you fix the issue, kindly add following tag as appropriate
>>>> Reported-by: kernel test robot <lkp@intel.com>
>>>>
>>>>
>>>> clang-analyzer warnings: (new ones prefixed by >>)
>>>> ^
>>>>>> arch/powerpc/kernel/signal_32.c:297:2: warning: Value stored to
>>>>>> 'msr' is never read [clang-analyzer-deadcode.DeadStores]
>>>> msr &= ~MSR_VSX;
>>>> ^ ~~~~~~~~
>>>> arch/powerpc/kernel/signal_32.c:297:2: note: Value stored to
>>>> 'msr' is never read
>>>> msr &= ~MSR_VSX;
>>>> ^ ~~~~~~~~
>>>
>>>
>>> This is wrong.
>>>
>>> msr is used at line 326:
>>>
>>> ef75e73182949a arch/powerpc/kernel/signal_32.c Christophe Leroy
>>> 2020-08-18 326 unsafe_put_user(msr, &frame->mc_gregs[PT_MSR], failed);
>>
>> Hi Christophe,
>>
>> The usage is under CONFIG_VSX, the test config
>> (powerpc-randconfig-c003-20210821) didn't enable it which triggered
>> this warning.
>
>
> No no, the 'unsafe_put_user(msr, &frame->mc_gregs[PT_MSR], failed) '
> at line 326 is not under CONFIG_VSX as far as I can see.
>
>
> Christophe
Hi Christophe,
It's my fault, I didn't see it correctly, and I have no idea why
clang-analyzer reported it as a issue,
we'll double check such warning next time.
Best Regards,
Rong Chen
prev parent reply other threads:[~2021-08-25 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-23 10:59 arch/powerpc/kernel/signal_32.c:297:2: warning: Value stored to 'msr' is never read [clang-analyzer-deadcode.DeadStores] kernel test robot
2021-08-23 14:35 ` Christophe Leroy
2021-08-24 6:59 ` [kbuild-all] " Chen, Rong A
2021-08-24 7:29 ` Christophe Leroy
2021-08-25 8:48 ` Rong Chen [this message]
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=6e7edeb5-07fc-fedc-7f9c-0e2eb23e22bb@intel.com \
--to=rong.a.chen@intel.com \
--cc=christophe.leroy@csgroup.eu \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mpe@ellerman.id.au \
/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).