All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
@ 2022-08-25 17:00 Zixuan Tan
  2022-08-25 20:17 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: Zixuan Tan @ 2022-08-25 17:00 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, Zixuan Tan, linux-perf-users,
	linux-kernel

Switch to the flavored EVP API like in test-libcrypto.c, and remove the
bad gcc #pragma.

Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
test-libcrypto")
Signed-off-by: Zixuan Tan <tanzixuan.me@gmail.com>
---
 tools/perf/util/genelf.c | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c
index 953338b9e887..ed28a0dbcb7f 100644
--- a/tools/perf/util/genelf.c
+++ b/tools/perf/util/genelf.c
@@ -30,10 +30,6 @@

 #define BUILD_ID_URANDOM /* different uuid for each run */

-// FIXME, remove this and fix the deprecation warnings before its removed and
-// We'll break for good here...
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
 #ifdef HAVE_LIBCRYPTO_SUPPORT

 #define BUILD_ID_MD5
@@ -45,6 +41,7 @@
 #endif

 #ifdef BUILD_ID_MD5
+#include <openssl/evp.h>
 #include <openssl/md5.h>
 #endif
 #endif
@@ -142,15 +139,20 @@ gen_build_id(struct buildid_note *note,
 static void
 gen_build_id(struct buildid_note *note, unsigned long load_addr,
const void *code, size_t csize)
 {
-       MD5_CTX context;
+       EVP_MD_CTX *mdctx;

        if (sizeof(note->build_id) < 16)
                errx(1, "build_id too small for MD5");

-       MD5_Init(&context);
-       MD5_Update(&context, &load_addr, sizeof(load_addr));
-       MD5_Update(&context, code, csize);
-       MD5_Final((unsigned char *)note->build_id, &context);
+       mdctx = EVP_MD_CTX_new();
+       if (!mdctx)
+               errx(2, "failed to create EVP_MD_CTX");
+
+       EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
+       EVP_DigestUpdate(mdctx, &load_addr, sizeof(load_addr));
+       EVP_DigestUpdate(mdctx, code, csize);
+       EVP_DigestFinal_ex(mdctx, (unsigned char *)note->build_id, NULL);
+       EVP_MD_CTX_free(mdctx);
 }
 #endif

-- 
2.34.1

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

* Re: [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
  2022-08-25 17:00 [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API Zixuan Tan
@ 2022-08-25 20:17 ` Arnaldo Carvalho de Melo
  2022-08-26 17:21   ` Zixuan Tan
  0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-08-25 20:17 UTC (permalink / raw)
  To: Zixuan Tan
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, linux-perf-users, linux-kernel

Em Fri, Aug 26, 2022 at 01:00:58AM +0800, Zixuan Tan escreveu:
> Switch to the flavored EVP API like in test-libcrypto.c, and remove the
> bad gcc #pragma.
> 
> Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
> test-libcrypto")

How did you test the end result? Can you please describe step by step?

Also please consider adding a 'perf test' entry to make sure this
doesn't regress.

Thanks,

- Arnaldo

> Signed-off-by: Zixuan Tan <tanzixuan.me@gmail.com>
> ---
>  tools/perf/util/genelf.c | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c
> index 953338b9e887..ed28a0dbcb7f 100644
> --- a/tools/perf/util/genelf.c
> +++ b/tools/perf/util/genelf.c
> @@ -30,10 +30,6 @@
> 
>  #define BUILD_ID_URANDOM /* different uuid for each run */
> 
> -// FIXME, remove this and fix the deprecation warnings before its removed and
> -// We'll break for good here...
> -#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> -
>  #ifdef HAVE_LIBCRYPTO_SUPPORT
> 
>  #define BUILD_ID_MD5
> @@ -45,6 +41,7 @@
>  #endif
> 
>  #ifdef BUILD_ID_MD5
> +#include <openssl/evp.h>
>  #include <openssl/md5.h>
>  #endif
>  #endif
> @@ -142,15 +139,20 @@ gen_build_id(struct buildid_note *note,
>  static void
>  gen_build_id(struct buildid_note *note, unsigned long load_addr,
> const void *code, size_t csize)
>  {
> -       MD5_CTX context;
> +       EVP_MD_CTX *mdctx;
> 
>         if (sizeof(note->build_id) < 16)
>                 errx(1, "build_id too small for MD5");
> 
> -       MD5_Init(&context);
> -       MD5_Update(&context, &load_addr, sizeof(load_addr));
> -       MD5_Update(&context, code, csize);
> -       MD5_Final((unsigned char *)note->build_id, &context);
> +       mdctx = EVP_MD_CTX_new();
> +       if (!mdctx)
> +               errx(2, "failed to create EVP_MD_CTX");
> +
> +       EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
> +       EVP_DigestUpdate(mdctx, &load_addr, sizeof(load_addr));
> +       EVP_DigestUpdate(mdctx, code, csize);
> +       EVP_DigestFinal_ex(mdctx, (unsigned char *)note->build_id, NULL);
> +       EVP_MD_CTX_free(mdctx);
>  }
>  #endif
> 
> -- 
> 2.34.1

-- 

- Arnaldo

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

* Re: [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
  2022-08-25 20:17 ` Arnaldo Carvalho de Melo
@ 2022-08-26 17:21   ` Zixuan Tan
  2022-08-26 18:32     ` Namhyung Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Zixuan Tan @ 2022-08-26 17:21 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, Ingo Molnar, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim, linux-perf-users, linux-kernel

On Fri, Aug 26, 2022 at 4:17 AM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Em Fri, Aug 26, 2022 at 01:00:58AM +0800, Zixuan Tan escreveu:
> > Switch to the flavored EVP API like in test-libcrypto.c, and remove the
> > bad gcc #pragma.
> >
> > Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
> > test-libcrypto")
>
> How did you test the end result? Can you please describe step by step?
>
> Also please consider adding a 'perf test' entry to make sure this
> doesn't regress.

Sorry but I don't get what you mean, what results do I need to test?

These EVP_* APIs are just replacements for the deprecated MD5_* APIs in
openssl v3 [1][2]. With the same input, they produce the same MD5 digest.

And this patch just does the migration work for the upgrade and does not
change the logic of the code. so...what should I test?

Links:
[1] https://www.openssl.org/docs/man3.0/man3/MD5.html
[2] https://stackoverflow.com/questions/69806220/advice-needed-for-migration-of-low-level-openssl-api-to-high-level-openssl-apis

Thanks,
Zixuan

>
> Thanks,
>
> - Arnaldo
>
> > Signed-off-by: Zixuan Tan <tanzixuan.me@gmail.com>
> > ---
> >  tools/perf/util/genelf.c | 20 +++++++++++---------
> >  1 file changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/tools/perf/util/genelf.c b/tools/perf/util/genelf.c
> > index 953338b9e887..ed28a0dbcb7f 100644
> > --- a/tools/perf/util/genelf.c
> > +++ b/tools/perf/util/genelf.c
> > @@ -30,10 +30,6 @@
> >
> >  #define BUILD_ID_URANDOM /* different uuid for each run */
> >
> > -// FIXME, remove this and fix the deprecation warnings before its removed and
> > -// We'll break for good here...
> > -#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
> > -
> >  #ifdef HAVE_LIBCRYPTO_SUPPORT
> >
> >  #define BUILD_ID_MD5
> > @@ -45,6 +41,7 @@
> >  #endif
> >
> >  #ifdef BUILD_ID_MD5
> > +#include <openssl/evp.h>
> >  #include <openssl/md5.h>
> >  #endif
> >  #endif
> > @@ -142,15 +139,20 @@ gen_build_id(struct buildid_note *note,
> >  static void
> >  gen_build_id(struct buildid_note *note, unsigned long load_addr,
> > const void *code, size_t csize)
> >  {
> > -       MD5_CTX context;
> > +       EVP_MD_CTX *mdctx;
> >
> >         if (sizeof(note->build_id) < 16)
> >                 errx(1, "build_id too small for MD5");
> >
> > -       MD5_Init(&context);
> > -       MD5_Update(&context, &load_addr, sizeof(load_addr));
> > -       MD5_Update(&context, code, csize);
> > -       MD5_Final((unsigned char *)note->build_id, &context);
> > +       mdctx = EVP_MD_CTX_new();
> > +       if (!mdctx)
> > +               errx(2, "failed to create EVP_MD_CTX");
> > +
> > +       EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
> > +       EVP_DigestUpdate(mdctx, &load_addr, sizeof(load_addr));
> > +       EVP_DigestUpdate(mdctx, code, csize);
> > +       EVP_DigestFinal_ex(mdctx, (unsigned char *)note->build_id, NULL);
> > +       EVP_MD_CTX_free(mdctx);
> >  }
> >  #endif
> >
> > --
> > 2.34.1
>
> --
>
> - Arnaldo

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

* Re: [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
  2022-08-26 17:21   ` Zixuan Tan
@ 2022-08-26 18:32     ` Namhyung Kim
  2022-09-06  9:40       ` Zixuan Tan
  0 siblings, 1 reply; 7+ messages in thread
From: Namhyung Kim @ 2022-08-26 18:32 UTC (permalink / raw)
  To: Zixuan Tan
  Cc: Arnaldo Carvalho de Melo, Peter Zijlstra, Ingo Molnar,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, linux-perf-users,
	linux-kernel

Hello,

On Fri, Aug 26, 2022 at 10:22 AM Zixuan Tan <tanzixuan.me@gmail.com> wrote:
>
> On Fri, Aug 26, 2022 at 4:17 AM Arnaldo Carvalho de Melo
> <arnaldo.melo@gmail.com> wrote:
> >
> > Em Fri, Aug 26, 2022 at 01:00:58AM +0800, Zixuan Tan escreveu:
> > > Switch to the flavored EVP API like in test-libcrypto.c, and remove the
> > > bad gcc #pragma.
> > >
> > > Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
> > > test-libcrypto")
> >
> > How did you test the end result? Can you please describe step by step?
> >
> > Also please consider adding a 'perf test' entry to make sure this
> > doesn't regress.
>
> Sorry but I don't get what you mean, what results do I need to test?
>
> These EVP_* APIs are just replacements for the deprecated MD5_* APIs in
> openssl v3 [1][2]. With the same input, they produce the same MD5 digest.
>
> And this patch just does the migration work for the upgrade and does not
> change the logic of the code. so...what should I test?

Yeah, I understand that this merely changes the MD5 APIs.
While it's good to have a test case for the genelf code, I don't think
it belongs to this patch.  So,

Acked-by: Namhyung Kim <namhyung@kernel.org>


>
> Links:
> [1] https://www.openssl.org/docs/man3.0/man3/MD5.html
> [2] https://stackoverflow.com/questions/69806220/advice-needed-for-migration-of-low-level-openssl-api-to-high-level-openssl-apis

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

* Re: [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
  2022-08-26 18:32     ` Namhyung Kim
@ 2022-09-06  9:40       ` Zixuan Tan
  2022-09-06 12:33         ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: Zixuan Tan @ 2022-09-06  9:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Namhyung Kim, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, linux-perf-users, linux-kernel

Hi Arnaldo, are there any updates?

Thanks,
- Zixuan

On Sat, Aug 27, 2022 at 2:32 AM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hello,
>
> On Fri, Aug 26, 2022 at 10:22 AM Zixuan Tan <tanzixuan.me@gmail.com> wrote:
> >
> > On Fri, Aug 26, 2022 at 4:17 AM Arnaldo Carvalho de Melo
> > <arnaldo.melo@gmail.com> wrote:
> > >
> > > Em Fri, Aug 26, 2022 at 01:00:58AM +0800, Zixuan Tan escreveu:
> > > > Switch to the flavored EVP API like in test-libcrypto.c, and remove the
> > > > bad gcc #pragma.
> > > >
> > > > Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
> > > > test-libcrypto")
> > >
> > > How did you test the end result? Can you please describe step by step?
> > >
> > > Also please consider adding a 'perf test' entry to make sure this
> > > doesn't regress.
> >
> > Sorry but I don't get what you mean, what results do I need to test?
> >
> > These EVP_* APIs are just replacements for the deprecated MD5_* APIs in
> > openssl v3 [1][2]. With the same input, they produce the same MD5 digest.
> >
> > And this patch just does the migration work for the upgrade and does not
> > change the logic of the code. so...what should I test?
>
> Yeah, I understand that this merely changes the MD5 APIs.
> While it's good to have a test case for the genelf code, I don't think
> it belongs to this patch.  So,
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
>
>
> >
> > Links:
> > [1] https://www.openssl.org/docs/man3.0/man3/MD5.html
> > [2] https://stackoverflow.com/questions/69806220/advice-needed-for-migration-of-low-level-openssl-api-to-high-level-openssl-apis

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

* Re: [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
  2022-09-06  9:40       ` Zixuan Tan
@ 2022-09-06 12:33         ` Arnaldo Carvalho de Melo
  2022-09-06 12:38           ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-09-06 12:33 UTC (permalink / raw)
  To: Zixuan Tan
  Cc: Arnaldo Carvalho de Melo, Namhyung Kim, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	linux-perf-users, linux-kernel

Em Tue, Sep 06, 2022 at 05:40:24PM +0800, Zixuan Tan escreveu:
> Hi Arnaldo, are there any updates?

Trying to apply it manually:

⬢[acme@toolbox perf-urgent]$ am
Applying: perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
error: corrupt patch at line 31
Patch failed at 0001 perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
⬢[acme@toolbox perf-urgent]$ git am --abort
⬢[acme@toolbox perf-urgent]$
⬢[acme@toolbox perf-urgent]$ patch -p1 < ~/wb/1.patch
patching file tools/perf/util/genelf.c
patch: **** malformed patch at line 141: const void *code, size_t csize)

⬢[acme@toolbox perf-urgent]$

⬢[acme@toolbox perf-urgent]$ tail -30  ~/wb/1.patch
 #endif
@@ -142,15 +139,20 @@ gen_build_id(struct buildid_note *note,
 static void
 gen_build_id(struct buildid_note *note, unsigned long load_addr,
const void *code, size_t csize)
 {
-       MD5_CTX context;
+       EVP_MD_CTX *mdctx;

        if (sizeof(note->build_id) < 16)
                errx(1, "build_id too small for MD5");

-       MD5_Init(&context);
-       MD5_Update(&context, &load_addr, sizeof(load_addr));
-       MD5_Update(&context, code, csize);
-       MD5_Final((unsigned char *)note->build_id, &context);
+       mdctx = EVP_MD_CTX_new();
+       if (!mdctx)
+               errx(2, "failed to create EVP_MD_CTX");
+
+       EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
+       EVP_DigestUpdate(mdctx, &load_addr, sizeof(load_addr));
+       EVP_DigestUpdate(mdctx, code, csize);
+       EVP_DigestFinal_ex(mdctx, (unsigned char *)note->build_id, NULL);
+       EVP_MD_CTX_free(mdctx);
 }
 #endif

--
2.34.1
⬢[acme@toolbox perf-urgent]$
 
> Thanks,
> - Zixuan
> 
> On Sat, Aug 27, 2022 at 2:32 AM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > Hello,
> >
> > On Fri, Aug 26, 2022 at 10:22 AM Zixuan Tan <tanzixuan.me@gmail.com> wrote:
> > >
> > > On Fri, Aug 26, 2022 at 4:17 AM Arnaldo Carvalho de Melo
> > > <arnaldo.melo@gmail.com> wrote:
> > > >
> > > > Em Fri, Aug 26, 2022 at 01:00:58AM +0800, Zixuan Tan escreveu:
> > > > > Switch to the flavored EVP API like in test-libcrypto.c, and remove the
> > > > > bad gcc #pragma.
> > > > >
> > > > > Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
> > > > > test-libcrypto")
> > > >
> > > > How did you test the end result? Can you please describe step by step?
> > > >
> > > > Also please consider adding a 'perf test' entry to make sure this
> > > > doesn't regress.
> > >
> > > Sorry but I don't get what you mean, what results do I need to test?
> > >
> > > These EVP_* APIs are just replacements for the deprecated MD5_* APIs in
> > > openssl v3 [1][2]. With the same input, they produce the same MD5 digest.
> > >
> > > And this patch just does the migration work for the upgrade and does not
> > > change the logic of the code. so...what should I test?
> >
> > Yeah, I understand that this merely changes the MD5 APIs.
> > While it's good to have a test case for the genelf code, I don't think
> > it belongs to this patch.  So,
> >
> > Acked-by: Namhyung Kim <namhyung@kernel.org>
> >
> >
> > >
> > > Links:
> > > [1] https://www.openssl.org/docs/man3.0/man3/MD5.html
> > > [2] https://stackoverflow.com/questions/69806220/advice-needed-for-migration-of-low-level-openssl-api-to-high-level-openssl-apis

-- 

- Arnaldo

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

* Re: [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
  2022-09-06 12:33         ` Arnaldo Carvalho de Melo
@ 2022-09-06 12:38           ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2022-09-06 12:38 UTC (permalink / raw)
  To: Zixuan Tan
  Cc: Arnaldo Carvalho de Melo, Namhyung Kim, Peter Zijlstra,
	Ingo Molnar, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	linux-perf-users, linux-kernel

Em Tue, Sep 06, 2022 at 09:33:35AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Tue, Sep 06, 2022 at 05:40:24PM +0800, Zixuan Tan escreveu:
> > Hi Arnaldo, are there any updates?
> 
> Trying to apply it manually:

Done. Thanks.

- Arnaldo
 
> ⬢[acme@toolbox perf-urgent]$ am
> Applying: perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
> error: corrupt patch at line 31
> Patch failed at 0001 perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
> ⬢[acme@toolbox perf-urgent]$ git am --abort
> ⬢[acme@toolbox perf-urgent]$
> ⬢[acme@toolbox perf-urgent]$ patch -p1 < ~/wb/1.patch
> patching file tools/perf/util/genelf.c
> patch: **** malformed patch at line 141: const void *code, size_t csize)
> 
> ⬢[acme@toolbox perf-urgent]$
> 
> ⬢[acme@toolbox perf-urgent]$ tail -30  ~/wb/1.patch
>  #endif
> @@ -142,15 +139,20 @@ gen_build_id(struct buildid_note *note,
>  static void
>  gen_build_id(struct buildid_note *note, unsigned long load_addr,
> const void *code, size_t csize)
>  {
> -       MD5_CTX context;
> +       EVP_MD_CTX *mdctx;
> 
>         if (sizeof(note->build_id) < 16)
>                 errx(1, "build_id too small for MD5");
> 
> -       MD5_Init(&context);
> -       MD5_Update(&context, &load_addr, sizeof(load_addr));
> -       MD5_Update(&context, code, csize);
> -       MD5_Final((unsigned char *)note->build_id, &context);
> +       mdctx = EVP_MD_CTX_new();
> +       if (!mdctx)
> +               errx(2, "failed to create EVP_MD_CTX");
> +
> +       EVP_DigestInit_ex(mdctx, EVP_md5(), NULL);
> +       EVP_DigestUpdate(mdctx, &load_addr, sizeof(load_addr));
> +       EVP_DigestUpdate(mdctx, code, csize);
> +       EVP_DigestFinal_ex(mdctx, (unsigned char *)note->build_id, NULL);
> +       EVP_MD_CTX_free(mdctx);
>  }
>  #endif
> 
> --
> 2.34.1
> ⬢[acme@toolbox perf-urgent]$
>  
> > Thanks,
> > - Zixuan
> > 
> > On Sat, Aug 27, 2022 at 2:32 AM Namhyung Kim <namhyung@kernel.org> wrote:
> > >
> > > Hello,
> > >
> > > On Fri, Aug 26, 2022 at 10:22 AM Zixuan Tan <tanzixuan.me@gmail.com> wrote:
> > > >
> > > > On Fri, Aug 26, 2022 at 4:17 AM Arnaldo Carvalho de Melo
> > > > <arnaldo.melo@gmail.com> wrote:
> > > > >
> > > > > Em Fri, Aug 26, 2022 at 01:00:58AM +0800, Zixuan Tan escreveu:
> > > > > > Switch to the flavored EVP API like in test-libcrypto.c, and remove the
> > > > > > bad gcc #pragma.
> > > > > >
> > > > > > Inspired-By: 5b245985a6de ("tools build: Switch to new openssl API for
> > > > > > test-libcrypto")
> > > > >
> > > > > How did you test the end result? Can you please describe step by step?
> > > > >
> > > > > Also please consider adding a 'perf test' entry to make sure this
> > > > > doesn't regress.
> > > >
> > > > Sorry but I don't get what you mean, what results do I need to test?
> > > >
> > > > These EVP_* APIs are just replacements for the deprecated MD5_* APIs in
> > > > openssl v3 [1][2]. With the same input, they produce the same MD5 digest.
> > > >
> > > > And this patch just does the migration work for the upgrade and does not
> > > > change the logic of the code. so...what should I test?
> > >
> > > Yeah, I understand that this merely changes the MD5 APIs.
> > > While it's good to have a test case for the genelf code, I don't think
> > > it belongs to this patch.  So,
> > >
> > > Acked-by: Namhyung Kim <namhyung@kernel.org>
> > >
> > >
> > > >
> > > > Links:
> > > > [1] https://www.openssl.org/docs/man3.0/man3/MD5.html
> > > > [2] https://stackoverflow.com/questions/69806220/advice-needed-for-migration-of-low-level-openssl-api-to-high-level-openssl-apis
> 
> -- 
> 
> - Arnaldo

-- 

- Arnaldo

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

end of thread, other threads:[~2022-09-06 12:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 17:00 [PATCH] perf/genelf: Switch deprecated openssl MD5_* functions to new EVP API Zixuan Tan
2022-08-25 20:17 ` Arnaldo Carvalho de Melo
2022-08-26 17:21   ` Zixuan Tan
2022-08-26 18:32     ` Namhyung Kim
2022-09-06  9:40       ` Zixuan Tan
2022-09-06 12:33         ` Arnaldo Carvalho de Melo
2022-09-06 12:38           ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.