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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 9 Jul 2018 14:53:36 +0000
From:   Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To:     "peterz@...radead.org" <peterz@...radead.org>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "will.deacon@....com" <will.deacon@....com>,
        "greg@...ah.com" <greg@...ah.com>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "David.Laight@...LAB.COM" <David.Laight@...LAB.COM>,
        Vineet Gupta <Vineet.Gupta1@...opsys.com>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
        "geert@...ux-m68k.org" <geert@...ux-m68k.org>
Subject: Re: [PATCH v3] devres: Explicitly align datai[] to 64-bit

Hi Peter,

On Mon, 2018-07-09 at 16:49 +0200, Peter Zijlstra wrote:
> On Mon, Jul 09, 2018 at 02:33:26PM +0000, Alexey Brodkin wrote:
> > > In fact, since alloc_dr() uses kmalloc() to allocate the entire thing,
> > > it is impossible to guarantee a larger alignment than kmalloc does.
> > 
> > Well but 4-bytes [which is critical for atomic64_t] should be much less
> > than a sane cache line length so above should work.
> 
> AFAICT ARCH_KMALLOC_MINALIGN ends up being 4 on x86_32 (it doesn't
> define ARCH_DMA_MINALIGN and doesn't seem to otherwise override the
> thing).
> 
> So unconditionally setting the alignment of devres::data to 8 seems
> broken.

Well but then what other options do we have to fix a problem with
misaligned access to atomic64_t in drm_gpu_scheduler?

-Alexey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ