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, 8 Jun 2022 14:19:21 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Justin Stitt <jstitt007@...il.com>
Cc:     akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, nathan@...nel.org, trix@...hat.com
Subject: Re: [PATCH v2] include/uapi/linux/swab.h: move explicit cast outside ternary

On Tue, Jun 7, 2022 at 5:14 PM Justin Stitt <jstitt007@...il.com> wrote:
>
> A cast inside __builtin_constant_p doesn't do anything since it should evaluate
> as constant at compile time irrespective of this cast. Instead, I moved this
> cast outside the ternary to ensure the return type is as expected.
>
> For instance, if __HAVE_BUILTIN_BSWAP16__ was not defined then __swab16 is
> actually returning an `int` not a `u16` due to integer promotion as described
> by Nick in this thread. This has repercussions when building with clang

Also, "this thread" won't make much sense when applied if someone is
looking at git log.  Consider phrasing this instead as "in the lore
link below" then include another link tag to

Link: https://lore.kernel.org/llvm/CAKwvOdmXeRbFjkHgFXps4pLH6Q6pGWRNOqA85=h2aFnR=uaggg@mail.gmail.com/

Though, I think it's simply more concise to just include what Al said,
and drop this sentence altogether.  You can send me v3 privately as an
RFC and I'll greenlight it before you resend to the list.
-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ