linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"Jason A. Donenfeld" <Jason@zx2c4.com>,
	"David S. Miller" <davem@davemloft.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Crypto Mailing List <linux-crypto@vger.kernel.org>
Subject: Re: [GIT PULL] Crypto Fixes for 5.6
Date: Fri, 13 Mar 2020 14:27:29 +0900	[thread overview]
Message-ID: <CAK7LNAS2Ev8h=W_6V9DJc7-1Hz3J6O79ADUULrnOG5vTMWfSpw@mail.gmail.com> (raw)
In-Reply-To: <CAHk-=wjbTF2iw3EbKgfiRRq_keb4fHwLO8xJyRXbfK3Q7cscuQ@mail.gmail.com>

Hi Linus,

On Fri, Mar 13, 2020 at 1:41 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Thu, Mar 12, 2020 at 4:57 AM Herbert Xu <herbert@gondor.apana.org.au> wrote:
> >
> > This push fixes a build problem with x86/curve25519.
>
> Pulled.
>
> I do have a comment, though: this fix matches the existing pattern of
> checking for assembler support, but that existing pattern is
> absolutely horrible.
>
> Would some enterprising individual please look at making the
> CONFIG_AS_xyz flags use the _real_ config subsystem rather than ad-hoc
> Makefile rules?
>
> IOW, instead of having
>
>   adx_instr := $(call as-instr,adox %r10$(comma)%r10,-DCONFIG_AS_ADX=1)
>   ..
>   adx_supported := $(call as-instr,adox %r10$(comma)%r10,yes,no)
>
> in the makefiles, and silently changing how the Kconfig variables work
> depending on those flags, make that DCONFIG_AS_ADX be a real config
> variable:
>
>    config AS_ADX
>            def_bool $(success,$(srctree)/scripts/as-instr.sh "adox %r10,%r10")
>
> or something like that?
>
> And then we can make that CRYPTO_CURVE25519_X86 config variable simply have a
>
>         depends on AS_ADX
>
> in it, and the Kconfig system just takes care of these dependencies on its own.
>
> Anyway, the crypto change isn't _wrong_, but it does point out an ugly
> little horror in how the crypto layer silently basically changes the
> configuration depending on other things.
>
> For an example of why this is problematic: it means that if somebody
> sends you their config file, the actual configuration you get may be
> *completely* different from what they actually had, depending on
> tools.
>
> Added Masahiro to the cc, since he's used to the 'def_bool' model, and
> also is familiar with our existing 'as-instr' Makefile macro.


Thanks for the heads-up.

In fact, as-instr is already used in Kconfig.
arch/arm64/Kconfig: line 1396


arm / arm64 are simple cases because
32, 64-bit is separated by directory.

There is one thing we need to be careful about.
The x86 GCC is usually biarch.
So, when evaluating 64-bit assembly code
with a default 32-bit compiler,
-m64 must be passed.

I will keep this conversion in my mind.

Thanks.

> So this is basically me throwing out a "I wish somebody would look at
> this". Not meant as a criticism of the commit in question.
>
>             Linus



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2020-03-13  5:28 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16  8:49 [GIT PULL] Crypto Update for 5.4 Herbert Xu
2019-09-18 19:55 ` pr-tracker-bot
2019-09-23  5:05 ` [GIT PULL] Crypto Fixes " Herbert Xu
2019-09-23 16:50   ` pr-tracker-bot
2019-10-10 12:38   ` Herbert Xu
2019-10-10 15:45     ` pr-tracker-bot
2019-11-17  1:00     ` Herbert Xu
2019-11-17  2:35       ` pr-tracker-bot
2019-12-02  6:20   ` [GIT PULL] Crypto Fixes for 5.5 Herbert Xu
2019-12-03  1:30     ` pr-tracker-bot
2019-12-14  8:47     ` Herbert Xu
2019-12-14 22:05       ` pr-tracker-bot
2020-01-15 15:08       ` Herbert Xu
2020-01-15 19:35         ` pr-tracker-bot
2020-02-13  3:32         ` [GIT PULL] Crypto Fixes for 5.6 Herbert Xu
2020-02-13 22:40           ` pr-tracker-bot
2020-02-24  6:00           ` Herbert Xu
2020-02-24 20:25             ` pr-tracker-bot
2020-03-12 11:57             ` Herbert Xu
2020-03-12 16:40               ` Linus Torvalds
2020-03-13  5:27                 ` Masahiro Yamada [this message]
2020-03-20 23:53                 ` Jason A. Donenfeld
2020-03-21 15:43                   ` Linus Torvalds
2020-03-21  0:49                 ` [PATCH RFC 0/3] x86: probe for assembler capabilities in Kconfig Jason A. Donenfeld
2020-03-21  0:49                   ` [PATCH RFC 1/3] x86: probe assembler instead of kconfig instead of makefile Jason A. Donenfeld
2020-03-21  0:49                   ` [PATCH RFC 2/3] crypto: x86 - rework configuration based on Kconfig Jason A. Donenfeld
2020-03-21  0:49                   ` [PATCH RFC 3/3] crypto: curve25519 - do not pollute dispatcher based on assembler Jason A. Donenfeld
2020-03-12 17:05               ` [GIT PULL] Crypto Fixes for 5.6 pr-tracker-bot
2020-03-23 22:54               ` Herbert Xu
2020-03-23 23:05                 ` pr-tracker-bot
2020-04-08  6:15           ` [GIT PULL] Crypto Fixes for 5.7 Herbert Xu
2020-04-09  4:55             ` pr-tracker-bot
2020-04-29  5:54             ` Herbert Xu
2020-04-29 16:50               ` pr-tracker-bot
2020-05-06  5:10               ` Herbert Xu
2020-05-06 17:25                 ` pr-tracker-bot
2020-06-11  4:05             ` [GIT PULL] Crypto Fixes for 5.8 Herbert Xu
2020-06-11 18:25               ` pr-tracker-bot
2020-06-21  8:23               ` Herbert Xu
2020-06-21 17:10                 ` pr-tracker-bot
2020-06-29  2:16                 ` Herbert Xu
2020-06-29 17:15                   ` pr-tracker-bot
2020-08-14 13:18               ` [GIT PULL] Crypto Fixes for 5.9 Herbert Xu
2020-08-14 20:34                 ` pr-tracker-bot
2019-11-25  3:45 ` [GIT PULL] Crypto Update for 5.5 Herbert Xu
2019-11-26  4:25   ` pr-tracker-bot
2020-01-28  5:03   ` [GIT PULL] Crypto Update for 5.6 Herbert Xu
2020-01-29  0:30     ` pr-tracker-bot
2020-04-01  4:27     ` [GIT PULL] Crypto Update for 5.7 Herbert Xu
2020-04-01 22:35       ` pr-tracker-bot
2020-06-01  2:45       ` [GIT PULL] Crypto Update for 5.8 Herbert Xu
2020-06-01 19:35         ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNAS2Ev8h=W_6V9DJc7-1Hz3J6O79ADUULrnOG5vTMWfSpw@mail.gmail.com' \
    --to=masahiroy@kernel.org \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [GIT PULL] Crypto Fixes for 5.6' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).