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:   Fri, 29 Oct 2021 10:39:35 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Herbert Xu <herbert@...dor.apana.org.au>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>
Subject: Re: [GIT PULL] Crypto Fixes for 5.15

On Thu, Oct 28, 2021 at 9:14 PM Herbert Xu <herbert@...dor.apana.org.au> wrote:
>
> This push fixes a build-time warning in x86/sm4.

Hmm..

> Tianjia Zhang (1):
>       crypto: x86/sm4 - Fix invalid section entry size

So I do wonder why the crypto code asm tends to use such complex
".section" directives.

Almost everythign else in the kernel just uses

     .section <name>,"a"

for data (and "ax" for text).

The crypto code uses that very subtle "M" flag which allows the linker
to merge data, but how much of a win is that added complexity? Now you
need to get the sizes exactly right, and you hit tooling issues.

Plus, I get the feeling that some people have just copied-and-pasted
those things, and don't necessarily realize just _how_ subtle 'M'
sections are.

How much of a data savings is it to have this complexity? Particularly
since I suspect most of the time these things end up being individual
modules, and never actually get linked together at all?

So I get this very strong feeling that the crypto code is doing
complicated and fragile things that cause tooling issues - and does so
for no good reason and no actual real-life upside.

I've pulled this, but I do suspect that all the fancy

   .section .rodata.xyz, "aM", @progbits, abc

could just as well be

    .section .rodata, "a"

instead, and you guys are only causing problems for yourself by trying
to be clever in pointless ways.

            Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ