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:   Wed, 20 May 2020 11:17:17 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     a@...table.cc
Cc:     netdev@...r.kernel.org, cake@...ts.bufferbloat.net, toke@...e.dk,
        jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
        stephen@...workplumber.org
Subject: Re: [PATCH] net/sch_generic.h: use sizeof_member() and get rid of
 unused variable

From: Antonio Quartulli <a@...table.cc>
Date: Wed, 20 May 2020 10:39:33 +0200

> I don't think it's BUILD_BUG_ON()'s fault, because qcb->data is passed
> to sizeof() first.
> 
> My best guess is that gcc is somewhat optimizing the sizeof(gcb->data)
> and thus leaving the gcb variable unused.

If you remove the argument from the function but leave the BUILD_BUG_ON()
calls the same, the compilation will fail.

Any such optimization is therefore unreasonable.

The variable is used otherwise compilation would not fail when you
remove it right?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ