From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC8E541D8B for ; Mon, 27 Feb 2023 07:24:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8123D40A84; Mon, 27 Feb 2023 07:24:30 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2081.outbound.protection.outlook.com [40.107.92.81]) by mails.dpdk.org (Postfix) with ESMTP id 6116640A7D for ; Mon, 27 Feb 2023 07:24:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hWS3lLaoUQ/q5787vIhwDi/tU3JAw9/TEq5wTT9EfdOZTP/H1fQXvB+IpZ53u8BUfqRaVQ3BaQNdCbBXLmT6l/EX86pqPg0q6AMZhr0MeRJqX//7RglIvjXS4QR5FNkXArb8xA+5s51Xx1dtrtkPESTO/FZp2nw+pNkzyj24Z831AXp0TZPH+5mVlWpsSmwBtbZtKLlCJzvSoFylhRkiTISamz3bZeUSVQrGGCimvc/7xO6iHX2waM0FLuLsh3ETtVZ4F7K6nug/N3b7rIBOL2JmZkSkrEjCa7V1BcDmhhpFWWQNg00PhCwMKuffuTxZLds5bLoPc1NIG9Ij0GzPDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TPMJTVnMZ7wnbCQpRu+mBPIWqOz1DAHyhdX7U57Q+jM=; b=KXHnuufKKLO4L40XZtmEq5MsjKHhJH+Q7x2NEp0FDDEHPdVMzgzEa/FXCf/BBb09d6dAGMLInVIrEPIojVGi9kjUh0vhBy69/LQqGZwPZugilLZcsZTVO55m4B5aEniV0lw36H0rL4n0g3+Lu1ALig9h7wiJBlIPrA1u9Igc046sRu9mYJz/ERSSd8B7s1gGbv1vBhUURtk/x7U+qYIzcL7hw0OkhzTpLves3x2jl36QStLtdzz0DOfYKDLi2GQhYR0kbGp6Uh7TY7CPLzBoHICNdu/w6ccaPQo0VpdtizxAEnUax2KA0y+pb4v9HeyGcyHkbpkS1Dl21F2XTLn/fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TPMJTVnMZ7wnbCQpRu+mBPIWqOz1DAHyhdX7U57Q+jM=; b=TbSv/gi8jdFCOscF6zwSDpA0uo5Ssfl5b2I4xf8m+3A6c5I269n4GwYcOXOp9AWhNcie3wcdiucoeJXeLk8DLFCb5r1FAvEhsVJq847FPCPcbMCBdauY0ukI9iXoKeDtPxWuJCHWMYurrM4hmuiGMiJGMNgZSpQSh9OVYT6akKDYJXvZcQ1i6JiBpqUqhIzhzKz5QPC372JVh97I0laGM/vpb+W5T7gasnqQXWJ0NB37fDgPUMATgZn1jixHi3DQPCbB3FtCI+dt1uWlMA/hW5oCmeT4gYFuGLhJ4hH2MUdnDHjfiZazTEzY/EOC1b/B9yo4r8neUqOna+eipPoEXw== Received: from CYZPR05CA0046.namprd05.prod.outlook.com (2603:10b6:930:a3::6) by CY8PR12MB8337.namprd12.prod.outlook.com (2603:10b6:930:7d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.21; Mon, 27 Feb 2023 06:24:27 +0000 Received: from CY4PEPF0000C976.namprd02.prod.outlook.com (2603:10b6:930:a3:cafe::33) by CYZPR05CA0046.outlook.office365.com (2603:10b6:930:a3::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 06:24:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000C976.mail.protection.outlook.com (10.167.241.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.12 via Frontend Transport; Mon, 27 Feb 2023 06:24:27 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 22:24:17 -0800 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 26 Feb 2023 22:24:15 -0800 From: Xueming Li To: David Marchand CC: Luca Boccassi , Ferruh Yigit , Bruce Richardson , "Aaron Conole" , dpdk stable Subject: patch 'drivers: fix symbol exports when map is omitted' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 14:21:10 +0800 Message-ID: <20230227062349.13764-2-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227062349.13764-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000C976:EE_|CY8PR12MB8337:EE_ X-MS-Office365-Filtering-Correlation-Id: 93495a2a-7204-4ec4-aa30-08db188b46ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mZ0SlI0jgwb3bTWL/zYWV8/FtUQsRNJFKqdD379RIn18Mc3jQiB1ra3Z/u1XTdW3TbWspo+ON2F0zwEuzFEL960yeAl3fXVmxtEHEoGk0pI5BIPF1S282/E4JsW94oQEjrXB5qyAyv+kohu0N/un7Yi5KA0pZx/2eupTNDMqwse/7eqTQXRtxUjqePA36oqE6WI1EISWoTk5h5/WGoe+p1P/xfxEX8M/97/4MNcUAZMXnFELBPZPuy6/WpR05y4L4jkECO/9xxSBo1VuZitxux62Y9Wg5ChBcEvHivi5GGcLqGmdTOnaSFMekh/eSPWqj8+APPrtMRcawmdtd65sjanI6vr3vknngHz6eSjUlrIgAX/SQ+zkgKeTj+WpY3K2AjB3J6bENPU+IxHmYEEIcQl95nLlGI4BL5NVyTOYmHoEJSVR9VV821bp0DiFt1N86R/2Ki23Jqc4bzLqTEviRfRGRXRvrHa6xI4UBcwKH6xX8d9NEV3aT9xDh7Ks4QcfoLe340o53GMjx/2NEOBS0ETLSvPKYcsIxm6/HSXaUMLaORcRS+M9F8XFPD0YFyxV3PvHX6Sykpq6vrih8K5WbhQ7NBbdwOmQUv+gJxPPORCMdOa/rJCTEGWTLfPIrsMgcDZxdd3yUfB36PsbiTb44l1d7MkwhNblEYGEHpksJpg5Yt58fwslRvphvBM1jA2+9etNXg+beMq21Z4wRTV78gc8qSeyil1g2RGz/bcWmhl3B4HckBrGGlaeT7cYn7j6DmZhBWGZ9w8/qGjRtAtR1M+xGccdAVf6hyRWvUY9QlE= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(346002)(39860400002)(136003)(376002)(396003)(451199018)(36840700001)(40470700004)(46966006)(478600001)(1076003)(186003)(7696005)(45080400002)(16526019)(7636003)(26005)(6666004)(6286002)(41300700001)(47076005)(6916009)(316002)(70206006)(966005)(336012)(8676002)(4326008)(426003)(53546011)(83380400001)(8936002)(36860700001)(5660300002)(2906002)(82740400003)(356005)(82310400005)(86362001)(2616005)(54906003)(70586007)(40460700003)(36756003)(55016003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 06:24:27.2645 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 93495a2a-7204-4ec4-aa30-08db188b46ff X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000C976.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8337 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/01/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/07e68b092cbc347b4ec420e4e74e07e8cfb19064 Thanks. Xueming Li --- >From 07e68b092cbc347b4ec420e4e74e07e8cfb19064 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Tue, 29 Nov 2022 11:00:57 +0100 Subject: [PATCH] drivers: fix symbol exports when map is omitted Cc: Xueming Li [ upstream commit bfc43a0f681c9069a6e1ef9d18027b0fcfc24afc ] 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") Reported-by: Luca Boccassi Signed-off-by: David Marchand Tested-by: Ferruh Yigit Reviewed-by: Bruce Richardson Acked-by: Aaron Conole --- .github/workflows/build.yml | 3 ++- .travis.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82d83f4030..04a975c787 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: none + 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 4bb5bf629e..0ea1242d97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,8 @@ script: ./.ci/${TRAVIS_OS_NAME}-build.sh env: global: - LIBABIGAIL_VERSION=libabigail-1.8 - - REF_GIT_TAG=none + - REF_GIT_REPO=https://dpdk.org/git/dpdk-stable + - REF_GIT_TAG=v22.11.1 jobs: include: -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:41.038294200 +0800 +++ 0001-drivers-fix-symbol-exports-when-map-is-omitted.patch 2023-02-27 14:08:40.719237000 +0800 @@ -1 +1 @@ -From bfc43a0f681c9069a6e1ef9d18027b0fcfc24afc Mon Sep 17 00:00:00 2001 +From 07e68b092cbc347b4ec420e4e74e07e8cfb19064 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit bfc43a0f681c9069a6e1ef9d18027b0fcfc24afc ] @@ -21 +23,0 @@ -Cc: stable@dpdk.org @@ -29,7 +31,3 @@ - .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 + .github/workflows/build.yml | 3 ++- + .travis.yml | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) @@ -38 +36 @@ -index 9527ad1f8c..6bad94098e 100644 +index 82d83f4030..04a975c787 100644 @@ -45 +43 @@ -- REF_GIT_TAG: v22.11 +- REF_GIT_TAG: none @@ -52 +50 @@ -index b99444620f..0936788dc7 100644 +index 4bb5bf629e..0ea1242d97 100644 @@ -58,2 +56,2 @@ - - LIBABIGAIL_VERSION=libabigail-2.1 -- - REF_GIT_TAG=v22.11 + - LIBABIGAIL_VERSION=libabigail-1.8 +- - REF_GIT_TAG=none @@ -65,104 +62,0 @@ -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: *; -+};