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]
Message-ID: <553e40c54eea408a96f42eec53616993@AcuMS.aculab.com>
Date:   Wed, 31 Mar 2021 10:38:15 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Nathan Chancellor' <nathan@...nel.org>,
        Jian Cai <jiancai@...gle.com>
CC:     "cjdb@...gle.com" <cjdb@...gle.com>,
        "manojgupta@...gle.com" <manojgupta@...gle.com>,
        "llozano@...gle.com" <llozano@...gle.com>,
        "clang-built-linux@...glegroups.com" 
        <clang-built-linux@...glegroups.com>,
        Guenter Roeck <linux@...ck-us.net>,
        Jens Axboe <axboe@...nel.dk>,
        "Nick Desaulniers" <ndesaulniers@...gle.com>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] blk-mq: fix alignment mismatch.

From: Nathan Chancellor
> Sent: 31 March 2021 00:30
> 
> Hi Jian,
> 
> On Tue, Mar 30, 2021 at 04:02:49PM -0700, Jian Cai wrote:
> > This fixes the mismatch of alignments between csd and its use as an
> > argument to smp_call_function_single_async, which causes build failure
> > when -Walign-mismatch in Clang is used.
> >
> > Link:
> > http://crrev.com/c/1193732
> >
> > Suggested-by: Guenter Roeck <linux@...ck-us.net>
> > Signed-off-by: Jian Cai <jiancai@...gle.com>
> 
> Thanks for the patch. This is effectively a revert of commit
> 4ccafe032005 ("block: unalign call_single_data in struct request"),
> which I had brought up in this thread:
> 
> https://lore.kernel.org/r/20210310182307.zzcbi5w5jrmveld4@archlinux-ax161/
> 
> This is obviously a correct fix, I am not just sure what the impact to
> 'struct request' will be.

If the structure is allocated on-stack then aligning it
requires the compiler generate the rather horrid
'double stack frame' for the function.

Possibly the unaligned 'struct' should be used by all
the code except for a few places where it makes sense
to allocate an aligned item?

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ