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-next>] [day] [month] [year] [list]
Message-ID: <201710060738.Yjubqqja%fengguang.wu@intel.com>
Date:   Fri, 6 Oct 2017 07:18:41 +0800
From:   kbuild test robot <fengguang.wu@...el.com>
To:     Will Deacon <will.deacon@....com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: [rcu:dev.2017.10.05a 32/34] include/linux/compiler.h:343:2: error:
 implicit declaration of function 'smp_read_barrier_depends'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2017.10.05a
head:   39ae2675aa536e6ef9d334fe9097d1e2c6b25fbc
commit: 7e3675cc18bbf4d84f60bfc02ff563ae3764ad35 [32/34] locking/barriers: Kill lockless_dereference
config: h8300-h8300h-sim_defconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 7e3675cc18bbf4d84f60bfc02ff563ae3764ad35
        # save the attached .config to linux build tree
        make.cross ARCH=h8300 

All error/warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from arch/h8300/kernel/asm-offsets.c:11:
   include/linux/list.h: In function 'list_empty':
>> include/linux/compiler.h:343:2: error: implicit declaration of function 'smp_read_barrier_depends' [-Werror=implicit-function-declaration]
     smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \
     ^
   include/linux/compiler.h:346:22: note: in expansion of macro '__READ_ONCE'
    #define READ_ONCE(x) __READ_ONCE(x, 1)
                         ^~~~~~~~~~~
>> include/linux/list.h:202:9: note: in expansion of macro 'READ_ONCE'
     return READ_ONCE(head->next) == head;
            ^~~~~~~~~
   cc1: some warnings being treated as errors
   make[2]: *** [arch/h8300/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +/smp_read_barrier_depends +343 include/linux/compiler.h

   312	
   313	/*
   314	 * Prevent the compiler from merging or refetching reads or writes. The
   315	 * compiler is also forbidden from reordering successive instances of
   316	 * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the
   317	 * compiler is aware of some particular ordering.  One way to make the
   318	 * compiler aware of ordering is to put the two invocations of READ_ONCE,
   319	 * WRITE_ONCE or ACCESS_ONCE() in different C statements.
   320	 *
   321	 * In contrast to ACCESS_ONCE these two macros will also work on aggregate
   322	 * data types like structs or unions. If the size of the accessed data
   323	 * type exceeds the word size of the machine (e.g., 32 bits or 64 bits)
   324	 * READ_ONCE() and WRITE_ONCE() will fall back to memcpy(). There's at
   325	 * least two memcpy()s: one for the __builtin_memcpy() and then one for
   326	 * the macro doing the copy of variable - '__u' allocated on the stack.
   327	 *
   328	 * Their two major use cases are: (1) Mediating communication between
   329	 * process-level code and irq/NMI handlers, all running on the same CPU,
   330	 * and (2) Ensuring that the compiler does not  fold, spindle, or otherwise
   331	 * mutilate accesses that either do not require ordering or that interact
   332	 * with an explicit memory barrier or atomic instruction that provides the
   333	 * required ordering.
   334	 */
   335	
   336	#define __READ_ONCE(x, check)						\
   337	({									\
   338		union { typeof(x) __val; char __c[1]; } __u;			\
   339		if (check)							\
   340			__read_once_size(&(x), __u.__c, sizeof(x));		\
   341		else								\
   342			__read_once_size_nocheck(&(x), __u.__c, sizeof(x));	\
 > 343		smp_read_barrier_depends(); /* Enforce dependency ordering from x */ \
   344		__u.__val;							\
   345	})
   346	#define READ_ONCE(x) __READ_ONCE(x, 1)
   347	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (4713 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ