linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
       [not found]         ` <CAHmME9rA_nb9Le4VQhtcqCfNSuHpFjZVOV6=vE12FydJD9CmAQ@mail.gmail.com>
@ 2018-08-07 19:43           ` Andy Lutomirski
  2018-08-07 19:43             ` Andy Lutomirski
  2018-08-07 23:48             ` Jason A. Donenfeld
  0 siblings, 2 replies; 10+ messages in thread
From: Andy Lutomirski @ 2018-08-07 19:43 UTC (permalink / raw)
  To: Jason A. Donenfeld, Ingo Molnar, Thomas Gleixner, linux-arch
  Cc: Eric Biggers, Linux Crypto Mailing List, LKML, Netdev,
	David Miller, Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

On Tue, Aug 7, 2018 at 11:54 AM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> Hey Andy, Eric, & all,
>
> I've started the work of separating this out into 16 individual
> commits, have addressed numerous other things brought up like the
> ifdef maze, and have begun rewriting (parts of) the original commit
> message. It's still a work in progress, and I still have some work to
> do, but if you want to follow along, things are happening here:
>
> https://git.zx2c4.com/linux-dev/log/?h=jd/wireguard
>
> I'll be rebasing and reworking this continuously, but that's how it's
> shaping up.
>
> As I'm still working on it, I won't be submitting v2 today, but if you
> have suggestions or concerns or want to poke me while I'm working on
> v2, don't hesitate to send me private email or ping me in IRC (I'm
> "zx2c4" there) to chat.
>
> Regards,
> Jason

For "zinc: add simd helper", I think it should be in include/linux,
and include/linux/simd.h should (immediately or maybe in the future)
include <asm/simd.h> to pick up arch-specific stuff.  And the patch
should get sent to linux-arch@vger.kernel.org.

In your blake2s_arch() implementation, you're not passing in a
simd_context_t.  Is that still a work in progress?  I thought the plan
was to pass it in rather than doing the check in the _arch()
functions.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-07 19:43           ` [PATCH v1 2/3] zinc: Introduce minimal cryptography library Andy Lutomirski
@ 2018-08-07 19:43             ` Andy Lutomirski
  2018-08-07 23:48             ` Jason A. Donenfeld
  1 sibling, 0 replies; 10+ messages in thread
From: Andy Lutomirski @ 2018-08-07 19:43 UTC (permalink / raw)
  To: Jason A. Donenfeld, Ingo Molnar, Thomas Gleixner, linux-arch
  Cc: Eric Biggers, Linux Crypto Mailing List, LKML, Netdev,
	David Miller, Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

On Tue, Aug 7, 2018 at 11:54 AM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> Hey Andy, Eric, & all,
>
> I've started the work of separating this out into 16 individual
> commits, have addressed numerous other things brought up like the
> ifdef maze, and have begun rewriting (parts of) the original commit
> message. It's still a work in progress, and I still have some work to
> do, but if you want to follow along, things are happening here:
>
> https://git.zx2c4.com/linux-dev/log/?h=jd/wireguard
>
> I'll be rebasing and reworking this continuously, but that's how it's
> shaping up.
>
> As I'm still working on it, I won't be submitting v2 today, but if you
> have suggestions or concerns or want to poke me while I'm working on
> v2, don't hesitate to send me private email or ping me in IRC (I'm
> "zx2c4" there) to chat.
>
> Regards,
> Jason

For "zinc: add simd helper", I think it should be in include/linux,
and include/linux/simd.h should (immediately or maybe in the future)
include <asm/simd.h> to pick up arch-specific stuff.  And the patch
should get sent to linux-arch@vger.kernel.org.

In your blake2s_arch() implementation, you're not passing in a
simd_context_t.  Is that still a work in progress?  I thought the plan
was to pass it in rather than doing the check in the _arch()
functions.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-07 19:43           ` [PATCH v1 2/3] zinc: Introduce minimal cryptography library Andy Lutomirski
  2018-08-07 19:43             ` Andy Lutomirski
@ 2018-08-07 23:48             ` Jason A. Donenfeld
  2018-08-07 23:48               ` Jason A. Donenfeld
  2018-08-08  1:48               ` Andy Lutomirski
  1 sibling, 2 replies; 10+ messages in thread
From: Jason A. Donenfeld @ 2018-08-07 23:48 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

Hey Andy,

On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski <luto@amacapital.net> wrote:
> For "zinc: add simd helper", I think it should be in include/linux,
> and include/linux/simd.h should (immediately or maybe in the future)
> include <asm/simd.h> to pick up arch-specific stuff.  And the patch
> should get sent to linux-arch@vger.kernel.org.

I guess you saw my prompt about that in the previous commit message?
Based on your encouragement, I implemented it:
https://git.zx2c4.com/linux-dev/commit/?h=simd This is _far_ more
invasive than I wanted to be, as I don't want this patch submission to
grow unwieldy and never be merged, but I guess we can roll with this
for now...

> In your blake2s_arch() implementation, you're not passing in a
> simd_context_t.  Is that still a work in progress?  I thought the plan
> was to pass it in rather than doing the check in the _arch()
> functions.

I'm inclined to do the explicit context passing only when a function
is likely to be used in that kind of environment, and adjust as
needed. Long term, anyway, that API will be removed once the x86 guys
figure out lazy FPU restoration and the amortization doesn't add
anything.

Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-07 23:48             ` Jason A. Donenfeld
@ 2018-08-07 23:48               ` Jason A. Donenfeld
  2018-08-08  1:48               ` Andy Lutomirski
  1 sibling, 0 replies; 10+ messages in thread
From: Jason A. Donenfeld @ 2018-08-07 23:48 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

Hey Andy,

On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski <luto@amacapital.net> wrote:
> For "zinc: add simd helper", I think it should be in include/linux,
> and include/linux/simd.h should (immediately or maybe in the future)
> include <asm/simd.h> to pick up arch-specific stuff.  And the patch
> should get sent to linux-arch@vger.kernel.org.

I guess you saw my prompt about that in the previous commit message?
Based on your encouragement, I implemented it:
https://git.zx2c4.com/linux-dev/commit/?h=simd This is _far_ more
invasive than I wanted to be, as I don't want this patch submission to
grow unwieldy and never be merged, but I guess we can roll with this
for now...

> In your blake2s_arch() implementation, you're not passing in a
> simd_context_t.  Is that still a work in progress?  I thought the plan
> was to pass it in rather than doing the check in the _arch()
> functions.

I'm inclined to do the explicit context passing only when a function
is likely to be used in that kind of environment, and adjust as
needed. Long term, anyway, that API will be removed once the x86 guys
figure out lazy FPU restoration and the amortization doesn't add
anything.

Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-07 23:48             ` Jason A. Donenfeld
  2018-08-07 23:48               ` Jason A. Donenfeld
@ 2018-08-08  1:48               ` Andy Lutomirski
  2018-08-08  1:48                 ` Andy Lutomirski
  2018-08-08  1:51                 ` Jason A. Donenfeld
  1 sibling, 2 replies; 10+ messages in thread
From: Andy Lutomirski @ 2018-08-08  1:48 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan



> On Aug 7, 2018, at 4:48 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> 
> Hey Andy,
> 
>> On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski <luto@amacapital.net> wrote:
>> For "zinc: add simd helper", I think it should be in include/linux,
>> and include/linux/simd.h should (immediately or maybe in the future)
>> include <asm/simd.h> to pick up arch-specific stuff.  And the patch
>> should get sent to linux-arch@vger.kernel.org.
> 
> I guess you saw my prompt about that in the previous commit message?
> Based on your encouragement, I implemented it:
> https://git.zx2c4.com/linux-dev/commit/?h=simd This is _far_ more
> invasive than I wanted to be, as I don't want this patch submission to
> grow unwieldy and never be merged, but I guess we can roll with this
> for now...
> 

I really wish we had a way to see that we use asm-generic’s copy of a header in all cases except where an arch opts out.

>> In your blake2s_arch() implementation, you're not passing in a
>> simd_context_t.  Is that still a work in progress?  I thought the plan
>> was to pass it in rather than doing the check in the _arch()
>> functions.
> 
> I'm inclined to do the explicit context passing only when a function
> is likely to be used in that kind of environment, and adjust as
> needed. Long term, anyway, that API will be removed once the x86 guys
> figure out lazy FPU restoration and the amortization doesn't add
> anything.

Fair enough.

> 
> Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-08  1:48               ` Andy Lutomirski
@ 2018-08-08  1:48                 ` Andy Lutomirski
  2018-08-08  1:51                 ` Jason A. Donenfeld
  1 sibling, 0 replies; 10+ messages in thread
From: Andy Lutomirski @ 2018-08-08  1:48 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan



> On Aug 7, 2018, at 4:48 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> 
> Hey Andy,
> 
>> On Tue, Aug 7, 2018 at 12:43 PM Andy Lutomirski <luto@amacapital.net> wrote:
>> For "zinc: add simd helper", I think it should be in include/linux,
>> and include/linux/simd.h should (immediately or maybe in the future)
>> include <asm/simd.h> to pick up arch-specific stuff.  And the patch
>> should get sent to linux-arch@vger.kernel.org.
> 
> I guess you saw my prompt about that in the previous commit message?
> Based on your encouragement, I implemented it:
> https://git.zx2c4.com/linux-dev/commit/?h=simd This is _far_ more
> invasive than I wanted to be, as I don't want this patch submission to
> grow unwieldy and never be merged, but I guess we can roll with this
> for now...
> 

I really wish we had a way to see that we use asm-generic’s copy of a header in all cases except where an arch opts out.

>> In your blake2s_arch() implementation, you're not passing in a
>> simd_context_t.  Is that still a work in progress?  I thought the plan
>> was to pass it in rather than doing the check in the _arch()
>> functions.
> 
> I'm inclined to do the explicit context passing only when a function
> is likely to be used in that kind of environment, and adjust as
> needed. Long term, anyway, that API will be removed once the x86 guys
> figure out lazy FPU restoration and the amortization doesn't add
> anything.

Fair enough.

> 
> Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-08  1:48               ` Andy Lutomirski
  2018-08-08  1:48                 ` Andy Lutomirski
@ 2018-08-08  1:51                 ` Jason A. Donenfeld
  2018-08-08  1:51                   ` Jason A. Donenfeld
  2018-08-09 18:08                   ` Andy Lutomirski
  1 sibling, 2 replies; 10+ messages in thread
From: Jason A. Donenfeld @ 2018-08-08  1:51 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

On Tue, Aug 7, 2018 at 6:49 PM Andy Lutomirski <luto@amacapital.net> wrote:
> I really wish we had a way to see that we use asm-generic’s copy of a header in all cases except where an arch opts out.

It's really not that hard to do -- symlink asm-generic to a target
called "asm" inside an otherwise empty directory, and add that
otherwise empty directory to the -I paths just after arch/include.
Since it's searched second, it's only used if the first fails. Maybe
I'm missing something though, as this seems a bit too obvious. Perhaps
a project for another day.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-08  1:51                 ` Jason A. Donenfeld
@ 2018-08-08  1:51                   ` Jason A. Donenfeld
  2018-08-09 18:08                   ` Andy Lutomirski
  1 sibling, 0 replies; 10+ messages in thread
From: Jason A. Donenfeld @ 2018-08-08  1:51 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

On Tue, Aug 7, 2018 at 6:49 PM Andy Lutomirski <luto@amacapital.net> wrote:
> I really wish we had a way to see that we use asm-generic’s copy of a header in all cases except where an arch opts out.

It's really not that hard to do -- symlink asm-generic to a target
called "asm" inside an otherwise empty directory, and add that
otherwise empty directory to the -I paths just after arch/include.
Since it's searched second, it's only used if the first fails. Maybe
I'm missing something though, as this seems a bit too obvious. Perhaps
a project for another day.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-08  1:51                 ` Jason A. Donenfeld
  2018-08-08  1:51                   ` Jason A. Donenfeld
@ 2018-08-09 18:08                   ` Andy Lutomirski
  2018-08-09 18:08                     ` Andy Lutomirski
  1 sibling, 1 reply; 10+ messages in thread
From: Andy Lutomirski @ 2018-08-09 18:08 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

On Tue, Aug 7, 2018 at 6:51 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> On Tue, Aug 7, 2018 at 6:49 PM Andy Lutomirski <luto@amacapital.net> wrote:
>> I really wish we had a way to see that we use asm-generic’s copy of a header in all cases except where an arch opts out.
>
> It's really not that hard to do -- symlink asm-generic to a target
> called "asm" inside an otherwise empty directory, and add that
> otherwise empty directory to the -I paths just after arch/include.
> Since it's searched second, it's only used if the first fails. Maybe
> I'm missing something though, as this seems a bit too obvious. Perhaps
> a project for another day.

The problem here (I think) is that it's preferable for stray files in
the kernel tree to have no effect and, with this scheme, stray files
in arch/*/include/asm could affect the build.  So something explicit
has an advantage.  I just think there should be way to say "this
asm-generic file should affect all arches unless they generic-n or
override-generic-y it or whatever".

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 2/3] zinc: Introduce minimal cryptography library
  2018-08-09 18:08                   ` Andy Lutomirski
@ 2018-08-09 18:08                     ` Andy Lutomirski
  0 siblings, 0 replies; 10+ messages in thread
From: Andy Lutomirski @ 2018-08-09 18:08 UTC (permalink / raw)
  To: Jason A. Donenfeld
  Cc: Ingo Molnar, Thomas Gleixner, linux-arch, Eric Biggers,
	Linux Crypto Mailing List, LKML, Netdev, David Miller,
	Andrew Lutomirski, Greg Kroah-Hartman, Samuel Neves,
	Daniel J . Bernstein, Tanja Lange, Jean-Philippe Aumasson,
	Karthikeyan Bhargavan

On Tue, Aug 7, 2018 at 6:51 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote:
> On Tue, Aug 7, 2018 at 6:49 PM Andy Lutomirski <luto@amacapital.net> wrote:
>> I really wish we had a way to see that we use asm-generic’s copy of a header in all cases except where an arch opts out.
>
> It's really not that hard to do -- symlink asm-generic to a target
> called "asm" inside an otherwise empty directory, and add that
> otherwise empty directory to the -I paths just after arch/include.
> Since it's searched second, it's only used if the first fails. Maybe
> I'm missing something though, as this seems a bit too obvious. Perhaps
> a project for another day.

The problem here (I think) is that it's preferable for stray files in
the kernel tree to have no effect and, with this scheme, stray files
in arch/*/include/asm could affect the build.  So something explicit
has an advantage.  I just think there should be way to say "this
asm-generic file should affect all arches unless they generic-n or
override-generic-y it or whatever".

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-08-09 20:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180801072246.GA15677@sol.localdomain>
     [not found] ` <CALCETrXD_VyoyW5C1U34o-ySJ4nFcO6PQ+ZNBVYxCpJ-f65CHw@mail.gmail.com>
     [not found]   ` <CAHmME9oThR-dE3gTW0UyqAGZO80qu19ktG4YTb4iL6CNpzNNaw@mail.gmail.com>
     [not found]     ` <CALCETrVziUpAU4nTaZ=t5ct=1jsWswWOy7KDNxXGPD1L=tMTGQ@mail.gmail.com>
     [not found]       ` <CAHmME9pt3PxKQmc8E-arA-W0p2tp9z_oJ-uXQwis3qD=Zvpnsg@mail.gmail.com>
     [not found]         ` <CAHmME9rA_nb9Le4VQhtcqCfNSuHpFjZVOV6=vE12FydJD9CmAQ@mail.gmail.com>
2018-08-07 19:43           ` [PATCH v1 2/3] zinc: Introduce minimal cryptography library Andy Lutomirski
2018-08-07 19:43             ` Andy Lutomirski
2018-08-07 23:48             ` Jason A. Donenfeld
2018-08-07 23:48               ` Jason A. Donenfeld
2018-08-08  1:48               ` Andy Lutomirski
2018-08-08  1:48                 ` Andy Lutomirski
2018-08-08  1:51                 ` Jason A. Donenfeld
2018-08-08  1:51                   ` Jason A. Donenfeld
2018-08-09 18:08                   ` Andy Lutomirski
2018-08-09 18:08                     ` Andy Lutomirski

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).