LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: "Chen, Rong A" <rong.a.chen@intel.com>,
	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: Tue, 24 Aug 2021 09:29:26 +0200	[thread overview]
Message-ID: <79754a11-fa14-756a-fc30-5cb139a286b6@csgroup.eu> (raw)
In-Reply-To: <7955eec5-c1d7-e0d7-280a-138d96b2daa9@intel.com>



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

  reply	other threads:[~2021-08-24  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23 10:59 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 [this message]
2021-08-25  8:48       ` Rong Chen

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=79754a11-fa14-756a-fc30-5cb139a286b6@csgroup.eu \
    --to=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 \
    --cc=rong.a.chen@intel.com \
    --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]' \
    /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

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).