From patchwork Thu Mar 10 15:08:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12776541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CC4ACC433EF for ; Thu, 10 Mar 2022 15:12:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.288430.489069 (Exim 4.92) (envelope-from ) id 1nSKS9-0006ti-OC; Thu, 10 Mar 2022 15:11:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 288430.489069; Thu, 10 Mar 2022 15:11:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nSKS9-0006tb-Kk; Thu, 10 Mar 2022 15:11:45 +0000 Received: by outflank-mailman (input) for mailman id 288430; Thu, 10 Mar 2022 15:11:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nSKS8-0006dy-PJ for xen-devel@lists.xenproject.org; Thu, 10 Mar 2022 15:11:44 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 5d4ec551-a084-11ec-853a-5f4723681683; Thu, 10 Mar 2022 16:11:30 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 5d4ec551-a084-11ec-853a-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1646925103; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=GbMTP6W7ZSddYtznbDAcAhdWrF1w25AtQwobW6NsGfM=; b=MKBQIvblvB9IlNnBA6Kx+zQZAaCHAvrxtcqgARJxzV7OcKB+dVefL30+ EPolCaKqxUxpEsva5vrbt/sONIqIsoiyaxwO2qkyhikPdvLb4z3mHBX0h HiBKLBNXJatxlhbyC0eca34W3ZFlT9WoSlRKDDqq31X2OgH75D0Ur64Vq 0=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 65923548 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:6iso96Cd5V6QnBVW/zLjw5YqxClBgxIJ4kV8jS/XYbTApG501GAHy GJNXj2GPq3fN2L8ctp0bY/i8ktQ7ZPdzYAyQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgHWeIdA970Ug5w7Vg2tYy6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPht0 /x8r6KxZT0zHaTIt/xEfQBBCAZxaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9OohwFuRfWD8Us 6ZCcXZUM07F17neLLGTE4GAguw5K8bmJsUHs2xIxjDFF/c2B5vERs0m4PcGgWZq3Z0STZ4yY eIHU2VeSBrKQyZXI2wIMswGuf2yhSfGJmgwRF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8Ew7puxx16 pNwiawq4dXJQmoplWz2/H4EzVR0makq3srluAey1ZFV5EFVbNXpYsDuGtIDZY7Gj7g4oxPKp gjMCjl3ocWTbqmVQGYgoE2q+bcHUjbXy32D3Tqg/blnQS/xxtCvgklLM92pAZ1yHtycegA2w 3+CNUaqFh/dL5nUUtDPpZyfSLOMB20ffvtChPlHb21LtBPB5ryw6SHlYndotvaPKA18A== X-IronPort-AV: E=Sophos;i="5.90,171,1643691600"; d="scan'208";a="65923548" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NIg/p07TqaXhi2rotEG8q51luUv+aJqcI0NRkE9s4qB7suMjtO0jeUE1/p3F9fKHZiLDAx1U5VCt+TraQThbf8tuVTgujg97bXCPlF+4Ze/8BwKOn5q7uJff5hfYjNX5PqNeUO23PnTN/qI0e61t9bZe6yTqSfxygNwRqC7KTmDfUcY7ehasFtr9A0HVG59/U57N12sZou3dP8Fbc392eoAnbL7uFJ3keTeCPRLmdoo/2VxUogfU12tlZsWaVyTKLyrIdroPiZYvV6gE5TN95/zMxlpbUcCuK80u6LuwVAZMgnTtrLRH9/mUEoG03gjwYSbEWn5Ifh6tYiwrIZzZng== 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=KPIrQ2uUJcoC3uPyB57aRxa3Wp1cquKb0s6A4/jRqUY=; b=NxmmD28ZgdFk2qdxSDGlXXzZE2AVaTxY0YOzbehPxsdl0NJM6ugm3nr0KsxNRe9J0+wP5y+11kAD55zGnhImn3tAUsn9PDY0Es52lHIqCvMjI/w2FGKyALaGcTqyMW+uXblWFRMn5sLvGWcWwJKb1cPemIzzKeVAb3YUT/rZYxWMaRwFFkrUXzLLwsprh/dkTRKroihr33LHgBLFlyPLxeEzPopWUAuurVlV3Mbhva/NuBoKJ3YtXGlDQ8Xou+8K++uBK8Cw61WgDG5d/HQteC5f9HLOuWVsxqg+DP7dxXeZUnmzeJo5nWeTYrfewvcj24qAlho1v+MYJVBxtD/xJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KPIrQ2uUJcoC3uPyB57aRxa3Wp1cquKb0s6A4/jRqUY=; b=QGai4kAFlCO+1qSsnDHmBEwrqiZoN230hf/xbLPkBtAQFw2fW8qew5S3O0n+ybTdYYKZhvAWIC4Qvn6zvpIEYgnnY8zCyr4rpv8fj1a1Mzup9cKbdxM3yMCH4QOW9jACpIhibsF/p4CnadM/mbZk9E9ceK0vtJF3NzW39z4XQAg= From: Roger Pau Monne To: CC: Konrad Rzeszutek Wilk , Ross Lagerwall , , Roger Pau Monne Subject: [PATCH 1/3] livepatch: use basename to perform object file matching Date: Thu, 10 Mar 2022 16:08:32 +0100 Message-ID: <20220310150834.98815-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220310150834.98815-1-roger.pau@citrix.com> References: <20220310150834.98815-1-roger.pau@citrix.com> X-ClientProxiedBy: LO2P123CA0061.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1::25) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e61a2442-5848-46eb-d87a-08da02a846fa X-MS-TrafficTypeDiagnostic: BYAPR03MB3624:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B/iuhW7NSgEXq6ixZHL7SLTuDBhtYdLTHUANRQjw5n4cBnJvTHO8CBtHJBwY2eqUIhQ66gUdlRWsHf7czj0h91LN6I8b0+xprDeGMchYnYlazS42LLVX0oiDoC1EC4loGExjkOxtEOAdP5gfojyZXi4hXG2vKOUyNz+dBiQFSZr61sAxR9RvIXmlUnuSftaAhznIINwtoTey88KEiFXm2a3Zj9qFoPPForBogDyI5sLpcKOO9Y5QjtJUBFUmyhXaU2D0dINmOtAP8fCYArlViO4dEh/xMqQBXp+ZvzfjIhXBWkN69tNMPGrp3ELIYjVWpZhAVYD7xfFrtqNzGzkhqcXjDiiUWNcbMnhquteTDo3hjeKypSgIuk8Cnt0N2bvr/TdLwJN15LbYK26wAGVNw56nSGpS+bHV77EkH3fXWwHyWTJREF0YqyIkh0U+zjBkms0Ee4n14tDC41swMCaHgaPUcU+v5Jfoi7npvfGUo//5C+eHXj/Bpe8PGwS9k7r6yPCLZ8WJcj5k6tsWZzJ6rUeu6LBA6S9uUTDiMGWyCR0OlwuCj5VetwU16HsLnwx9nIfl9TvtDVhnmh3rIwFOKhr2bhYfXQwJ41vAnGKb8nLuESV64uiYEinF+0vtf4PTYi0ZGaKQn8jZIOOVMV01cw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6512007)(186003)(2616005)(26005)(1076003)(86362001)(38100700002)(107886003)(5660300002)(6506007)(2906002)(6666004)(66556008)(8676002)(4326008)(66946007)(66476007)(6486002)(36756003)(316002)(54906003)(6916009)(82960400001)(8936002)(508600001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?HsBqO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6SIR/HA8o6cbb2gDFx?= =?utf-8?q?P4lb67+e5M7cfg1uDbI8N7wOIemzqoC7b0KEMOCX7rZN8D4C0z31w9OGJH/reC51w?= =?utf-8?q?ISwxnO8hcJuxKskyzHM+ojKkndaR5CmpQc1USBTPcgLv4rRemoBZ2LfnPd8gpN4v8?= =?utf-8?q?fYZLIjVKXzFLUJiUo0pDEfq54+VYXh9V+zfIqy/QWLe4o0MpJyIbdSOhzrwt9Wzhq?= =?utf-8?q?kaEIM0LRnxXlWtg6fQIB6ikO6dOMDnXVkkAk4Q5eLzHdMMqDRLAvVu1RV2mxrxchj?= =?utf-8?q?tKJkZ0QBh1LEo6uicHnMo+FDhTkPfpQg5X6a4twgKeR41vQGs2OlywzzsVZzF0YZR?= =?utf-8?q?0CCZiDHEMSMzf90u6+wLdduBDityu00j1D/BlKV0xRWNijPI1nGQ+go1HGMrgxCal?= =?utf-8?q?w4EPHmNppNuRbaGHdAxkVTRyHyn5tD5qMkNOxVXJU6k1Jtm+8vIitEdT8Y4Q9xWPf?= =?utf-8?q?F05IA6iz7HubBmZicyy2e/RZ2ghoXY5tnqUVVp2OR2+S5VmRsMaSvYr13DKto9jOs?= =?utf-8?q?Pk/MT+AY5YvEPduuuR3T0qxcT3Ua7OTOc56w2MiSZGEk9egKXn/PbcP3R+e+UOpjn?= =?utf-8?q?q8+eg3ZYQN68aWTEI5+BNweYCCrdtgNwO86MI/a900VfhPY63KrXg8/ETW1fMuNiz?= =?utf-8?q?FjZO5mHWOweYosJ81QAnKaSXChK8JduK0VhlCHEKQM53P0/4bKLjnAw=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e61a2442-5848-46eb-d87a-08da02a846fa X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 15:11:39.5906 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: OOV7jaF6TLwjlpO7RBw0EMBLWxs5v0aK/J+Xe8cZAsvSiGsnXW5dclJRqF8NCNs9dgJO5CF4Yhz4F3t7PBWHgg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB3624 X-OriginatorOrg: citrix.com The changes in the Xen build logic has resulted in the compiler and objcopy being called from xen/ instead of relative to each object directory. This requires using basename so that the directory is not taken into account when checking against the list of files to be explicitly ignored. Also adjust the paths used to store the differing object files, as with the current logic the resulting path will be wrong when using newer Xen versions, changed_objs would end containing entries like: xen/arch/x86/hvm/vmx/arch/x86/hvm/vmx/vmx.o Signed-off-by: Roger Pau Monné Reviewed-by: Bjoern Doebel --- livepatch-gcc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/livepatch-gcc b/livepatch-gcc index 91333d5..fe782e0 100755 --- a/livepatch-gcc +++ b/livepatch-gcc @@ -32,10 +32,10 @@ if [[ "$TOOLCHAINCMD" =~ $GCC_RE ]] ; then if [ "$1" = "-o" ]; then obj=$2 [[ $2 = */.tmp_*.o ]] && obj=${2/.tmp_/} - case "$obj" in + case "$(basename $obj)" in version.o|\ debug.o|\ - efi/check.o|\ + check.o|\ *.xen-syms.*.o|\ *.xen.efi.*.o|\ built_in.o|\ @@ -46,6 +46,7 @@ if [[ "$TOOLCHAINCMD" =~ $GCC_RE ]] ; then *.o) path="$(pwd)/$(dirname $obj)" dir="${path#$LIVEPATCH_BUILD_DIR}" + obj=$(basename $obj) if [ -n "$LIVEPATCH_CAPTURE_DIR" -a -d "$LIVEPATCH_CAPTURE_DIR" ]; then echo "$dir/$obj" >> "${LIVEPATCH_CAPTURE_DIR}/changed_objs" keep=yes @@ -61,15 +62,16 @@ if [[ "$TOOLCHAINCMD" =~ $GCC_RE ]] ; then done elif [[ "$TOOLCHAINCMD" =~ $OBJCOPY_RE ]] ; then obj="${!#}" - case "$obj" in + case "$(basename $obj)" in version.o|\ debug.o|\ - efi/check.o|\ + check.o|\ .*.o) ;; *.o) path="$(pwd)/$(dirname $obj)" dir="${path#$LIVEPATCH_BUILD_DIR}" + obj=$(basename $obj) if [ -n "$LIVEPATCH_CAPTURE_DIR" -a -d "$LIVEPATCH_CAPTURE_DIR" ]; then echo "$dir/$obj" >> "${LIVEPATCH_CAPTURE_DIR}/changed_objs" keep=yes @@ -85,7 +87,7 @@ ret="$?" if [[ "$keep" = "yes" ]] ; then mkdir -p "$(dirname $LIVEPATCH_CAPTURE_DIR/$dir/$obj)" - cp "$obj" "$LIVEPATCH_CAPTURE_DIR/$dir/$obj" + cp "$path/$obj" "$LIVEPATCH_CAPTURE_DIR/$dir/$obj" fi exit "$ret" From patchwork Thu Mar 10 15:08:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12776543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78D7BC433EF for ; Thu, 10 Mar 2022 15:12:07 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.288431.489079 (Exim 4.92) (envelope-from ) id 1nSKSI-0007Fa-5X; Thu, 10 Mar 2022 15:11:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 288431.489079; Thu, 10 Mar 2022 15:11:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nSKSI-0007FQ-2B; Thu, 10 Mar 2022 15:11:54 +0000 Received: by outflank-mailman (input) for mailman id 288431; Thu, 10 Mar 2022 15:11:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nSKSG-0007Da-HW for xen-devel@lists.xenproject.org; Thu, 10 Mar 2022 15:11:52 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 67d1d6b9-a084-11ec-8eba-a37418f5ba1a; Thu, 10 Mar 2022 16:11:50 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 67d1d6b9-a084-11ec-8eba-a37418f5ba1a DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1646925111; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=6fHjKMi/wGx86a90+Z66LOZxDkm78bQiP95NEwXV0tk=; b=QhCEA8r9peMV5VGR/qSGEoG3zYd0OjrXZVkStZT1t3nxjCXdOPn0c86B RQMGKhw5R0KsgJrMHOQOKJciRYCuyvxg6jlw+zbBb6VtTBiMRnIY3qOi0 8D+U2M0nbGyMqPK6Dr0IffOYYKgnNNpDhgBAlUvnjfzOXip693iBToVFR w=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 65853466 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:tOdTeKMVql+qT17vrR2+l8FynXyQoLVcMsEvi/4bfWQNrUpxgmECn TBMC2qFO/qKZ2P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XVRfxka5jnrCQThmoFg6AF8zdf6TdU4GABE= IronPort-HdrOrdr: A9a23:sXECYKN/zj5He8BcTyP155DYdb4zR+YMi2TDiHofdfUFSKClfp 6V8cjztSWUtN4QMEtQ/exoX5PwPU80lKQFnLX5WI3NYOCIghrPEGgP1/qB/9SkIVyEygc/79 YQT0EdMqyIMbESt6+Ti2PZYrUdKZu8gdqVbI/lvglQpGpRGsZdBmlCe2Om+hocfng4OXN1Lu vV2uN34x6bPVgHZMWyAXcIG8DFut3wjZrjJToLHQQu5gWihS6hrOeSKWnT4j4uFxd0hZsy+2 nMlAL0oo2lrvGA0xfZk0ve9Y5fltfNwsZKQOaMls8WADPxjRvAXvUrZ5Sy+BQO5M2/4lcjl9 fB5z8mIsRI8nvUOlq4pBP8sjOQpwoG2jvH8xu1kHHjqcv2SHYREMxan79UdRPf9g4JoMx8+L gj5RPXi7NnSTf72Ajt7dnBUB9n0mCup2A5rOIVh3tDFaMDdb5qq5AF9k89KuZNIMvD0vFnLA BSNrCd2B4PGmnqLEwx/1MfjeBEZ05DUCtvGSM5y46oOzs/pgEM86JX/r1bop46zuNPd3B13Z W1Dk1WrsA9ciZvV9MEOA4ge7rANoWfe2OEDIqtSW6XYZ3vfUi976LK3A== X-IronPort-AV: E=Sophos;i="5.90,171,1643691600"; d="scan'208";a="65853466" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FiCY7+ZNfBX3XA7yEo8TS561PhPBrdagu2OMJLD9/cZ+WkCdiu/xM9v5i6QzD5+Js9stqvuHUsn+Q+Lwy5ASPo6sKOfE4glpNs2AY4Co1tTil0Q3jweVvpmDqKxWHjCgSQ+c+qoXzVddJhXj0LjlRaS4GgtOHCcsslO/WvWOoNJC6oNY7nLAYBl7QOhfHM/94+ceXZ5JlYbIKoiBMttiGuSr8R5/AJ900JM2sIOcTBek3pQ3RczU/1ZydrR3UeV1rHRWlU1VTugX3sMRBsCMoc91MA7mhoQELFt/LC6mbx63rZ4knCljAxim2XoVZAnnGtQblr7hrtKVM1APnfzy2A== 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=MDDTVvU5pkOqH4mj8UISu1ZWsAuZpj7tZtO5zjXp1J4=; b=H8T69q4s0DbZExg8pjRCQ67+aZl/egfrn7FwBRwA+1VWYvdZrCwNwjapcPbp4OkomvrQZ/ZsyJCf+07bfaCYw1z7ctQ4nvhPIYNsn7EHCbNeczsipK9yOTQ2FB+EuZ1t8a/Axk3UHP5ASPwTqnY0/lnb/R7I1Bby2URRTqAest92STayvAHOXVccCvlmHi1ubMMXGa7GogZvjlMPz0h1ntyeU6aKoXjj1LKtqsVuUN0luSQv/gV4B/Me8j/ov4T0vTvrBfg3Ps9CrQi+wXyWTAdPSwK7V0adLqTRsv063zeyUoxFrgr8MjtN/A4kvxXCsnrvO0KNuqRpQcF/T2+g4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MDDTVvU5pkOqH4mj8UISu1ZWsAuZpj7tZtO5zjXp1J4=; b=Qcmy2I4RIxec4Aj/vZI0DVdOHhsMwwOVFHylU7G0RcV2aeP11Zxoj5DkblUW7sYnaNOBukuUQRse44mwN9LpKsG+UQxVdMgMeH35dQ01AUiXLS6ES8XBfUBr86XwrBzhsmy7aiwiU+JqtbwmbXOPlWj3CB6I2cKpsB+9anyJSOs= From: Roger Pau Monne To: CC: Konrad Rzeszutek Wilk , Ross Lagerwall , , Roger Pau Monne Subject: [PATCH 2/3] livepatch: add extra efi/ objects to be ignored Date: Thu, 10 Mar 2022 16:08:33 +0100 Message-ID: <20220310150834.98815-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220310150834.98815-1-roger.pau@citrix.com> References: <20220310150834.98815-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P123CA0317.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:197::16) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d3da9832-fd74-4d24-553d-08da02a84a32 X-MS-TrafficTypeDiagnostic: BYAPR03MB3624:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gjv9jfppUF+E5oBGZgRCm6YZrr2Lt1s/3lHFYrAOwXySg0k6ue5xKiTUlJVpe8f9l1I39DYuRAC9y9QTlfuvW1x4YHxuH+xbBOC641QwVwMvfitisvH05umjIE/RP7o6C+fYINm2MZ5koBrm3aElJATqwaLddiCm0ySFGrEwArrLSXwHrqpb+QOK7XKbHmTkFEa6Ask/OjpkZTU9LJHrl66sOD0D6XAOpr5syKzn2ZCG0QgtDC+158OTJ+qnxuCHC4cGkJglo10N3XP0h83pj1vi9PzZJBGxJm9dtzIK2EJxS8fz4tY1j3oaTxNNdv2jujt8vslZhh2rdKmDGWKGzmAkOK7y7exUsDUzeDopZWSVAWhu0WJ7cjuopj+auHTFqQFnHxFra5gZCMpFmpAEklJHJVoK1xIvA4AWa5YKZKHUY7LjTTdZKqxlYL/QG9UQxAxXkSI0Ig6FQsKE6H+fIvNpro7cWX74s1+UQT3j6EjyPp4tquEkXEYgs7gM+Sb2kCjxLqG0gWFcwHb7n4Pv+vmMVD8pBD8gS371YeJoEBZEQKBYDcUnS0EkDjk63FbG+8fUytzSAbU8Z7noLa3mp30zA/2z9N67EsWiFszJltoRY62KznrG2CasB7pnycj3raScvplPvTLofRsQ6f0Swg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6512007)(186003)(2616005)(26005)(1076003)(86362001)(38100700002)(107886003)(5660300002)(6506007)(2906002)(6666004)(66556008)(8676002)(4326008)(66946007)(66476007)(6486002)(36756003)(316002)(54906003)(4744005)(6916009)(82960400001)(8936002)(508600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9YMyRLEmqwJ+z+cY+NxTMZFMqvoZ?= =?utf-8?q?tjGedcpIMBnTe/XKEzKpBK6N6MQyxYxphk7exbccUowFqXlKFca0ghwEziUnx+7u1?= =?utf-8?q?cO5MDczeP6CNlnrbVd/l62OY64dUPjmp3Vj3NmRAzq2yuSkAVHlt5Ris62DyTBQdU?= =?utf-8?q?AWu16fFmLfRnGPPUraho345ue9Z7HYrgyh+oIAChfHuDfprpa6v1OA7ciIV6DVPOm?= =?utf-8?q?xBN8H/Gk/kju1s0hfegq8I6gIUO7UpNnqTAhEYgEPisFhBU2OjAtHl75ptljYFXm+?= =?utf-8?q?xGiQlLLgIxPWe8TQUt+J3eZd6ddJOkxKaRjC2x6NzxovciHhqR1kjOI0t3XS9y0/9?= =?utf-8?q?5Xrqf+qkH1fUYH6yDSZqutoEO1hNtnBXMEqrtJqpTrSJLbxB5NRFXvoYSdKvrYua1?= =?utf-8?q?rDKzo1dvzGi000WI1RuFpVjPha4ZkvX6HswaNpbUGzXWC2lzyJ2w6BU+DCi7Ks/vR?= =?utf-8?q?SVf1Z79Vo8DbKBhBeAcyrZYDvoe2yoy6qGqNv7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3tIhyqnM1IVN?= =?utf-8?q?8bNX5GT6AD/V+f/znSjmrkSW5DG5xX277VBPnpizu/zlIuP6Ap32DHz5nbL/FXRVd?= =?utf-8?q?ludCmb17zSqGtzPqOrEk7mbD2xz/CvOPouuK57xv/8J4azmN4ZHMVDXuKPrSmgzgl?= =?utf-8?q?6ytKIpBd9lg+nhm8ztO+4r4TSH+176jDYbUAGZt4bdvvvYvi57IXazY=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: d3da9832-fd74-4d24-553d-08da02a84a32 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 15:11:44.9857 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BrJYn6pT9r5h0Kz/gM7MB+lfniXYnU5pmGHI126A5ZkW2hiwmwIOpwm8QXtO2VVolvgcKD6GWjDCnQ6Mm5DU+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB3624 X-OriginatorOrg: citrix.com The contents of this objects is init only, and cannot be patched. Signed-off-by: Roger Pau Monné Reviewed-by: Bjoern Doebel --- livepatch-gcc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/livepatch-gcc b/livepatch-gcc index fe782e0..b0b9ce4 100755 --- a/livepatch-gcc +++ b/livepatch-gcc @@ -66,6 +66,8 @@ elif [[ "$TOOLCHAINCMD" =~ $OBJCOPY_RE ]] ; then version.o|\ debug.o|\ check.o|\ + boot.o|\ + *.init.o|\ .*.o) ;; *.o) From patchwork Thu Mar 10 15:08:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12776544 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EDB4CC433EF for ; Thu, 10 Mar 2022 15:12:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.288432.489091 (Exim 4.92) (envelope-from ) id 1nSKSM-0007ZZ-HZ; Thu, 10 Mar 2022 15:11:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 288432.489091; Thu, 10 Mar 2022 15:11:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nSKSM-0007ZG-BX; Thu, 10 Mar 2022 15:11:58 +0000 Received: by outflank-mailman (input) for mailman id 288432; Thu, 10 Mar 2022 15:11:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nSKSK-0006dy-TK for xen-devel@lists.xenproject.org; Thu, 10 Mar 2022 15:11:57 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 63a80f69-a084-11ec-853a-5f4723681683; Thu, 10 Mar 2022 16:11:42 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 63a80f69-a084-11ec-853a-5f4723681683 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1646925115; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=alFlq9d6yt3XmMr1Rs6ZKudBRBHktI4LBY4Xm8IKjok=; b=eNIFcHbjVcnqPkT599FbeY5MSTMnSeLLdhO6vwJB1yL/SbysTXxkVfSr WPqx89SNL9Uk9z2Zj8oxqg+PFG+RNw/pG0ZYPEf7ZDd6/SyQoVa2L+jWB sZ+g5Weq+VsjrW8WOWd/BuGYIXw4HJnBTcCa/gSWHmb2/atDpNjFnmAia Y=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 65399632 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Uri086nokhfe4AlT8JDcv9vo5gyaJkRdPkR7XQ2eYbSJt1+Wr1Gzt xIYWmqOM/eOYmT2f913Otm+8UgHvp7cx4JmGQQ9pHpgFyMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8kk/vgqoPUUIYoAAgoLeNfYHpn2EoLd9IR2NYy24DiWlvV4 7senuWEULOb828sWo4rw/rrRCNH5JwebxtB4zTSzdgS1LPvvyF94KA3fMldHFOhKmVgJcaoR v6r8V2M1jixEyHBqD+Suu2TnkUiGtY+NOUV45Zcc/DKbhNq/kTe3kunXRa1hIg+ZzihxrhMJ NtxWZOYcgMUPK6UsvwmVjYBCDsjMqkBpaWePi3q2SCT5xWun3rExvxvCAc9PJEC+/YxCmZLn RAaAGlTNFbZ3bvwme/lDLk37iggBJCD0Ic3oHZvwCufFf87aZvCX7/L9ZlT2zJYasVmQ6uFN ptHMmAHgBLofU1ta3BUEcwHzeKP3WDyLRtFsAqYjP9ii4TU5FMoi+W8WDbPQfSGQshfk0Kwr 2fP7WP/RB0XXPSczjyf+37qme7Lngv8QosZELD+/flv6HWDy2pWBBAIWF+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3gYp0LJGbJfqBY0fblkQS/nxhCvj8lLYIk7zI9HakGOup5Dt T/Q9RVfY51P70rhNpGdZ88qOuMexrwqEH3QSuvyWqOLtBzB5uKke+y3IkI X-IronPort-AV: E=Sophos;i="5.90,171,1643691600"; d="scan'208";a="65399632" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UBpo6PVB2jyLE6M4awiWDiI0uG8BFy3k03EyAhxlrBtLk4vx3Gtcq3sLcFGF85MtqWljZBRoDpJuukbK81nlzjfbsf3pUW67bNxyB4kDENvs/TJGxaXKLaAHdD2aFYGOItrN20uO/z21l4IqPzdnM2GFKPtDpz+Yc2UKuoxrU3416n8weFZxv6SFZaBfCileDchGHW7Luk7bxV1nBcHrpUiyoCXEsw3v3mahKHJ/N6433XNuOZzhQs6Nk/8YJTHsy2o2Gl7THGdDnEpR05oKqStvcB3M0AnZsLE2y1j2wHHG26Mb1N07dS7OvtG2F/B4EANHv0MoAUjlCx2gpK3Org== 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=gqzJJP1ALgqRLG/SatpbTyBtpWv/Y8f9lPVlBNCrbsY=; b=Y/QGpdOP1CMwqBWicJbBqUpDLZlGsav5eyjICvUCBJuioxPUF9OO9W1gfXitP6BuhsFVq6yc2pGn59/DsEH/KXu0kDYpcuu1iDtf86L4zmNb4oFHlRfjf+Diks6pkjduIQD1b/X+KqHHvfS5EeYaaYcrHPVlDLhcOBoUMe8I4Y+Qrqad605U/zASzqet408d3ECq1WV0dRKuIl7VIRqthHnrdFFFH0cxTJSNl0i++VuX1PUUk0mPw9YqZrXuivG3R46ze7KH6YpUGwbW4LvvFlapSK5LQ1u9go439kF2SNwWczppUyV7Ts5eChkeZxQk6y0wy+GspGA4dBzSeJs38A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gqzJJP1ALgqRLG/SatpbTyBtpWv/Y8f9lPVlBNCrbsY=; b=QkfMCZp9HSQlu/gniAC1X1RRAM55WkUIylCRFwcg0hgQ6fq15o2iKLN5X9mxWvRppZAhgiBT6+6wTDhoMjsKF5exFJyRaKcWNgMEuO+9p2tq2qSCJK7JtlTi4KtpSafUeHmk5zY/axdTAZmcmB/5mzeDItmUsDqRv+t9TgRZNUk= From: Roger Pau Monne To: CC: Konrad Rzeszutek Wilk , Ross Lagerwall , , Roger Pau Monne Subject: [PATCH 3/3] livepatch: correctly handle altinstruction sections Date: Thu, 10 Mar 2022 16:08:34 +0100 Message-ID: <20220310150834.98815-4-roger.pau@citrix.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220310150834.98815-1-roger.pau@citrix.com> References: <20220310150834.98815-1-roger.pau@citrix.com> X-ClientProxiedBy: LO2P123CA0004.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:a6::16) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0169b3e-fee1-4a7c-2e38-08da02a84d24 X-MS-TrafficTypeDiagnostic: BYAPR03MB3624:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2KJaLJVMzwuXfGE88nAOKfiT4MDoQSgekbPo1YX3nyw81iGmcCAlnN1SJe89ZCraElji/Bnw3DHU8T0mnkO1zKzW2Sjos8MpcIymkR8npvDybwNGE61CsGA8knUNA9GK3TZXfP+rSPGTTFE6rRr5Ii7I+Ww689pY1JP0vXx53qszzJat6oxMssfSmCh4PfbAMDzrP0X7NkdlLszYcEdM4/Dvmrs4MppNGEwEHzprerTGKS9q8vWg04vilkFuQFRvSl3NXYfe8jCzdJ/z8vMl0oY5CNSgad4CEnPsmH5vLSn+Ut8AFLDSJuhe40VN0CNdUlOSnT1hbmnP9HpXNiv4Ilu9C0ZM6zVkzel44GXQ6MsXzDQqpk2OeCnP5tUW8GGGCM3H+JXAQTvSR2tw74B6nv3afdeXrssrSYDQAX5e8k8i3MmK/PfFe+qVNbdhHcHf6lo1i3Lst4NNfoTQu2UWHmnUZVcCGL/gMJTtlEtAvRdwdjkn3Y5H4uYp1OzNZKs+v2D+Ev5x5Z7OmLGZ1zK5ZIYl9cX2qAlYlUxpgmKSj7T9y6oTDytRegAi56ey72pm8MVulfRAgODvBTQGB7bsoiWHl+umDIhhm2FP8FBUg2RP3i0vxOWq0t6s4FFDDd5UbM36Z9C86L1ufCKDgUZ68Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6512007)(186003)(2616005)(26005)(1076003)(86362001)(38100700002)(107886003)(5660300002)(6506007)(2906002)(6666004)(66556008)(8676002)(4326008)(66946007)(66476007)(6486002)(36756003)(316002)(54906003)(6916009)(82960400001)(8936002)(508600001)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cLko8pCF1NuYpoZ3dgMukYSjc6iG?= =?utf-8?q?2pB5z1qA2FCOFtfR11xzTxJwKradiGyucRPSQnc6J5my735b/72Pb1xsS5zmWIwRl?= =?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utf-8?q?8vruGYVwAMvh/BaD1mx04pzL1uUwiC7pTTrE3yq767fuFO3nkbzXFWtXhZlcLcB3a?= =?utf-8?q?VU4vWrPbyajq+rzskdN/3weiIww79dpg4fqnAq2ie6Kb4ZnYLrslE/aPKfMpsVKCG?= =?utf-8?q?6OpxQYhEcnyBPt4QWUhVnzITlrFWQCn/71MGxwRV+tm2veR4Fq4/JEDpO6Isi6H4S?= =?utf-8?q?SNGAcKmqOjbQqxlP3CXoGBU0aIhjNe4mvpUbdk8Oilh2fIBxqnmh+5ts+biFldvaP?= =?utf-8?q?Wz20yT6GGaR4i/WOBns5mQ77wEDlsa6vb6ahMKRFDoWW1VXmBqvf4b7lKTDHlUcuB?= =?utf-8?q?Lx6lCPmRNbtEhuuifShMDtxDZFNGjVveE/Q0JWM1KpjMqMnoPekXXTxXQ+Rn/Yt+O?= =?utf-8?q?40/kru92LNFXjZ6DkkuDudE5AMrhZgTRr0FKfcfpXYB63Aa8IOcnwG10Db+lqGTFR?= =?utf-8?q?J3amzlX1qk6KbxyHzTZsaqfkGNX7Z3Wk0CqX3UIMNphayooSOB98Gi0bht6CMpX5q?= =?utf-8?q?neCP3YNIlAmuuYDT9rTZy49xvbTD38sLMHnjSN39LRzuE53jRPP0L5TlrGehojZMw?= =?utf-8?q?QW+B4CGDxjnG3JqyYeRcpY9ogGgy+eL4OyNw05Ay3QmrVobzs9FXaeE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e0169b3e-fee1-4a7c-2e38-08da02a84d24 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2022 15:11:49.9428 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: O76STjJ8DfXnHmg74+Avx+p+F2St8wL00HIhwQMAKfgdEpYSkouVvH950t/h8hBigwenl7FO6U7s2Gp8CnM2iQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB3624 X-OriginatorOrg: citrix.com The current handling of altinstructions sections by the livepatch tools is incorrect, as on Xen those sections are part of .init and thus discarded after load. Correctly handle them by just ignoring, as it's done with other .init related sections. While there also add .data.ro_after_init section as a read-only section and introduce some syntactic sugar for comparing section names. Signed-off-by: Roger Pau Monné Reviewed-by: Bjoern Doebel --- I assume this handling of .altinstr* sections was inherited from Linux where the sections are not discarded after load in order to apply alternative patching to the loaded modules after boot. --- common.c | 7 +++++-- create-diff-object.c | 26 -------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/common.c b/common.c index 68a71f7..a148d8a 100644 --- a/common.c +++ b/common.c @@ -249,19 +249,22 @@ int is_text_section(struct section *sec) (sec->sh.sh_flags & SHF_EXECINSTR)); } +#define SEC_MATCH(n) !strncmp(sec->name, n, strlen(n) - 1) int is_rodata_section(struct section *sec) { return sec->sh.sh_type == SHT_PROGBITS && !(sec->sh.sh_flags & (SHF_EXECINSTR | SHF_WRITE)) && - !strncmp(sec->name, ".rodata", 7); + (SEC_MATCH(".rodata") || SEC_MATCH(".data.ro_after_init")); } int is_init_section(struct section *sec) { return sec->sh.sh_type == SHT_PROGBITS && (sec->sh.sh_flags & SHF_ALLOC) && - !strncmp(sec->name, ".init", 5); + (SEC_MATCH(".init") || SEC_MATCH(".text.startup") || + SEC_MATCH(".altinstr") || SEC_MATCH(".ctors")); } +#undef SEC_MATCH int is_debug_section(struct section *sec) { diff --git a/create-diff-object.c b/create-diff-object.c index a516670..ec2afb4 100644 --- a/create-diff-object.c +++ b/create-diff-object.c @@ -995,19 +995,6 @@ static int ex_table_group_size(struct kpatch_elf *kelf, int offset) return size; } -static int altinstructions_group_size(struct kpatch_elf *kelf, int offset) -{ - static int size = 0; - char *str; - if (!size) { - str = getenv("ALT_STRUCT_SIZE"); - size = str ? atoi(str) : 12; - } - - log_debug("altinstr_size=%d\n", size); - return size; -} - static int livepatch_hooks_group_size(struct kpatch_elf *kelf, int offset) { static int size = 0; @@ -1021,11 +1008,6 @@ static int livepatch_hooks_group_size(struct kpatch_elf *kelf, int offset) return size; } -static int undefined_group_size(struct kpatch_elf *kelf, int offset) -{ - return 0; -} - /* * The rela groups in the .fixup section vary in size. The beginning of each * .fixup rela group is referenced by the .ex_table section. To find the size @@ -1099,14 +1081,6 @@ static struct special_section special_sections[] = { .name = ".ex_table", .group_size = ex_table_group_size, }, - { - .name = ".altinstructions", - .group_size = altinstructions_group_size, - }, - { - .name = ".altinstr_replacement", - .group_size = undefined_group_size, - }, { .name = ".livepatch.hooks.load", .group_size = livepatch_hooks_group_size,