patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] drivers: fix symbol exports when map is omitted
@ 2022-11-29 14:00 David Marchand
  2022-11-29 18:23 ` Ferruh Yigit
                   ` (3 more replies)
  0 siblings, 4 replies; 29+ messages in thread
From: David Marchand @ 2022-11-29 14:00 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, stable, Luca Boccassi, Bruce Richardson,
	Abdullah Ömer Yamaç

ld exports any global symbol by default if no version script is passed.
As a consequence, the incriminated change let any public symbol leak
out of the driver shared libraries.

Hide again those symbols by providing a default map file which
unexports any global symbol using a local: * catchall statement.

The check on symbols is skipped for this default map file as it is
intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch
empty symbol maps")) and there is nothing to check in it.

While at it, move Windows specific objects where needed for better
readability.

Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <luca.boccassi@microsoft.com> 
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/meson.build | 70 ++++++++++++++++++++++++---------------------
 drivers/version.map |  3 ++
 2 files changed, 41 insertions(+), 32 deletions(-)
 create mode 100644 drivers/version.map

diff --git a/drivers/meson.build b/drivers/meson.build
index c4ff3ff1ba..77e92c3bce 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -206,44 +206,50 @@ foreach subpath:subdirs
 
         # now build the shared driver
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
-        implib = 'lib' + lib_name + '.dll.a'
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]
+        else
+            lk_deps += [version_map]
+            if not is_windows and developer_mode
+                # on unix systems check the output of the
+                # check-symbols.sh script, using it as a
+                # dependency of the .so build
+                lk_deps += custom_target(lib_name + '.sym_chk',
+                        command: [check_symbols, version_map, '@INPUT@'],
+                        capture: true,
+                        input: static_lib,
+                        output: lib_name + '.sym_chk')
+            endif
+        endif
+
+        if is_windows
+            if is_ms_linker
+                def_file = custom_target(lib_name + '_def',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_exports.def'.format(lib_name))
+                lk_deps += def_file
+
+                lk_args = ['-Wl,/def:' + def_file.full_path()]
+                if meson.version().version_compare('<0.54.0')
+                    implib = 'lib' + lib_name + '.dll.a'
+                    lk_args += ['-Wl,/implib:drivers\\' + implib]
                 endif
             else
-                lk_args = ['-Wl,--version-script=' + version_map]
-                if developer_mode
-                    # on unix systems check the output of the
-                    # check-symbols.sh script, using it as a
-                    # dependency of the .so build
-                    lk_deps += custom_target(lib_name + '.sym_chk',
-                            command: [check_symbols, version_map, '@INPUT@'],
-                            capture: true,
-                            input: static_lib,
-                            output: lib_name + '.sym_chk')
-                endif
+                mingw_map = custom_target(lib_name + '_mingw',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_mingw.map'.format(lib_name))
+                lk_deps += [mingw_map]
+
+                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
+        else
+            lk_args = ['-Wl,--version-script=' + version_map]
         endif
 
         shared_lib = shared_library(lib_name, sources,
diff --git a/drivers/version.map b/drivers/version.map
new file mode 100644
index 0000000000..78c3585d7c
--- /dev/null
+++ b/drivers/version.map
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
-- 
2.38.1


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

* Re: [PATCH] drivers: fix symbol exports when map is omitted
  2022-11-29 14:00 [PATCH] drivers: fix symbol exports when map is omitted David Marchand
@ 2022-11-29 18:23 ` Ferruh Yigit
  2022-11-30  7:13   ` David Marchand
  2022-12-02  0:11   ` Tyler Retzlaff
  2022-11-30 10:02 ` [PATCH v2] " David Marchand
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 29+ messages in thread
From: Ferruh Yigit @ 2022-11-29 18:23 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: stable, Luca Boccassi, Bruce Richardson, Abdullah Ömer Yamaç

On 11/29/2022 2:00 PM, David Marchand wrote:
> ld exports any global symbol by default if no version script is passed.
> As a consequence, the incriminated change let any public symbol leak
> out of the driver shared libraries.
> 
> Hide again those symbols by providing a default map file which
> unexports any global symbol using a local: * catchall statement.
> 

I assume this will cause warnings for ABI check scripts, how can we
prevent the warnings?

> The check on symbols is skipped for this default map file as it is
> intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch
> empty symbol maps")) and there is nothing to check in it.
> 

How it is skipped, './devtools/check-symbol-maps.sh' still complains
about 'drivers/version.map' for me.

> While at it, move Windows specific objects where needed for better
> readability.
> 

+1

> Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> Cc: stable@dpdk.org
> 
> Reported-by: Luca Boccassi <luca.boccassi@microsoft.com> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>


Not tested on Windows, but for Linux:
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>


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

* Re: [PATCH] drivers: fix symbol exports when map is omitted
  2022-11-29 18:23 ` Ferruh Yigit
@ 2022-11-30  7:13   ` David Marchand
  2022-11-30  8:27     ` David Marchand
  2022-12-02  0:11   ` Tyler Retzlaff
  1 sibling, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-11-30  7:13 UTC (permalink / raw)
  To: Ferruh Yigit, Thomas Monjalon
  Cc: dev, stable, Luca Boccassi, Bruce Richardson,
	Abdullah Ömer Yamaç

On Tue, Nov 29, 2022 at 7:23 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 11/29/2022 2:00 PM, David Marchand wrote:
> > ld exports any global symbol by default if no version script is passed.
> > As a consequence, the incriminated change let any public symbol leak
> > out of the driver shared libraries.
> >
> > Hide again those symbols by providing a default map file which
> > unexports any global symbol using a local: * catchall statement.
> >
>
> I assume this will cause warnings for ABI check scripts, how can we
> prevent the warnings?

Indeed.

Some options:
- add exhaustive suppression rules in devtools/libabigail.abignore,
- retag the v22.11 release with this fix, but we already announced it
and people started downloading the tarball,
- release a .1 version and compare ABI against it (either in the main
repo, or in the 22.11 stable branch, through for the ABI check in GHA,
it would be simpler to have the tag in the main repo..),

Do you have other ideas?


>
> > The check on symbols is skipped for this default map file as it is
> > intentionnally an empty map (see commit b67bdda86cd4 ("devtools: catch
> > empty symbol maps")) and there is nothing to check in it.
> >
>
> How it is skipped, './devtools/check-symbol-maps.sh' still complains
> about 'drivers/version.map' for me.

I had considered the call check-symbols.sh during build.
But it is true that if you call check-symbol-maps.sh alone, we will
get a warning.

I will exclude it in v2.


>
> > While at it, move Windows specific objects where needed for better
> > readability.
> >
>
> +1
>
> > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
>
> Not tested on Windows, but for Linux:
> Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>

UNH Windows tests look fine.


-- 
David Marchand


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

* Re: [PATCH] drivers: fix symbol exports when map is omitted
  2022-11-30  7:13   ` David Marchand
@ 2022-11-30  8:27     ` David Marchand
  2022-11-30  9:19       ` Ferruh Yigit
  0 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-11-30  8:27 UTC (permalink / raw)
  To: Ferruh Yigit, Thomas Monjalon
  Cc: dev, stable, Luca Boccassi, Bruce Richardson,
	Abdullah Ömer Yamaç

On Wed, Nov 30, 2022 at 8:13 AM David Marchand
<david.marchand@redhat.com> wrote:
> > I assume this will cause warnings for ABI check scripts, how can we
> > prevent the warnings?
>
> Indeed.
>
> Some options:
> - add exhaustive suppression rules in devtools/libabigail.abignore,
> - retag the v22.11 release with this fix, but we already announced it
> and people started downloading the tarball,
> - release a .1 version and compare ABI against it (either in the main
> repo, or in the 22.11 stable branch, through for the ABI check in GHA,
> it would be simpler to have the tag in the main repo..),

(let's forget about my concern on GHA, we have the REF_GIT_REPO param,
so we can point at the dpdk-stable repo, and go with a "normal"
release in 22.11 stable branch)

>
> Do you have other ideas?
>


-- 
David Marchand


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

* Re: [PATCH] drivers: fix symbol exports when map is omitted
  2022-11-30  8:27     ` David Marchand
@ 2022-11-30  9:19       ` Ferruh Yigit
  0 siblings, 0 replies; 29+ messages in thread
From: Ferruh Yigit @ 2022-11-30  9:19 UTC (permalink / raw)
  To: David Marchand, Thomas Monjalon
  Cc: dev, stable, Luca Boccassi, Bruce Richardson,
	Abdullah Ömer Yamaç

On 11/30/2022 8:27 AM, David Marchand wrote:
> On Wed, Nov 30, 2022 at 8:13 AM David Marchand
> <david.marchand@redhat.com> wrote:
>>> I assume this will cause warnings for ABI check scripts, how can we
>>> prevent the warnings?
>>
>> Indeed.
>>
>> Some options:
>> - add exhaustive suppression rules in devtools/libabigail.abignore,
>> - retag the v22.11 release with this fix, but we already announced it
>> and people started downloading the tarball,
>> - release a .1 version and compare ABI against it (either in the main
>> repo, or in the 22.11 stable branch, through for the ABI check in GHA,
>> it would be simpler to have the tag in the main repo..),
> 
> (let's forget about my concern on GHA, we have the REF_GIT_REPO param,
> so we can point at the dpdk-stable repo, and go with a "normal"
> release in 22.11 stable branch)
> 

OK to have v22.11.1 stable release with this fix.

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

* [PATCH v2] drivers: fix symbol exports when map is omitted
  2022-11-29 14:00 [PATCH] drivers: fix symbol exports when map is omitted David Marchand
  2022-11-29 18:23 ` Ferruh Yigit
@ 2022-11-30 10:02 ` David Marchand
  2022-11-30 10:44   ` Ferruh Yigit
  2022-12-01 10:08 ` [PATCH v3 1/2] " David Marchand
  2022-12-02 11:09 ` [PATCH v4 " David Marchand
  3 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-11-30 10:02 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, stable, Luca Boccassi, Thomas Monjalon,
	Bruce Richardson, Abdullah Ömer Yamaç

ld exports any global symbol by default if no version script is passed.
As a consequence, the incriminated change let any public symbol leak
out of the driver shared libraries.

Hide again those symbols by providing a default map file which
unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally
an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
maps")) and there is nothing else to check in this map.

While at it, move Windows specific objects where needed for better
readability.

Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Changes since v1:
- excluded drivers/version.map from maps checked by default in
  check-symbol-maps.sh,

---
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 70 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 3 files changed, 42 insertions(+), 33 deletions(-)
 create mode 100644 drivers/version.map

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 0a6062de26..8c116bfa9c 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
diff --git a/drivers/meson.build b/drivers/meson.build
index c4ff3ff1ba..77e92c3bce 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -206,44 +206,50 @@ foreach subpath:subdirs
 
         # now build the shared driver
         version_map = '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path)
-        implib = 'lib' + lib_name + '.dll.a'
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]
+        else
+            lk_deps += [version_map]
+            if not is_windows and developer_mode
+                # on unix systems check the output of the
+                # check-symbols.sh script, using it as a
+                # dependency of the .so build
+                lk_deps += custom_target(lib_name + '.sym_chk',
+                        command: [check_symbols, version_map, '@INPUT@'],
+                        capture: true,
+                        input: static_lib,
+                        output: lib_name + '.sym_chk')
+            endif
+        endif
+
+        if is_windows
+            if is_ms_linker
+                def_file = custom_target(lib_name + '_def',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_exports.def'.format(lib_name))
+                lk_deps += def_file
+
+                lk_args = ['-Wl,/def:' + def_file.full_path()]
+                if meson.version().version_compare('<0.54.0')
+                    implib = 'lib' + lib_name + '.dll.a'
+                    lk_args += ['-Wl,/implib:drivers\\' + implib]
                 endif
             else
-                lk_args = ['-Wl,--version-script=' + version_map]
-                if developer_mode
-                    # on unix systems check the output of the
-                    # check-symbols.sh script, using it as a
-                    # dependency of the .so build
-                    lk_deps += custom_target(lib_name + '.sym_chk',
-                            command: [check_symbols, version_map, '@INPUT@'],
-                            capture: true,
-                            input: static_lib,
-                            output: lib_name + '.sym_chk')
-                endif
+                mingw_map = custom_target(lib_name + '_mingw',
+                        command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                        input: version_map,
+                        output: '@0@_mingw.map'.format(lib_name))
+                lk_deps += [mingw_map]
+
+                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
+        else
+            lk_args = ['-Wl,--version-script=' + version_map]
         endif
 
         shared_lib = shared_library(lib_name, sources,
diff --git a/drivers/version.map b/drivers/version.map
new file mode 100644
index 0000000000..78c3585d7c
--- /dev/null
+++ b/drivers/version.map
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
-- 
2.38.1


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

* Re: [PATCH v2] drivers: fix symbol exports when map is omitted
  2022-11-30 10:02 ` [PATCH v2] " David Marchand
@ 2022-11-30 10:44   ` Ferruh Yigit
  2022-11-30 15:02     ` David Marchand
  0 siblings, 1 reply; 29+ messages in thread
From: Ferruh Yigit @ 2022-11-30 10:44 UTC (permalink / raw)
  To: David Marchand, dev
  Cc: stable, Luca Boccassi, Thomas Monjalon, Bruce Richardson,
	Abdullah Ömer Yamaç

On 11/30/2022 10:02 AM, David Marchand wrote:
> ld exports any global symbol by default if no version script is passed.
> As a consequence, the incriminated change let any public symbol leak
> out of the driver shared libraries.
> 
> Hide again those symbols by providing a default map file which
> unexports any global symbol using a local: * catch-all statement.
> 
> The checks are skipped for this default map file as it is intentionnally
> an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> maps")) and there is nothing else to check in this map.
> 
> While at it, move Windows specific objects where needed for better
> readability.
> 
> Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> Cc: stable@dpdk.org
> 
> Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>

Tested v2, looks good.
'check-symbol-maps.sh' warning fixed too.

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

* Re: [PATCH v2] drivers: fix symbol exports when map is omitted
  2022-11-30 10:44   ` Ferruh Yigit
@ 2022-11-30 15:02     ` David Marchand
  2022-11-30 15:24       ` David Marchand
  2022-11-30 15:42       ` Bruce Richardson
  0 siblings, 2 replies; 29+ messages in thread
From: David Marchand @ 2022-11-30 15:02 UTC (permalink / raw)
  To: Ferruh Yigit, Luca Boccassi, Bruce Richardson
  Cc: dev, stable, Thomas Monjalon, Abdullah Ömer Yamaç

On Wed, Nov 30, 2022 at 11:44 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>
> On 11/30/2022 10:02 AM, David Marchand wrote:
> > ld exports any global symbol by default if no version script is passed.
> > As a consequence, the incriminated change let any public symbol leak
> > out of the driver shared libraries.
> >
> > Hide again those symbols by providing a default map file which
> > unexports any global symbol using a local: * catch-all statement.
> >
> > The checks are skipped for this default map file as it is intentionnally
> > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > maps")) and there is nothing else to check in this map.
> >
> > While at it, move Windows specific objects where needed for better
> > readability.
> >
> > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
>
> Tested v2, looks good.
> 'check-symbol-maps.sh' warning fixed too.

Thanks Ferruh.

Bruce / Luca, could you review / confirm it is ok for you?


-- 
David Marchand


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

* Re: [PATCH v2] drivers: fix symbol exports when map is omitted
  2022-11-30 15:02     ` David Marchand
@ 2022-11-30 15:24       ` David Marchand
  2022-11-30 15:42       ` Bruce Richardson
  1 sibling, 0 replies; 29+ messages in thread
From: David Marchand @ 2022-11-30 15:24 UTC (permalink / raw)
  To: Luca Boccassi
  Cc: dev, stable, Thomas Monjalon, Abdullah Ömer Yamaç,
	Ferruh Yigit, Bruce Richardson

On Wed, Nov 30, 2022 at 4:02 PM David Marchand
<david.marchand@redhat.com> wrote:
> On Wed, Nov 30, 2022 at 11:44 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> >
> > On 11/30/2022 10:02 AM, David Marchand wrote:
> > > ld exports any global symbol by default if no version script is passed.
> > > As a consequence, the incriminated change let any public symbol leak
> > > out of the driver shared libraries.
> > >
> > > Hide again those symbols by providing a default map file which
> > > unexports any global symbol using a local: * catch-all statement.
> > >
> > > The checks are skipped for this default map file as it is intentionnally
> > > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > > maps")) and there is nothing else to check in this map.
> > >
> > > While at it, move Windows specific objects where needed for better
> > > readability.
> > >
> > > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> >
> > Tested v2, looks good.
> > 'check-symbol-maps.sh' warning fixed too.
>
> Thanks Ferruh.
>
> Bruce / Luca, could you review / confirm it is ok for you?

Additionnally, Luca, could you describe how you caught the issue?
Could we enhance the CI to catch this earlier?


-- 
David Marchand


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

* Re: [PATCH v2] drivers: fix symbol exports when map is omitted
  2022-11-30 15:02     ` David Marchand
  2022-11-30 15:24       ` David Marchand
@ 2022-11-30 15:42       ` Bruce Richardson
  2022-12-01 10:11         ` David Marchand
  1 sibling, 1 reply; 29+ messages in thread
From: Bruce Richardson @ 2022-11-30 15:42 UTC (permalink / raw)
  To: David Marchand
  Cc: Ferruh Yigit, Luca Boccassi, dev, stable, Thomas Monjalon,
	Abdullah Ömer Yamaç

On Wed, Nov 30, 2022 at 04:02:26PM +0100, David Marchand wrote:
> On Wed, Nov 30, 2022 at 11:44 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> >
> > On 11/30/2022 10:02 AM, David Marchand wrote:
> > > ld exports any global symbol by default if no version script is passed.
> > > As a consequence, the incriminated change let any public symbol leak
> > > out of the driver shared libraries.
> > >
> > > Hide again those symbols by providing a default map file which
> > > unexports any global symbol using a local: * catch-all statement.
> > >
> > > The checks are skipped for this default map file as it is intentionnally
> > > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > > maps")) and there is nothing else to check in this map.
> > >
> > > While at it, move Windows specific objects where needed for better
> > > readability.
> > >
> > > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> >
> > Tested v2, looks good.
> > 'check-symbol-maps.sh' warning fixed too.
> 
> Thanks Ferruh.
> 
> Bruce / Luca, could you review / confirm it is ok for you?
> 
LGTM, thanks.

/Bruce

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

* [PATCH v3 1/2] drivers: fix symbol exports when map is omitted
  2022-11-29 14:00 [PATCH] drivers: fix symbol exports when map is omitted David Marchand
  2022-11-29 18:23 ` Ferruh Yigit
  2022-11-30 10:02 ` [PATCH v2] " David Marchand
@ 2022-12-01 10:08 ` David Marchand
  2022-12-01 10:55   ` Bruce Richardson
  2022-12-02 11:09 ` [PATCH v4 " David Marchand
  3 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-12-01 10:08 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, stable, Luca Boccassi, Thomas Monjalon,
	Bruce Richardson, Abdullah Ömer Yamaç

ld exports any global symbol by default if no version script is passed.
As a consequence, the incriminated change let any public symbol leak
out of the driver shared libraries.

Hide again those symbols by providing a default map file which
unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally
an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
maps")) and there is nothing else to check in this map.

Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
---
Changes since v2:
- separated the Windows cleanup in next patch,

Changes since v1:
- excluded drivers/version.map from maps checked by default in
  check-symbol-maps.sh,

---
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 68 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 3 files changed, 41 insertions(+), 32 deletions(-)
 create mode 100644 drivers/version.map

diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 0a6062de26..8c116bfa9c 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
diff --git a/drivers/meson.build b/drivers/meson.build
index c4ff3ff1ba..5188302057 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -210,40 +210,46 @@ foreach subpath:subdirs
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]
+        else
+            lk_deps += [version_map]
+            if not is_windows and developer_mode
+                # on unix systems check the output of the
+                # check-symbols.sh script, using it as a
+                # dependency of the .so build
+                lk_deps += custom_target(lib_name + '.sym_chk',
+                        command: [check_symbols, version_map, '@INPUT@'],
+                        capture: true,
+                        input: static_lib,
+                        output: lib_name + '.sym_chk')
+            endif
+        endif
+
+        def_file = custom_target(lib_name + '_def',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_exports.def'.format(lib_name))
+
+        mingw_map = custom_target(lib_name + '_mingw',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_mingw.map'.format(lib_name))
+
+        lk_deps += [def_file, mingw_map]
+
+        if is_windows
+            if is_ms_linker
+                lk_args = ['-Wl,/def:' + def_file.full_path()]
+                if meson.version().version_compare('<0.54.0')
+                    lk_args += ['-Wl,/implib:drivers\\' + implib]
                 endif
             else
-                lk_args = ['-Wl,--version-script=' + version_map]
-                if developer_mode
-                    # on unix systems check the output of the
-                    # check-symbols.sh script, using it as a
-                    # dependency of the .so build
-                    lk_deps += custom_target(lib_name + '.sym_chk',
-                            command: [check_symbols, version_map, '@INPUT@'],
-                            capture: true,
-                            input: static_lib,
-                            output: lib_name + '.sym_chk')
-                endif
+                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
+        else
+            lk_args = ['-Wl,--version-script=' + version_map]
         endif
 
         shared_lib = shared_library(lib_name, sources,
diff --git a/drivers/version.map b/drivers/version.map
new file mode 100644
index 0000000000..78c3585d7c
--- /dev/null
+++ b/drivers/version.map
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
-- 
2.38.1


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

* Re: [PATCH v2] drivers: fix symbol exports when map is omitted
  2022-11-30 15:42       ` Bruce Richardson
@ 2022-12-01 10:11         ` David Marchand
  0 siblings, 0 replies; 29+ messages in thread
From: David Marchand @ 2022-12-01 10:11 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: Ferruh Yigit, Luca Boccassi, dev, stable, Thomas Monjalon,
	Abdullah Ömer Yamaç

On Wed, Nov 30, 2022 at 4:42 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, Nov 30, 2022 at 04:02:26PM +0100, David Marchand wrote:
> > On Wed, Nov 30, 2022 at 11:44 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> > >
> > > On 11/30/2022 10:02 AM, David Marchand wrote:
> > > > ld exports any global symbol by default if no version script is passed.
> > > > As a consequence, the incriminated change let any public symbol leak
> > > > out of the driver shared libraries.
> > > >
> > > > Hide again those symbols by providing a default map file which
> > > > unexports any global symbol using a local: * catch-all statement.
> > > >
> > > > The checks are skipped for this default map file as it is intentionnally
> > > > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > > > maps")) and there is nothing else to check in this map.
> > > >
> > > > While at it, move Windows specific objects where needed for better
> > > > readability.
> > > >
> > > > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > >
> > > Tested v2, looks good.
> > > 'check-symbol-maps.sh' warning fixed too.
> >
> > Thanks Ferruh.
> >
> > Bruce / Luca, could you review / confirm it is ok for you?
> >
> LGTM, thanks.

Thanks Bruce.

I prefer to separate the "cosmetic" part around Windows (and fix
lib/meson.build too), so I sent a v3 series with only the first patch
marked as backport.


-- 
David Marchand


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

* Re: [PATCH v3 1/2] drivers: fix symbol exports when map is omitted
  2022-12-01 10:08 ` [PATCH v3 1/2] " David Marchand
@ 2022-12-01 10:55   ` Bruce Richardson
  2022-12-02 10:01     ` David Marchand
  0 siblings, 1 reply; 29+ messages in thread
From: Bruce Richardson @ 2022-12-01 10:55 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, ferruh.yigit, stable, Luca Boccassi, Thomas Monjalon,
	Abdullah Ömer Yamaç

On Thu, Dec 01, 2022 at 11:08:46AM +0100, David Marchand wrote:
> ld exports any global symbol by default if no version script is passed.
> As a consequence, the incriminated change let any public symbol leak
> out of the driver shared libraries.
> 
> Hide again those symbols by providing a default map file which
> unexports any global symbol using a local: * catch-all statement.
> 
> The checks are skipped for this default map file as it is intentionnally
> an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> maps")) and there is nothing else to check in this map.
> 
> Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> Cc: stable@dpdk.org
> 
> Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> ---
> Changes since v2:
> - separated the Windows cleanup in next patch,
> 
> Changes since v1:
> - excluded drivers/version.map from maps checked by default in
>   check-symbol-maps.sh,
> 
> ---
>  devtools/check-symbol-maps.sh |  2 +-
>  drivers/meson.build           | 68 +++++++++++++++++++----------------
>  drivers/version.map           |  3 ++
>  3 files changed, 41 insertions(+), 32 deletions(-)
>  create mode 100644 drivers/version.map
> 
> diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
> index 0a6062de26..8c116bfa9c 100755
> --- a/devtools/check-symbol-maps.sh
> +++ b/devtools/check-symbol-maps.sh
> @@ -8,7 +8,7 @@ cd $(dirname $0)/..
>  export LC_ALL=C
>  
>  if [ $# = 0 ] ; then
> -    set -- $(find lib drivers -name '*.map')
> +    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
>  fi
>  
>  ret=0
> diff --git a/drivers/meson.build b/drivers/meson.build
> index c4ff3ff1ba..5188302057 100644
> --- a/drivers/meson.build
> +++ b/drivers/meson.build
> @@ -210,40 +210,46 @@ foreach subpath:subdirs
>  
>          lk_deps = []
>          lk_args = []
> -        if fs.is_file(version_map)
> -            def_file = custom_target(lib_name + '_def',
> -                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
> -                    input: version_map,
> -                    output: '@0@_exports.def'.format(lib_name))
> -
> -            mingw_map = custom_target(lib_name + '_mingw',
> -                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
> -                    input: version_map,
> -                    output: '@0@_mingw.map'.format(lib_name))
> -
> -            lk_deps = [version_map, def_file, mingw_map]
> -            if is_windows
> -                if is_ms_linker
> -                    lk_args = ['-Wl,/def:' + def_file.full_path()]
> -                    if meson.version().version_compare('<0.54.0')
> -                        lk_args += ['-Wl,/implib:drivers\\' + implib]
> -                    endif
> -                else
> -                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
> +        if not fs.is_file(version_map)
> +            version_map = '@0@/version.map'.format(meson.current_source_dir())
> +            lk_deps += [version_map]

Technically, for this patch the lk_deps assignment does not need to be
split into two, but it does make the second patch smaller, so I'm ok to
keep this as you have in this version.

> +        else
> +            lk_deps += [version_map]
> +            if not is_windows and developer_mode
> +                # on unix systems check the output of the
> +                # check-symbols.sh script, using it as a
> +                # dependency of the .so build
> +                lk_deps += custom_target(lib_name + '.sym_chk',
> +                        command: [check_symbols, version_map, '@INPUT@'],
> +                        capture: true,
> +                        input: static_lib,
> +                        output: lib_name + '.sym_chk')
> +            endif
> +        endif
> +
> +        def_file = custom_target(lib_name + '_def',
> +                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
> +                input: version_map,
> +                output: '@0@_exports.def'.format(lib_name))
> +
> +        mingw_map = custom_target(lib_name + '_mingw',
> +                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
> +                input: version_map,
> +                output: '@0@_mingw.map'.format(lib_name))
> +
> +        lk_deps += [def_file, mingw_map]
> +
> +        if is_windows
> +            if is_ms_linker
> +                lk_args = ['-Wl,/def:' + def_file.full_path()]
> +                if meson.version().version_compare('<0.54.0')
> +                    lk_args += ['-Wl,/implib:drivers\\' + implib]
>                  endif
>              else
> -                lk_args = ['-Wl,--version-script=' + version_map]
> -                if developer_mode
> -                    # on unix systems check the output of the
> -                    # check-symbols.sh script, using it as a
> -                    # dependency of the .so build
> -                    lk_deps += custom_target(lib_name + '.sym_chk',
> -                            command: [check_symbols, version_map, '@INPUT@'],
> -                            capture: true,
> -                            input: static_lib,
> -                            output: lib_name + '.sym_chk')
> -                endif
> +                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
>              endif
> +        else
> +            lk_args = ['-Wl,--version-script=' + version_map]
>          endif
>  
>          shared_lib = shared_library(lib_name, sources,
> diff --git a/drivers/version.map b/drivers/version.map
> new file mode 100644
> index 0000000000..78c3585d7c
> --- /dev/null
> +++ b/drivers/version.map
> @@ -0,0 +1,3 @@
> +DPDK_23 {
> +	local: *;
> +};
> -- 

Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [PATCH] drivers: fix symbol exports when map is omitted
  2022-11-29 18:23 ` Ferruh Yigit
  2022-11-30  7:13   ` David Marchand
@ 2022-12-02  0:11   ` Tyler Retzlaff
  1 sibling, 0 replies; 29+ messages in thread
From: Tyler Retzlaff @ 2022-12-02  0:11 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: David Marchand, dev, stable, Luca Boccassi, Bruce Richardson,
	Abdullah Ömer Yamaç

On Tue, Nov 29, 2022 at 06:23:21PM +0000, Ferruh Yigit wrote:
> On 11/29/2022 2:00 PM, David Marchand wrote:
> > ld exports any global symbol by default if no version script is passed.
> > As a consequence, the incriminated change let any public symbol leak
> > out of the driver shared libraries.
> > 
> 
> Not tested on Windows, but for Linux:

just for awareness the default is the opposite on windows symbols are
private by default and have to be explicitly made public.

also, for gcc we could go to the extreme and pass -fvisibility=hidden
and fix out any other symbols that are missed.

if you're really going wild you may consider introducing a macro that
can be expanded to __attribute__((visibility("default"))) combined with
-fvisibility=hidden (as opposed to version.map) the main benefit being
there's only a single source of truth about whether or not the symbol is
public, you don't have to look in 2 places.
(anyway, probably not a popular idea...)

ty

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

* Re: [PATCH v3 1/2] drivers: fix symbol exports when map is omitted
  2022-12-01 10:55   ` Bruce Richardson
@ 2022-12-02 10:01     ` David Marchand
  0 siblings, 0 replies; 29+ messages in thread
From: David Marchand @ 2022-12-02 10:01 UTC (permalink / raw)
  To: Bruce Richardson
  Cc: dev, ferruh.yigit, stable, Luca Boccassi, Thomas Monjalon,
	Abdullah Ömer Yamaç

On Thu, Dec 1, 2022 at 11:55 AM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Thu, Dec 01, 2022 at 11:08:46AM +0100, David Marchand wrote:
> > ld exports any global symbol by default if no version script is passed.
> > As a consequence, the incriminated change let any public symbol leak
> > out of the driver shared libraries.
> >
> > Hide again those symbols by providing a default map file which
> > unexports any global symbol using a local: * catch-all statement.
> >
> > The checks are skipped for this default map file as it is intentionnally
> > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > maps")) and there is nothing else to check in this map.
> >
> > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > ---
> > Changes since v2:
> > - separated the Windows cleanup in next patch,
> >
> > Changes since v1:
> > - excluded drivers/version.map from maps checked by default in
> >   check-symbol-maps.sh,
> >
> > ---
> >  devtools/check-symbol-maps.sh |  2 +-
> >  drivers/meson.build           | 68 +++++++++++++++++++----------------
> >  drivers/version.map           |  3 ++
> >  3 files changed, 41 insertions(+), 32 deletions(-)
> >  create mode 100644 drivers/version.map
> >
> > diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
> > index 0a6062de26..8c116bfa9c 100755
> > --- a/devtools/check-symbol-maps.sh
> > +++ b/devtools/check-symbol-maps.sh
> > @@ -8,7 +8,7 @@ cd $(dirname $0)/..
> >  export LC_ALL=C
> >
> >  if [ $# = 0 ] ; then
> > -    set -- $(find lib drivers -name '*.map')
> > +    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
> >  fi
> >
> >  ret=0
> > diff --git a/drivers/meson.build b/drivers/meson.build
> > index c4ff3ff1ba..5188302057 100644
> > --- a/drivers/meson.build
> > +++ b/drivers/meson.build
> > @@ -210,40 +210,46 @@ foreach subpath:subdirs
> >
> >          lk_deps = []
> >          lk_args = []
> > -        if fs.is_file(version_map)
> > -            def_file = custom_target(lib_name + '_def',
> > -                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
> > -                    input: version_map,
> > -                    output: '@0@_exports.def'.format(lib_name))
> > -
> > -            mingw_map = custom_target(lib_name + '_mingw',
> > -                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
> > -                    input: version_map,
> > -                    output: '@0@_mingw.map'.format(lib_name))
> > -
> > -            lk_deps = [version_map, def_file, mingw_map]
> > -            if is_windows
> > -                if is_ms_linker
> > -                    lk_args = ['-Wl,/def:' + def_file.full_path()]
> > -                    if meson.version().version_compare('<0.54.0')
> > -                        lk_args += ['-Wl,/implib:drivers\\' + implib]
> > -                    endif
> > -                else
> > -                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
> > +        if not fs.is_file(version_map)
> > +            version_map = '@0@/version.map'.format(meson.current_source_dir())
> > +            lk_deps += [version_map]
>
> Technically, for this patch the lk_deps assignment does not need to be
> split into two, but it does make the second patch smaller, so I'm ok to
> keep this as you have in this version.

Yes, otherwise, I would have kept it untouched.

Thanks for the review!


-- 
David Marchand


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

* [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-11-29 14:00 [PATCH] drivers: fix symbol exports when map is omitted David Marchand
                   ` (2 preceding siblings ...)
  2022-12-01 10:08 ` [PATCH v3 1/2] " David Marchand
@ 2022-12-02 11:09 ` David Marchand
  2022-12-02 13:39   ` Aaron Conole
  3 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-12-02 11:09 UTC (permalink / raw)
  To: dev
  Cc: ferruh.yigit, stable, Luca Boccassi, Bruce Richardson,
	Aaron Conole, Michael Santana, Thomas Monjalon,
	Abdullah Ömer Yamaç

ld exports any global symbol by default if no version script is passed.
As a consequence, the incriminated change let any public symbol leak
out of the driver shared libraries.

Hide again those symbols by providing a default map file which
unexports any global symbol using a local: * catch-all statement.

The checks are skipped for this default map file as it is intentionnally
an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
maps")) and there is nothing else to check in this map.

This change impacts the exported symbols, hence, bump the version in the
ABI check to the v22.11.1 from the 22.11 LTS branch.

Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
Cc: stable@dpdk.org

Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
---
Changes since v3:
- updated ABI reference now that 22.11.1 is released,

Changes since v2:
- separated the Windows cleanup in next patch,

Changes since v1:
- excluded drivers/version.map from maps checked by default in
  check-symbol-maps.sh,

---
 .github/workflows/build.yml   |  3 +-
 .travis.yml                   |  3 +-
 devtools/check-symbol-maps.sh |  2 +-
 drivers/meson.build           | 68 +++++++++++++++++++----------------
 drivers/version.map           |  3 ++
 5 files changed, 45 insertions(+), 34 deletions(-)
 create mode 100644 drivers/version.map

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9527ad1f8c..6bad94098e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -25,7 +25,8 @@ jobs:
       MINGW: ${{ matrix.config.cross == 'mingw' }}
       MINI: ${{ matrix.config.mini != '' }}
       PPC64LE: ${{ matrix.config.cross == 'ppc64le' }}
-      REF_GIT_TAG: v22.11
+      REF_GIT_REPO: https://dpdk.org/git/dpdk-stable
+      REF_GIT_TAG: v22.11.1
       RISCV64: ${{ matrix.config.cross == 'riscv64' }}
       RUN_TESTS: ${{ contains(matrix.config.checks, 'tests') }}
 
diff --git a/.travis.yml b/.travis.yml
index b99444620f..0936788dc7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,7 +42,8 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh
 env:
   global:
     - LIBABIGAIL_VERSION=libabigail-2.1
-    - REF_GIT_TAG=v22.11
+    - REF_GIT_REPO=https://dpdk.org/git/dpdk-stable
+    - REF_GIT_TAG=v22.11.1
 
 jobs:
   include:
diff --git a/devtools/check-symbol-maps.sh b/devtools/check-symbol-maps.sh
index 0a6062de26..8c116bfa9c 100755
--- a/devtools/check-symbol-maps.sh
+++ b/devtools/check-symbol-maps.sh
@@ -8,7 +8,7 @@ cd $(dirname $0)/..
 export LC_ALL=C
 
 if [ $# = 0 ] ; then
-    set -- $(find lib drivers -name '*.map')
+    set -- $(find lib drivers -name '*.map' -a ! -path drivers/version.map)
 fi
 
 ret=0
diff --git a/drivers/meson.build b/drivers/meson.build
index c4ff3ff1ba..5188302057 100644
--- a/drivers/meson.build
+++ b/drivers/meson.build
@@ -210,40 +210,46 @@ foreach subpath:subdirs
 
         lk_deps = []
         lk_args = []
-        if fs.is_file(version_map)
-            def_file = custom_target(lib_name + '_def',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_exports.def'.format(lib_name))
-
-            mingw_map = custom_target(lib_name + '_mingw',
-                    command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
-                    input: version_map,
-                    output: '@0@_mingw.map'.format(lib_name))
-
-            lk_deps = [version_map, def_file, mingw_map]
-            if is_windows
-                if is_ms_linker
-                    lk_args = ['-Wl,/def:' + def_file.full_path()]
-                    if meson.version().version_compare('<0.54.0')
-                        lk_args += ['-Wl,/implib:drivers\\' + implib]
-                    endif
-                else
-                    lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
+        if not fs.is_file(version_map)
+            version_map = '@0@/version.map'.format(meson.current_source_dir())
+            lk_deps += [version_map]
+        else
+            lk_deps += [version_map]
+            if not is_windows and developer_mode
+                # on unix systems check the output of the
+                # check-symbols.sh script, using it as a
+                # dependency of the .so build
+                lk_deps += custom_target(lib_name + '.sym_chk',
+                        command: [check_symbols, version_map, '@INPUT@'],
+                        capture: true,
+                        input: static_lib,
+                        output: lib_name + '.sym_chk')
+            endif
+        endif
+
+        def_file = custom_target(lib_name + '_def',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_exports.def'.format(lib_name))
+
+        mingw_map = custom_target(lib_name + '_mingw',
+                command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],
+                input: version_map,
+                output: '@0@_mingw.map'.format(lib_name))
+
+        lk_deps += [def_file, mingw_map]
+
+        if is_windows
+            if is_ms_linker
+                lk_args = ['-Wl,/def:' + def_file.full_path()]
+                if meson.version().version_compare('<0.54.0')
+                    lk_args += ['-Wl,/implib:drivers\\' + implib]
                 endif
             else
-                lk_args = ['-Wl,--version-script=' + version_map]
-                if developer_mode
-                    # on unix systems check the output of the
-                    # check-symbols.sh script, using it as a
-                    # dependency of the .so build
-                    lk_deps += custom_target(lib_name + '.sym_chk',
-                            command: [check_symbols, version_map, '@INPUT@'],
-                            capture: true,
-                            input: static_lib,
-                            output: lib_name + '.sym_chk')
-                endif
+                lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]
             endif
+        else
+            lk_args = ['-Wl,--version-script=' + version_map]
         endif
 
         shared_lib = shared_library(lib_name, sources,
diff --git a/drivers/version.map b/drivers/version.map
new file mode 100644
index 0000000000..78c3585d7c
--- /dev/null
+++ b/drivers/version.map
@@ -0,0 +1,3 @@
+DPDK_23 {
+	local: *;
+};
-- 
2.38.1


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

* Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-02 11:09 ` [PATCH v4 " David Marchand
@ 2022-12-02 13:39   ` Aaron Conole
  2022-12-05 10:23     ` David Marchand
  0 siblings, 1 reply; 29+ messages in thread
From: Aaron Conole @ 2022-12-02 13:39 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, ferruh.yigit, stable, Luca Boccassi, Bruce Richardson,
	Michael Santana, Thomas Monjalon, Abdullah Ömer Yamaç

David Marchand <david.marchand@redhat.com> writes:

> ld exports any global symbol by default if no version script is passed.
> As a consequence, the incriminated change let any public symbol leak
> out of the driver shared libraries.
>
> Hide again those symbols by providing a default map file which
> unexports any global symbol using a local: * catch-all statement.
>
> The checks are skipped for this default map file as it is intentionnally
> an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> maps")) and there is nothing else to check in this map.
>
> This change impacts the exported symbols, hence, bump the version in the
> ABI check to the v22.11.1 from the 22.11 LTS branch.
>
> Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> Cc: stable@dpdk.org
>
> Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>


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

* Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-02 13:39   ` Aaron Conole
@ 2022-12-05 10:23     ` David Marchand
  2022-12-05 10:43       ` [EXT] " Akhil Goyal
  0 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-12-05 10:23 UTC (permalink / raw)
  To: David Marchand, ci, Thomas Monjalon, Ferruh Yigit,
	Andrew Rybchenko, Ajit Khaparde, Qi Zhang,
	Jerin Jacob Kollanukkaran, Raslan Darawsheh, Maxime Coquelin,
	Xia, Chenbo, Akhil Goyal, Luca Boccassi, Kevin Traynor,
	Christian Ehrhardt, Xueming(Steven) Li
  Cc: dev, stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

On Fri, Dec 2, 2022 at 2:39 PM Aaron Conole <aconole@redhat.com> wrote:
>
> David Marchand <david.marchand@redhat.com> writes:
>
> > ld exports any global symbol by default if no version script is passed.
> > As a consequence, the incriminated change let any public symbol leak
> > out of the driver shared libraries.
> >
> > Hide again those symbols by providing a default map file which
> > unexports any global symbol using a local: * catch-all statement.
> >
> > The checks are skipped for this default map file as it is intentionnally
> > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > maps")) and there is nothing else to check in this map.
> >
> > This change impacts the exported symbols, hence, bump the version in the
> > ABI check to the v22.11.1 from the 22.11 LTS branch.
> >
> > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > Cc: stable@dpdk.org
> >
> > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Aaron Conole <aconole@redhat.com>

Series applied.

Please, maintainers and CI teams, when you enable ABI checks in the
main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
tag as a reference.
Thanks.


-- 
David Marchand


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

* RE: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-05 10:23     ` David Marchand
@ 2022-12-05 10:43       ` Akhil Goyal
  2022-12-05 12:36         ` David Marchand
  0 siblings, 1 reply; 29+ messages in thread
From: Akhil Goyal @ 2022-12-05 10:43 UTC (permalink / raw)
  To: David Marchand, ci, Thomas Monjalon, Ferruh Yigit,
	Andrew Rybchenko, Ajit Khaparde, Qi Zhang,
	Jerin Jacob Kollanukkaran, Raslan Darawsheh, Maxime Coquelin,
	Xia, Chenbo, Luca Boccassi, Kevin Traynor, Christian Ehrhardt,
	Xueming(Steven) Li
  Cc: dev, stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

> On Fri, Dec 2, 2022 at 2:39 PM Aaron Conole <aconole@redhat.com> wrote:
> >
> > David Marchand <david.marchand@redhat.com> writes:
> >
> > > ld exports any global symbol by default if no version script is passed.
> > > As a consequence, the incriminated change let any public symbol leak
> > > out of the driver shared libraries.
> > >
> > > Hide again those symbols by providing a default map file which
> > > unexports any global symbol using a local: * catch-all statement.
> > >
> > > The checks are skipped for this default map file as it is intentionnally
> > > an empty map (see commit b67bdda86cd4 ("devtools: catch empty symbol
> > > maps")) and there is nothing else to check in this map.
> > >
> > > This change impacts the exported symbols, hence, bump the version in the
> > > ABI check to the v22.11.1 from the 22.11 LTS branch.
> > >
> > > Fixes: 7dde9c844a37 ("drivers: omit symbol map when unneeded")
> > > Cc: stable@dpdk.org
> > >
> > > Reported-by: Luca Boccassi <luca.boccassi@microsoft.com>
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > > Tested-by: Ferruh Yigit <ferruh.yigit@amd.com>
> > > Reviewed-by: Bruce Richardson <bruce.richardson@intel.com>
> > Acked-by: Aaron Conole <aconole@redhat.com>
> 
> Series applied.
> 
> Please, maintainers and CI teams, when you enable ABI checks in the
> main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
> tag as a reference.
> Thanks.

Should we also add a tag on main repo, as new development does not happen
on stable tree?

Regards,
Akhil

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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-05 10:43       ` [EXT] " Akhil Goyal
@ 2022-12-05 12:36         ` David Marchand
  2022-12-05 13:47           ` Akhil Goyal
  0 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-12-05 12:36 UTC (permalink / raw)
  To: Akhil Goyal
  Cc: ci, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Ajit Khaparde, Qi Zhang, Jerin Jacob Kollanukkaran,
	Raslan Darawsheh, Maxime Coquelin, Xia, Chenbo, Luca Boccassi,
	Kevin Traynor, Christian Ehrhardt, Xueming(Steven) Li, dev,
	stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

On Mon, Dec 5, 2022 at 11:44 AM Akhil Goyal <gakhil@marvell.com> wrote:
> > Please, maintainers and CI teams, when you enable ABI checks in the
> > main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
> > tag as a reference.
> > Thanks.
>
> Should we also add a tag on main repo, as new development does not happen
> on stable tree?

You can fetch the v22.11.1 tag from the stable tree.


-- 
David Marchand


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

* RE: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-05 12:36         ` David Marchand
@ 2022-12-05 13:47           ` Akhil Goyal
  2022-12-05 15:37             ` Thomas Monjalon
  0 siblings, 1 reply; 29+ messages in thread
From: Akhil Goyal @ 2022-12-05 13:47 UTC (permalink / raw)
  To: David Marchand
  Cc: ci, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko,
	Ajit Khaparde, Qi Zhang, Jerin Jacob Kollanukkaran,
	Raslan Darawsheh, Maxime Coquelin, Xia, Chenbo, Luca Boccassi,
	Kevin Traynor, Christian Ehrhardt, Xueming(Steven) Li, dev,
	stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

> On Mon, Dec 5, 2022 at 11:44 AM Akhil Goyal <gakhil@marvell.com> wrote:
> > > Please, maintainers and CI teams, when you enable ABI checks in the
> > > main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
> > > tag as a reference.
> > > Thanks.
> >
> > Should we also add a tag on main repo, as new development does not happen
> > on stable tree?
> 
> You can fetch the v22.11.1 tag from the stable tree.
Yes, that is an obvious option.
But adding a tag on same repo is more convenient from developer point of view. 
However, it is my personal view, others may differ.

-Akhil

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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-05 13:47           ` Akhil Goyal
@ 2022-12-05 15:37             ` Thomas Monjalon
  2022-12-05 16:26               ` Akhil Goyal
  2022-12-06 10:12               ` Ferruh Yigit
  0 siblings, 2 replies; 29+ messages in thread
From: Thomas Monjalon @ 2022-12-05 15:37 UTC (permalink / raw)
  To: David Marchand, Akhil Goyal
  Cc: ci, Ferruh Yigit, Andrew Rybchenko, Ajit Khaparde, Qi Zhang,
	Jerin Jacob Kollanukkaran, Raslan Darawsheh, Maxime Coquelin,
	Xia, Chenbo, Luca Boccassi, Kevin Traynor, Christian Ehrhardt,
	Xueming(Steven) Li, dev, stable, Bruce Richardson,
	Michael Santana, Abdullah Ömer Yamaç,
	Aaron Conole

05/12/2022 14:47, Akhil Goyal:
> > On Mon, Dec 5, 2022 at 11:44 AM Akhil Goyal <gakhil@marvell.com> wrote:
> > > > Please, maintainers and CI teams, when you enable ABI checks in the
> > > > main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
> > > > tag as a reference.
> > > > Thanks.
> > >
> > > Should we also add a tag on main repo, as new development does not happen
> > > on stable tree?
> > 
> > You can fetch the v22.11.1 tag from the stable tree.
> Yes, that is an obvious option.
> But adding a tag on same repo is more convenient from developer point of view. 
> However, it is my personal view, others may differ.

From developer point of view, you should use devtools/test-meson-builds.sh
which does the "git clone" for you.

This is what I have in ~/.config/dpdk/devel.config
export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
export DPDK_ABI_REF_VERSION=v22.11.1




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

* RE: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-05 15:37             ` Thomas Monjalon
@ 2022-12-05 16:26               ` Akhil Goyal
  2022-12-06 10:12               ` Ferruh Yigit
  1 sibling, 0 replies; 29+ messages in thread
From: Akhil Goyal @ 2022-12-05 16:26 UTC (permalink / raw)
  To: Thomas Monjalon, David Marchand
  Cc: ci, Ferruh Yigit, Andrew Rybchenko, Ajit Khaparde, Qi Zhang,
	Jerin Jacob Kollanukkaran, Raslan Darawsheh, Maxime Coquelin,
	Xia, Chenbo, Luca Boccassi, Kevin Traynor, Christian Ehrhardt,
	Xueming(Steven) Li, dev, stable, Bruce Richardson,
	Michael Santana, Abdullah Ömer Yamaç,
	Aaron Conole

> 05/12/2022 14:47, Akhil Goyal:
> > > On Mon, Dec 5, 2022 at 11:44 AM Akhil Goyal <gakhil@marvell.com> wrote:
> > > > > Please, maintainers and CI teams, when you enable ABI checks in the
> > > > > main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
> > > > > tag as a reference.
> > > > > Thanks.
> > > >
> > > > Should we also add a tag on main repo, as new development does not
> happen
> > > > on stable tree?
> > >
> > > You can fetch the v22.11.1 tag from the stable tree.
> > Yes, that is an obvious option.
> > But adding a tag on same repo is more convenient from developer point of
> view.
> > However, it is my personal view, others may differ.
> 
> From developer point of view, you should use devtools/test-meson-builds.sh
> which does the "git clone" for you.
> 
> This is what I have in ~/.config/dpdk/devel.config
> export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
> export DPDK_ABI_REF_VERSION=v22.11.1
Ok got it, thanks.

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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-05 15:37             ` Thomas Monjalon
  2022-12-05 16:26               ` Akhil Goyal
@ 2022-12-06 10:12               ` Ferruh Yigit
  2022-12-06 10:18                 ` David Marchand
  1 sibling, 1 reply; 29+ messages in thread
From: Ferruh Yigit @ 2022-12-06 10:12 UTC (permalink / raw)
  To: Thomas Monjalon, David Marchand, Akhil Goyal
  Cc: ci, Andrew Rybchenko, Ajit Khaparde, Qi Zhang,
	Jerin Jacob Kollanukkaran, Raslan Darawsheh, Maxime Coquelin,
	Xia, Chenbo, Luca Boccassi, Kevin Traynor, Christian Ehrhardt,
	Xueming(Steven) Li, dev, stable, Bruce Richardson,
	Michael Santana, Abdullah Ömer Yamaç,
	Aaron Conole

On 12/5/2022 3:37 PM, Thomas Monjalon wrote:
> 05/12/2022 14:47, Akhil Goyal:
>>> On Mon, Dec 5, 2022 at 11:44 AM Akhil Goyal <gakhil@marvell.com> wrote:
>>>>> Please, maintainers and CI teams, when you enable ABI checks in the
>>>>> main branch, or in the 22.11 LTS branch, use the dpdk-stable 22.11.1
>>>>> tag as a reference.
>>>>> Thanks.
>>>>
>>>> Should we also add a tag on main repo, as new development does not happen
>>>> on stable tree?
>>>
>>> You can fetch the v22.11.1 tag from the stable tree.
>> Yes, that is an obvious option.
>> But adding a tag on same repo is more convenient from developer point of view. 
>> However, it is my personal view, others may differ.
> 
> From developer point of view, you should use devtools/test-meson-builds.sh
> which does the "git clone" for you.
> 
> This is what I have in ~/.config/dpdk/devel.config
> export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
> export DPDK_ABI_REF_VERSION=v22.11.1
> 

Does it help to update 'test-meson-builds.sh' to use an environment
variable to select which repo to clone?
If so, I can send a patch for it.


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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-06 10:12               ` Ferruh Yigit
@ 2022-12-06 10:18                 ` David Marchand
  2022-12-06 12:25                   ` Ferruh Yigit
  0 siblings, 1 reply; 29+ messages in thread
From: David Marchand @ 2022-12-06 10:18 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Thomas Monjalon, Akhil Goyal, ci, Andrew Rybchenko,
	Ajit Khaparde, Qi Zhang, Jerin Jacob Kollanukkaran,
	Raslan Darawsheh, Maxime Coquelin, Xia, Chenbo, Luca Boccassi,
	Kevin Traynor, Christian Ehrhardt, Xueming(Steven) Li, dev,
	stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> On 12/5/2022 3:37 PM, Thomas Monjalon wrote:
> > 05/12/2022 14:47, Akhil Goyal:
> >> But adding a tag on same repo is more convenient from developer point of view.
> >> However, it is my personal view, others may differ.
> >
> > From developer point of view, you should use devtools/test-meson-builds.sh
> > which does the "git clone" for you.
> >
> > This is what I have in ~/.config/dpdk/devel.config
> > export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
> > export DPDK_ABI_REF_VERSION=v22.11.1
> >
>
> Does it help to update 'test-meson-builds.sh' to use an environment
> variable to select which repo to clone?
> If so, I can send a patch for it.

I was wondering too...
I would expect most maintainers have the stable repo in their config
but it would not hurt to handle the case when they don't for others.

+1


-- 
David Marchand


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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-06 10:18                 ` David Marchand
@ 2022-12-06 12:25                   ` Ferruh Yigit
  2022-12-07 18:00                     ` Patrick Robb
  0 siblings, 1 reply; 29+ messages in thread
From: Ferruh Yigit @ 2022-12-06 12:25 UTC (permalink / raw)
  To: David Marchand
  Cc: Thomas Monjalon, Akhil Goyal, ci, Andrew Rybchenko,
	Ajit Khaparde, Qi Zhang, Jerin Jacob Kollanukkaran,
	Raslan Darawsheh, Maxime Coquelin, Xia, Chenbo, Luca Boccassi,
	Kevin Traynor, Christian Ehrhardt, Xueming(Steven) Li, dev,
	stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

On 12/6/2022 10:18 AM, David Marchand wrote:
> On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>> On 12/5/2022 3:37 PM, Thomas Monjalon wrote:
>>> 05/12/2022 14:47, Akhil Goyal:
>>>> But adding a tag on same repo is more convenient from developer point of view.
>>>> However, it is my personal view, others may differ.
>>>
>>> From developer point of view, you should use devtools/test-meson-builds.sh
>>> which does the "git clone" for you.
>>>
>>> This is what I have in ~/.config/dpdk/devel.config
>>> export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
>>> export DPDK_ABI_REF_VERSION=v22.11.1
>>>
>>
>> Does it help to update 'test-meson-builds.sh' to use an environment
>> variable to select which repo to clone?
>> If so, I can send a patch for it.
> 
> I was wondering too...
> I would expect most maintainers have the stable repo in their config
> but it would not hurt to handle the case when they don't for others.
> 
> +1
> 
> 

Sent following if it helps:
https://patches.dpdk.org/project/dpdk/list/?series=26015

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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-06 12:25                   ` Ferruh Yigit
@ 2022-12-07 18:00                     ` Patrick Robb
  2022-12-08 13:22                       ` Thomas Monjalon
  0 siblings, 1 reply; 29+ messages in thread
From: Patrick Robb @ 2022-12-07 18:00 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: David Marchand, Thomas Monjalon, Akhil Goyal, ci,
	Andrew Rybchenko, Ajit Khaparde, Qi Zhang,
	Jerin Jacob Kollanukkaran, Raslan Darawsheh, Maxime Coquelin,
	Xia, Chenbo, Luca Boccassi, Kevin Traynor, Christian Ehrhardt,
	Xueming(Steven) Li, dev, stable, Bruce Richardson,
	Michael Santana, Abdullah Ömer Yamaç,
	Aaron Conole

[-- Attachment #1: Type: text/plain, Size: 2456 bytes --]

Hello,

Community Lab team members are wondering whether it is possible to bump
v22.11 to include at least this patch. We have an existing codebase which
relies on a vXX.XX scheme for producing ABI references. We parse that out
at different places in our code, so fixing this to handle vXX.XX.X will
require some changes on our end. We can do that, but it puts the timeline
on turning on ABI testing at the community lab back some. A v22.11 tagged
release with this patch would allow for us to turn on ABI testing
immediately. There was also a suggestion that having the "base" tag (like
the simple v22.11) point to the latest revision is a more standard version
naming approach and may be more intuitive than what is being used currently.

If that is not possible, we will update our code to be able to refer to a
vXX.XX.X tag for producing the ABI reference. If we adopt this approach, we
would like to request that with future releases, a "vXX.XX.0" tag could
always be made available for us to produce ABI references from. That way,
we can prepare for turning on ABI testing knowing beforehand the tag name
we will be using.

On Tue, Dec 6, 2022 at 7:25 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:

> On 12/6/2022 10:18 AM, David Marchand wrote:
> > On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <ferruh.yigit@amd.com>
> wrote:
> >> On 12/5/2022 3:37 PM, Thomas Monjalon wrote:
> >>> 05/12/2022 14:47, Akhil Goyal:
> >>>> But adding a tag on same repo is more convenient from developer point
> of view.
> >>>> However, it is my personal view, others may differ.
> >>>
> >>> From developer point of view, you should use
> devtools/test-meson-builds.sh
> >>> which does the "git clone" for you.
> >>>
> >>> This is what I have in ~/.config/dpdk/devel.config
> >>> export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
> >>> export DPDK_ABI_REF_VERSION=v22.11.1
> >>>
> >>
> >> Does it help to update 'test-meson-builds.sh' to use an environment
> >> variable to select which repo to clone?
> >> If so, I can send a patch for it.
> >
> > I was wondering too...
> > I would expect most maintainers have the stable repo in their config
> > but it would not hurt to handle the case when they don't for others.
> >
> > +1
> >
> >
>
> Sent following if it helps:
> https://patches.dpdk.org/project/dpdk/list/?series=26015
>


-- 

Patrick Robb

Technical Service Manager

UNH InterOperability Laboratory

21 Madbury Rd, Suite 100, Durham, NH 03824

www.iol.unh.edu

[-- Attachment #2: Type: text/html, Size: 5075 bytes --]

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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-07 18:00                     ` Patrick Robb
@ 2022-12-08 13:22                       ` Thomas Monjalon
  2022-12-08 16:06                         ` Patrick Robb
  0 siblings, 1 reply; 29+ messages in thread
From: Thomas Monjalon @ 2022-12-08 13:22 UTC (permalink / raw)
  To: Patrick Robb
  Cc: Ferruh Yigit, David Marchand, Akhil Goyal, ci, Andrew Rybchenko,
	Ajit Khaparde, Qi Zhang, Jerin Jacob Kollanukkaran,
	Raslan Darawsheh, Maxime Coquelin, Xia, Chenbo, Luca Boccassi,
	Kevin Traynor, Christian Ehrhardt, Xueming(Steven) Li, dev,
	stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

I'm sorry Patrick that it gives you more work.
Your proposals below don't look possible because a tag is something fixed forever.
We had an ABI issue in the initial tag so we cannot use the tag v22.11 as planned.
I don't see how we can better plan except having more tests on release candidates.


07/12/2022 19:00, Patrick Robb:
> Hello,
> 
> Community Lab team members are wondering whether it is possible to bump
> v22.11 to include at least this patch. We have an existing codebase which
> relies on a vXX.XX scheme for producing ABI references. We parse that out
> at different places in our code, so fixing this to handle vXX.XX.X will
> require some changes on our end. We can do that, but it puts the timeline
> on turning on ABI testing at the community lab back some. A v22.11 tagged
> release with this patch would allow for us to turn on ABI testing
> immediately. There was also a suggestion that having the "base" tag (like
> the simple v22.11) point to the latest revision is a more standard version
> naming approach and may be more intuitive than what is being used currently.
> 
> If that is not possible, we will update our code to be able to refer to a
> vXX.XX.X tag for producing the ABI reference. If we adopt this approach, we
> would like to request that with future releases, a "vXX.XX.0" tag could
> always be made available for us to produce ABI references from. That way,
> we can prepare for turning on ABI testing knowing beforehand the tag name
> we will be using.
> 
> On Tue, Dec 6, 2022 at 7:25 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> 
> > On 12/6/2022 10:18 AM, David Marchand wrote:
> > > On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <ferruh.yigit@amd.com>
> > wrote:
> > >> On 12/5/2022 3:37 PM, Thomas Monjalon wrote:
> > >>> 05/12/2022 14:47, Akhil Goyal:
> > >>>> But adding a tag on same repo is more convenient from developer point
> > of view.
> > >>>> However, it is my personal view, others may differ.
> > >>>
> > >>> From developer point of view, you should use
> > devtools/test-meson-builds.sh
> > >>> which does the "git clone" for you.
> > >>>
> > >>> This is what I have in ~/.config/dpdk/devel.config
> > >>> export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
> > >>> export DPDK_ABI_REF_VERSION=v22.11.1
> > >>>
> > >>
> > >> Does it help to update 'test-meson-builds.sh' to use an environment
> > >> variable to select which repo to clone?
> > >> If so, I can send a patch for it.
> > >
> > > I was wondering too...
> > > I would expect most maintainers have the stable repo in their config
> > > but it would not hurt to handle the case when they don't for others.
> > >
> > > +1
> >
> > Sent following if it helps:
> > https://patches.dpdk.org/project/dpdk/list/?series=26015






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

* Re: [EXT] Re: [PATCH v4 1/2] drivers: fix symbol exports when map is omitted
  2022-12-08 13:22                       ` Thomas Monjalon
@ 2022-12-08 16:06                         ` Patrick Robb
  0 siblings, 0 replies; 29+ messages in thread
From: Patrick Robb @ 2022-12-08 16:06 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Ferruh Yigit, David Marchand, Akhil Goyal, ci, Andrew Rybchenko,
	Ajit Khaparde, Qi Zhang, Jerin Jacob Kollanukkaran,
	Raslan Darawsheh, Maxime Coquelin, Xia, Chenbo, Luca Boccassi,
	Kevin Traynor, Christian Ehrhardt, Xueming(Steven) Li, dev,
	stable, Bruce Richardson, Michael Santana,
	Abdullah Ömer Yamaç,
	Aaron Conole

[-- Attachment #1: Type: text/plain, Size: 3201 bytes --]

Thomas - thanks for the response. We will proceed with making the necessary
changes for using v22.11.1.

On Thu, Dec 8, 2022 at 8:22 AM Thomas Monjalon <thomas@monjalon.net> wrote:

> I'm sorry Patrick that it gives you more work.
> Your proposals below don't look possible because a tag is something fixed
> forever.
> We had an ABI issue in the initial tag so we cannot use the tag v22.11 as
> planned.
> I don't see how we can better plan except having more tests on release
> candidates.
>
>
> 07/12/2022 19:00, Patrick Robb:
> > Hello,
> >
> > Community Lab team members are wondering whether it is possible to bump
> > v22.11 to include at least this patch. We have an existing codebase which
> > relies on a vXX.XX scheme for producing ABI references. We parse that out
> > at different places in our code, so fixing this to handle vXX.XX.X will
> > require some changes on our end. We can do that, but it puts the timeline
> > on turning on ABI testing at the community lab back some. A v22.11 tagged
> > release with this patch would allow for us to turn on ABI testing
> > immediately. There was also a suggestion that having the "base" tag (like
> > the simple v22.11) point to the latest revision is a more standard
> version
> > naming approach and may be more intuitive than what is being used
> currently.
> >
> > If that is not possible, we will update our code to be able to refer to a
> > vXX.XX.X tag for producing the ABI reference. If we adopt this approach,
> we
> > would like to request that with future releases, a "vXX.XX.0" tag could
> > always be made available for us to produce ABI references from. That way,
> > we can prepare for turning on ABI testing knowing beforehand the tag name
> > we will be using.
> >
> > On Tue, Dec 6, 2022 at 7:25 AM Ferruh Yigit <ferruh.yigit@amd.com>
> wrote:
> >
> > > On 12/6/2022 10:18 AM, David Marchand wrote:
> > > > On Tue, Dec 6, 2022 at 11:13 AM Ferruh Yigit <ferruh.yigit@amd.com>
> > > wrote:
> > > >> On 12/5/2022 3:37 PM, Thomas Monjalon wrote:
> > > >>> 05/12/2022 14:47, Akhil Goyal:
> > > >>>> But adding a tag on same repo is more convenient from developer
> point
> > > of view.
> > > >>>> However, it is my personal view, others may differ.
> > > >>>
> > > >>> From developer point of view, you should use
> > > devtools/test-meson-builds.sh
> > > >>> which does the "git clone" for you.
> > > >>>
> > > >>> This is what I have in ~/.config/dpdk/devel.config
> > > >>> export DPDK_ABI_REF_DIR=$root/dpdk-build/abiref
> > > >>> export DPDK_ABI_REF_VERSION=v22.11.1
> > > >>>
> > > >>
> > > >> Does it help to update 'test-meson-builds.sh' to use an environment
> > > >> variable to select which repo to clone?
> > > >> If so, I can send a patch for it.
> > > >
> > > > I was wondering too...
> > > > I would expect most maintainers have the stable repo in their config
> > > > but it would not hurt to handle the case when they don't for others.
> > > >
> > > > +1
> > >
> > > Sent following if it helps:
> > > https://patches.dpdk.org/project/dpdk/list/?series=26015
>
>
>
>
>
>

-- 

Patrick Robb

Technical Service Manager

UNH InterOperability Laboratory

21 Madbury Rd, Suite 100, Durham, NH 03824

www.iol.unh.edu

[-- Attachment #2: Type: text/html, Size: 6221 bytes --]

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

end of thread, other threads:[~2022-12-08 16:07 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-29 14:00 [PATCH] drivers: fix symbol exports when map is omitted David Marchand
2022-11-29 18:23 ` Ferruh Yigit
2022-11-30  7:13   ` David Marchand
2022-11-30  8:27     ` David Marchand
2022-11-30  9:19       ` Ferruh Yigit
2022-12-02  0:11   ` Tyler Retzlaff
2022-11-30 10:02 ` [PATCH v2] " David Marchand
2022-11-30 10:44   ` Ferruh Yigit
2022-11-30 15:02     ` David Marchand
2022-11-30 15:24       ` David Marchand
2022-11-30 15:42       ` Bruce Richardson
2022-12-01 10:11         ` David Marchand
2022-12-01 10:08 ` [PATCH v3 1/2] " David Marchand
2022-12-01 10:55   ` Bruce Richardson
2022-12-02 10:01     ` David Marchand
2022-12-02 11:09 ` [PATCH v4 " David Marchand
2022-12-02 13:39   ` Aaron Conole
2022-12-05 10:23     ` David Marchand
2022-12-05 10:43       ` [EXT] " Akhil Goyal
2022-12-05 12:36         ` David Marchand
2022-12-05 13:47           ` Akhil Goyal
2022-12-05 15:37             ` Thomas Monjalon
2022-12-05 16:26               ` Akhil Goyal
2022-12-06 10:12               ` Ferruh Yigit
2022-12-06 10:18                 ` David Marchand
2022-12-06 12:25                   ` Ferruh Yigit
2022-12-07 18:00                     ` Patrick Robb
2022-12-08 13:22                       ` Thomas Monjalon
2022-12-08 16:06                         ` Patrick Robb

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