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:   Mon, 16 Oct 2017 16:34:48 +0300
From:   "Michael S. Tsirkin" <mst@...hat.com>
To:     Bart Van Assche <Bart.VanAssche@....com>
Cc:     "hch@....de" <hch@....de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "torvalds@...ux-foundation.org" <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] linux/types.h: Restore the ability to disable sparse
 endianness checks

On Tue, Oct 10, 2017 at 04:38:16PM +0000, Bart Van Assche wrote:
> On Mon, 2017-10-09 at 20:42 +0300, Michael S. Tsirkin wrote:
> > On Mon, Oct 09, 2017 at 03:07:42PM +0000, Bart Van Assche wrote:
> > > On Mon, 2017-10-09 at 16:22 +0300, Michael S. Tsirkin wrote:
> > > > On Fri, Oct 06, 2017 at 10:23:53AM -0700, Bart Van Assche wrote:
> > > > > The purpose of patch "linux/types.h: enable endian checks for all
> > > > > sparse builds" was to encourage driver authors to annotate
> > > > > endianness correctly in their drivers. However, since that patch
> > > > > went upstream no endianness annotations in drivers have been fixed.
> > > > > I think that this shows that the followed approach does not work,
> > > > > probably because several driver authors do not use sparse. Restore
> > > > > the ability to disable sparse endianness checks such that it
> > > > > becomes again easy to review other sparse diagnostics for people
> > > > > who want to analyze drivers they are not the author of.
> > > > > 
> > > > > References: commit 05de97003c77 ("linux/types.h: enable endian checks for all sparse builds")
> > > > > Signed-off-by: Bart Van Assche <bart.vanassche@....com>
> > > > > Cc: Christoph Hellwig <hch@....de>
> > > > > Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> > > > 
> > > > I still think the new default is good.  You probably want ability to
> > > > disable these checks selectively for the specific drivers though. Makes
> > > > it easier to spot what needs to be fixed.
> > > 
> > > I agree with what you wrote. And what you described is what my patch implements
> > > - keep endianness checking enabled by default and make it possible to disable it
> > > selectively. Does that mean that you agree with the patch I posted?
> > 
> > I just mean I'd expect a patchset setting the flag for the broken
> > drivers. Presumably this will help trigger some action.
> 
> Hello MST,
> 
> If I would add something like ccflags-y += -D__CHECK_ENDIAN__=0 to the
> Makefile of drivers that are not endianness clean then that would make it
> easier for driver authors to ignore endianness warnings reported by sparse.

They already seem to ignore it.

> I prefer that they have to add CF=-D__CHECK_ENDIAN__=0 to the command line
> when verifying a driver with sparse to get rid of the sparse endianness
> warnings. Do you agree with this?
> 
> Thanks,
> 
> Bart.

I don't see how it'll help make things better. OTOH if the specific
drivers are tagged in the makefile, they can be gradually moved out to
staging or something to help trigger action.

-- 
MST

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ