Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Ard Biesheuvel
On Thu, 16 Jul 2020 at 17:56, Marcelo Henrique Cerri wrote: > > On Thu, Jul 16, 2020 at 05:37:32PM +0300, Ard Biesheuvel wrote: > > On Thu, 16 Jul 2020 at 17:23, Marcelo Henrique Cerri > > wrote: > > > > > > On Thu, Jul 16, 2020 at 04:53:24PM +0300, Ard Biesheuvel wrote: > > > > On Thu, 16 Jul 20

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Marcelo Henrique Cerri
On Thu, Jul 16, 2020 at 05:37:32PM +0300, Ard Biesheuvel wrote: > On Thu, 16 Jul 2020 at 17:23, Marcelo Henrique Cerri > wrote: > > > > On Thu, Jul 16, 2020 at 04:53:24PM +0300, Ard Biesheuvel wrote: > > > On Thu, 16 Jul 2020 at 16:41, Marcelo Henrique Cerri > > > wrote: > > > > > > > > On Thu, J

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Ard Biesheuvel
On Thu, 16 Jul 2020 at 17:23, Marcelo Henrique Cerri wrote: > > On Thu, Jul 16, 2020 at 04:53:24PM +0300, Ard Biesheuvel wrote: > > On Thu, 16 Jul 2020 at 16:41, Marcelo Henrique Cerri > > wrote: > > > > > > On Thu, Jul 16, 2020 at 04:09:39PM +0300, Ard Biesheuvel wrote: > > > > On Thu, 16 Jul 20

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Marcelo Henrique Cerri
On Thu, Jul 16, 2020 at 04:53:24PM +0300, Ard Biesheuvel wrote: > On Thu, 16 Jul 2020 at 16:41, Marcelo Henrique Cerri > wrote: > > > > On Thu, Jul 16, 2020 at 04:09:39PM +0300, Ard Biesheuvel wrote: > > > On Thu, 16 Jul 2020 at 15:50, Marcelo Henrique Cerri > > > wrote: > > > > > > > > No. The c

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Ard Biesheuvel
On Thu, 16 Jul 2020 at 16:41, Marcelo Henrique Cerri wrote: > > On Thu, Jul 16, 2020 at 04:09:39PM +0300, Ard Biesheuvel wrote: > > On Thu, 16 Jul 2020 at 15:50, Marcelo Henrique Cerri > > wrote: > > > > > > No. The code is really based on Gnu MP. I used the header from > > > lib/mpi/mpi-pow.c as

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Marcelo Henrique Cerri
On Thu, Jul 16, 2020 at 04:09:39PM +0300, Ard Biesheuvel wrote: > On Thu, 16 Jul 2020 at 15:50, Marcelo Henrique Cerri > wrote: > > > > No. The code is really based on Gnu MP. I used the header from > > lib/mpi/mpi-pow.c as reference and that's source of the mention to > > GnuPG that went unnotice

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Ard Biesheuvel
On Thu, 16 Jul 2020 at 15:50, Marcelo Henrique Cerri wrote: > > No. The code is really based on Gnu MP. I used the header from > lib/mpi/mpi-pow.c as reference and that's source of the mention to > GnuPG that went unnoticed by me. > So where did the file lib/mpi/mpi-sub-ui.c come from? From GnuPG

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Marcelo Henrique Cerri
No. The code is really based on Gnu MP. I used the header from lib/mpi/mpi-pow.c as reference and that's source of the mention to GnuPG that went unnoticed by me. You can find the original Gnu MP source that I used as reference in the file gmp-6.2.0/mpz/aors_ui.h from: https://gmplib.org/download

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Ard Biesheuvel
On Thu, 16 Jul 2020 at 10:30, Herbert Xu wrote: > > On Sun, Jul 12, 2020 at 06:39:54PM +0200, Stephan Müller wrote: > > > > diff --git a/lib/mpi/mpi-sub-ui.c b/lib/mpi/mpi-sub-ui.c > > new file mode 100644 > > index ..fa6b085bac36 > > --- /dev/null > > +++ b/lib/mpi/mpi-sub-ui.c > > @@

Re: [PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-16 Thread Herbert Xu
On Sun, Jul 12, 2020 at 06:39:54PM +0200, Stephan Müller wrote: > > diff --git a/lib/mpi/mpi-sub-ui.c b/lib/mpi/mpi-sub-ui.c > new file mode 100644 > index ..fa6b085bac36 > --- /dev/null > +++ b/lib/mpi/mpi-sub-ui.c > @@ -0,0 +1,60 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/

[PATCH v2 2/5] lib/mpi: Add mpi_sub_ui()

2020-07-12 Thread Stephan Müller
Add mpi_sub_ui() based on Gnu MP mpz_sub_ui() from mpz/aors_ui.h adapting the code to the kernel's structures and coding style and also removing the defines used to produce mpz_sub_ui() and mpz_add_ui() from the same code. Signed-off-by: Marcelo Henrique Cerri Signed-off-by: Stephan Mueller ---