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] [day] [month] [year] [list]
Date:	Tue, 30 Jun 2015 16:23:21 +0000
From:	"Williams, Dan J" <dan.j.williams@...el.com>
To:	"dan.carpenter@...cle.com" <dan.carpenter@...cle.com>
CC:	"toshi.kani@...com" <toshi.kani@...com>,
	"mingo@...nel.org" <mingo@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-nvdimm@...1.01.org" <linux-nvdimm@...1.01.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"hch@....de" <hch@....de>, "axboe@...nel.dk" <axboe@...nel.dk>,
	"hpa@...or.com" <hpa@...or.com>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
	"ross.zwisler@...ux.intel.com" <ross.zwisler@...ux.intel.com>,
	"boaz@...xistor.com" <boaz@...xistor.com>,
	"linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>
Subject: Re: [PATCH v2 17/17] arch, x86: pmem api for ensuring durability of
 persistent memory updates

On Tue, 2015-06-30 at 13:21 +0300, Dan Carpenter wrote:
> On Thu, Jun 25, 2015 at 05:37:49AM -0400, Dan Williams wrote:
> > diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> > index 867722591be2..9a528d945498 100644
> > --- a/include/linux/compiler.h
> > +++ b/include/linux/compiler.h
> > @@ -21,6 +21,7 @@
> >  # define __rcu		__attribute__((noderef, address_space(4)))
> 
> On this side of the #ifdef CONFIG_SPARSE_RCU_POINTER statement then
> __pmem isn't defined so it leads to a build error running a CHECKER on
> today's linux-next.
> 
> I would define __pmem away, but I don't understand why __pmem and
> CONFIG_SPARSE_RCU_POINTER are related at all.  Maybe it should be
> outside the if statement?
> 

Yes it should be outside the if...

8<----
Subject: sparse: fix misplaced __pmem definition

From: Dan Williams <dan.j.williams@...el.com>

Move the definition of __pmem outside of CONFIG_SPARSE_RCU_POINTER to fix:

drivers/nvdimm/pmem.c:198:17: sparse: too many arguments for function __builtin_expect
drivers/nvdimm/pmem.c:36:33: sparse: expected ; at end of declaration
drivers/nvdimm/pmem.c:48:21: sparse: void declaration

...due to __pmem failing to be defined in some configurations when
CONFIG_SPARSE_RCU_POINTER=y.

Reported-by: kbuild test robot <fengguang.wu@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Dan Williams <dan.j.williams@...el.com>
---
 include/linux/compiler.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 26fc8bc77f85..d8fbd500330e 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -17,11 +17,11 @@
 # define __release(x)	__context__(x,-1)
 # define __cond_lock(x,c)	((c) ? ({ __acquire(x); 1; }) : 0)
 # define __percpu	__attribute__((noderef, address_space(3)))
+# define __pmem		__attribute__((noderef, address_space(5)))
 #ifdef CONFIG_SPARSE_RCU_POINTER
 # define __rcu		__attribute__((noderef, address_space(4)))
 #else
 # define __rcu
-# define __pmem		__attribute__((noderef, address_space(5)))
 #endif
 extern void __chk_user_ptr(const volatile void __user *);
 extern void __chk_io_ptr(const volatile void __iomem *);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ