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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 20 May 2014 07:36:34 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Davidlohr Bueso <davidlohr@...com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Tim Chen <tim.c.chen@...ux.intel.com>
Subject: Re: linux-next: build warning after merge of the akpm tree

Hi,

On Mon, 19 May 2014 08:13:16 -0700 Davidlohr Bueso <davidlohr@...com> wrote:
>
> On Mon, 2014-05-19 at 18:13 +1000, Stephen Rothwell wrote:
> > Hi Andrew,
> > 
> > After merging the akpm tree, today's linux-next build (arm
> > multi_v7_defconfig) produced these warnings:
> > 
> > 
> > ipc/ipcns_notifier.c:22:8: warning: excess elements in struct initializer [enabled by default]
> > ipc/ipcns_notifier.c:22:8: warning: (near initialization for 'ipcns_chain.rwsem') [enabled by default]
> > ipc/ipcns_notifier.c:22:8: warning: excess elements in struct initializer [enabled by default]
> > ipc/ipcns_notifier.c:22:8: warning: (near initialization for 'ipcns_chain.rwsem') [enabled by default]
> > 
> > and many more in other files ...
> 
> Hmm are all the warning the same? Is this just on arm? have you seen it
> in other archs? (Could you please send me the .config)

The warnings were all the same, I saw it only on arm (since that was
what I built) and I mentioned the config above.

> > Presumably a result of commit fe2038c57c03 ("rwsem: Support optimistic
> > spinning").
> 
> If CONFIG_SMP, we add two new fields to the rwsem structure
> (include/linux/rwsem.h) and likewise we update the
> __RWSEM_INITIALIZER(name) macro. Afaict the only way to trigger
> something like that is to be using the spinlock variant
> (rwsem-spinlock.h).

Actually quite a few architectures do set
CONFIG_RWSEM_GENERIC_SPINLOCK, and so wouldn't it make more sense to
actually directly test that?

> The fix for that would be:
> 
> diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
> index 3e108f1..091d993 100644
> --- a/include/linux/rwsem.h
> +++ b/include/linux/rwsem.h
> @@ -64,7 +64,7 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem)
>  # define __RWSEM_DEP_MAP_INIT(lockname)
>  #endif
>  
> -#ifdef CONFIG_SMP
> +#if defined(CONFIG_SMP) && defined(CONFIG_RWSEM_XCHGADD_ALGORITHM)

so

#if defined(CONFIG_SMP) && !defined(CONFIG_RWSEM_GENERIC_SPINLOCK)

?

> This was picked up today by -tip maintainers, so I guess it should also
> be removed from -mm.

Was a fix also picked up?

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ