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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 17 Oct 2022 19:17:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     David Howells <dhowells@...hat.com>
Cc:     kbuild-all@...ts.01.org, Ammar Faizi <ammarfaizi2@...weeb.org>,
        GNU/Weeb Mailing List <gwml@...r.gnuweeb.org>,
        linux-kernel@...r.kernel.org
Subject: [ammarfaizi2-block:dhowells/linux-fs/rxrpc-ringless-3 13/31]
 arch/x86/include/asm/atomic64_32.h:110:34: sparse: sparse: cast truncates
 bits from constant value (100000001 becomes 1)

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/rxrpc-ringless-3
head:   f0c7607acc5c754f280833c1d30759843b6e1f64
commit: c04c2bbd89fc5ff438cb5c5fee76162da122a3ee [13/31] rxrpc: Get rid of the Rx ring
config: i386-randconfig-s003-20221017
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-39-gce1a6720-dirty
        # https://github.com/ammarfaizi2/linux-block/commit/c04c2bbd89fc5ff438cb5c5fee76162da122a3ee
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/rxrpc-ringless-3
        git checkout c04c2bbd89fc5ff438cb5c5fee76162da122a3ee
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash net/rxrpc/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@...el.com>

sparse warnings: (new ones prefixed by >>)
   net/rxrpc/call_object.c: note: in included file (through arch/x86/include/asm/atomic.h, include/linux/atomic.h, include/linux/jump_label.h, ...):
>> arch/x86/include/asm/atomic64_32.h:110:34: sparse: sparse: cast truncates bits from constant value (100000001 becomes 1)

vim +110 arch/x86/include/asm/atomic64_32.h

1a3b1d89eded68d6 Brian Gerst   2010-01-07   99  
1a3b1d89eded68d6 Brian Gerst   2010-01-07  100  /**
8bf705d130396e69 Dmitry Vyukov 2018-01-29  101   * arch_atomic64_set - set atomic64 variable
a7e926abc3adfbd2 Luca Barbieri 2010-02-24  102   * @v: pointer to type atomic64_t
1f0459780c28491c Philipp Hahn  2012-05-02  103   * @i: value to assign
1a3b1d89eded68d6 Brian Gerst   2010-01-07  104   *
a7e926abc3adfbd2 Luca Barbieri 2010-02-24  105   * Atomically sets the value of @v to @n.
1a3b1d89eded68d6 Brian Gerst   2010-01-07  106   */
79c53a83d7a31a5b Mark Rutland  2019-05-22  107  static inline void arch_atomic64_set(atomic64_t *v, s64 i)
a7e926abc3adfbd2 Luca Barbieri 2010-02-24  108  {
a7e926abc3adfbd2 Luca Barbieri 2010-02-24  109  	unsigned high = (unsigned)(i >> 32);
a7e926abc3adfbd2 Luca Barbieri 2010-02-24 @110  	unsigned low = (unsigned)i;
819165fb34b9777f Jan Beulich   2012-01-20  111  	alternative_atomic64(set, /* no output */,
819165fb34b9777f Jan Beulich   2012-01-20  112  			     "S" (v), "b" (low), "c" (high)
819165fb34b9777f Jan Beulich   2012-01-20  113  			     : "eax", "edx", "memory");
a7e926abc3adfbd2 Luca Barbieri 2010-02-24  114  }
1a3b1d89eded68d6 Brian Gerst   2010-01-07  115  

:::::: The code at line 110 was first introduced by commit
:::::: a7e926abc3adfbd2e5e20d2b46177adb4e313915 x86-32: Rewrite 32-bit atomic64 functions in assembly

:::::: TO: Luca Barbieri <luca@...a-barbieri.com>
:::::: CC: H. Peter Anvin <hpa@...or.com>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (159928 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ