From nobody Fri May 3 03:18:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=computer.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1658769348839683.2626954080008; Mon, 25 Jul 2022 10:15:48 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.374728.606886 (Exim 4.92) (envelope-from ) id 1oG1fb-0007Xg-Ey; Mon, 25 Jul 2022 17:15:03 +0000 Received: by outflank-mailman (output) from mailman id 374728.606886; Mon, 25 Jul 2022 17:15:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oG1fb-0007XZ-Bx; Mon, 25 Jul 2022 17:15:03 +0000 Received: by outflank-mailman (input) for mailman id 374728; Mon, 25 Jul 2022 17:15:02 +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 1oG1fa-0007XT-SC for xen-devel@lists.xenproject.org; Mon, 25 Jul 2022 17:15:02 +0000 Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 4f893653-0c3d-11ed-bd2d-47488cf2e6aa; Mon, 25 Jul 2022 19:15:00 +0200 (CEST) Received: from localhost.localdomain (c-174-62-72-237.hsd1.ca.comcast.net [174.62.72.237]) (authenticated bits=0) by c.mail.sonic.net (8.16.1/8.16.1) with ESMTPSA id 26PHD3R7021698 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 25 Jul 2022 10:14:55 -0700 X-Outflank-Mailman: Message body and most headers restored to incoming version 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: 4f893653-0c3d-11ed-bd2d-47488cf2e6aa From: Sarah Newman To: xen-devel@lists.xenproject.org Cc: konrad.wilk@oracle.com, ross.lagerwall@citrix.com, Sarah Newman Subject: [PATCH v3] livepatch: create-diff-object: Check that the section has a secsym Date: Mon, 25 Jul 2022 10:13:02 -0700 Message-Id: <20220725171302.25910-1-sarah.newman@computer.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Sonic-CAuth: UmFuZG9tSVYw7an9Y36xyKou/Ityk+kRmydRdr2FhcFU/JCK9M/WxdIVNlvsx6221yndaODaqA+nI/CrvDASekfPuR8/E4h4 X-Sonic-ID: C;pNjCCj0M7RGWb/U2He8XJw== M;eGqDTT0M7RGWb/U2He8XJw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-ZM-MESSAGEID: 1658769350087100001 Content-Type: text/plain; charset="utf-8" A STT_SECTION symbol is not needed if if it is not used as a relocation target. Therefore, a section, in this case a debug section, may not have a secsym associated with it. Signed-off-by: Bill Wendling Origin: https://github.com/dynup/kpatch.git ba3defa06073 Signed-off-by: Sarah Newman Reviewed-by: Ross Lagerwall --- Changes in v3: - add reviewed-by given to v1 of this patch - restored tag from original commit per sending-patches.pandoc Changes in v2: - commit message changed to use Origin --- create-diff-object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create-diff-object.c b/create-diff-object.c index a516670..780e6c8 100644 --- a/create-diff-object.c +++ b/create-diff-object.c @@ -1484,7 +1484,7 @@ static void kpatch_include_debug_sections(struct kpat= ch_elf *kelf) list_for_each_entry(sec, &kelf->sections, list) { if (is_debug_section(sec)) { sec->include =3D 1; - if (!is_rela_section(sec)) + if (!is_rela_section(sec) && sec->secsym) sec->secsym->include =3D 1; } } --=20 2.17.1