From nobody Sun Apr 28 18:43:32 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 1658719409224255.00239954650817; Sun, 24 Jul 2022 20:23:29 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.374356.606396 (Exim 4.92) (envelope-from ) id 1oFogA-0000CH-6g; Mon, 25 Jul 2022 03:22:46 +0000 Received: by outflank-mailman (output) from mailman id 374356.606396; Mon, 25 Jul 2022 03:22:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oFogA-0000CA-3J; Mon, 25 Jul 2022 03:22:46 +0000 Received: by outflank-mailman (input) for mailman id 374356; Mon, 25 Jul 2022 03:22:44 +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 1oFog8-0000C2-Qv for xen-devel@lists.xenproject.org; Mon, 25 Jul 2022 03:22:44 +0000 Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 0960d7e6-0bc9-11ed-bd2d-47488cf2e6aa; Mon, 25 Jul 2022 05:22:41 +0200 (CEST) Received: from localhost.localdomain (c-174-62-72-237.hsd1.ca.comcast.net [174.62.72.237]) (authenticated bits=0) by d.mail.sonic.net (8.16.1/8.16.1) with ESMTPSA id 26P3LrEj027125 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sun, 24 Jul 2022 20:22:37 -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: 0960d7e6-0bc9-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 v2] livepatch: create-diff-object: Check that the section has a secsym Date: Sun, 24 Jul 2022 20:20:53 -0700 Message-Id: <20220725032053.12933-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: UmFuZG9tSVZoC1vw7S/DCY/pzLZLUesW5RkI/M5t3vi1cuMydmAvHEj1dz9TptErxRVfVfXjX1+yIR5WZeeqT3dh8Q67NO41 X-Sonic-ID: C;iB7f7cgL7RGZuLBQfcNRkQ== M;YmcaCMkL7RGZuLBQfcNRkQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-ZM-MESSAGEID: 1658719410700100001 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. Origin: https://github.com/dynup/kpatch.git ba3defa06073 Signed-off-by: Sarah Newman --- 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