lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 24 Aug 2021 09:29:26 +0200
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     "Chen, Rong A" <rong.a.chen@...el.com>,
        kernel test robot <lkp@...el.com>
Cc:     clang-built-linux@...glegroups.com, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.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]



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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ