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:   Tue, 30 Mar 2021 18:31:52 -0700
From:   Jian Cai <jiancai@...gle.com>
To:     Guenter Roeck <linux@...ck-us.net>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Christopher Di Bella <cjdb@...gle.com>,
        Manoj Gupta <manojgupta@...gle.com>,
        Luis Lozano <llozano@...gle.com>,
        clang-built-linux <clang-built-linux@...glegroups.com>,
        Jens Axboe <axboe@...nel.dk>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-block@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] blk-mq: fix alignment mismatch.

Thanks for all the information. I'll check for similar instances and
send an updated version.


On Tue, Mar 30, 2021 at 5:26 PM Guenter Roeck <linux@...ck-us.net> wrote:
>
> On 3/30/21 4:29 PM, Nathan Chancellor wrote:
> > 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.
> >
>
> As commit 4ccafe032005 states, it increases the request structure size.
> Given the exchange referenced above, I think we'll need to disable
> the warning in the block code.
>
> Thanks,
> Guenter
>
> > Cheers,
> > Nathan
> >
> >> ---
> >>  include/linux/blkdev.h | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> >> index bc6bc8383b43..3b92330d95ad 100644
> >> --- a/include/linux/blkdev.h
> >> +++ b/include/linux/blkdev.h
> >> @@ -231,7 +231,7 @@ struct request {
> >>      unsigned long deadline;
> >>
> >>      union {
> >> -            struct __call_single_data csd;
> >> +            call_single_data_t csd;
> >>              u64 fifo_time;
> >>      };
> >>
> >> --
> >> 2.31.0.291.g576ba9dcdaf-goog
> >>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ