All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sarah Newman <sarah.newman@computer.org>
To: xen-devel@lists.xenproject.org
Cc: konrad.wilk@oracle.com, ross.lagerwall@citrix.com,
	Sarah Newman <sarah.newman@computer.org>
Subject: [PATCH v3] livepatch: create-diff-object: Check that the section has a secsym
Date: Mon, 25 Jul 2022 10:13:02 -0700	[thread overview]
Message-ID: <20220725171302.25910-1-sarah.newman@computer.org> (raw)
In-Reply-To: <d45c75a2-81ae-7061-6f75-ed8378fc6d16@suse.com>

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 <morbo@google.com>
Origin: https://github.com/dynup/kpatch.git ba3defa06073
Signed-off-by: Sarah Newman <sarah.newman@computer.org>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
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 kpatch_elf *kelf)
 	list_for_each_entry(sec, &kelf->sections, list) {
 		if (is_debug_section(sec)) {
 			sec->include = 1;
-			if (!is_rela_section(sec))
+			if (!is_rela_section(sec) && sec->secsym)
 				sec->secsym->include = 1;
 		}
 	}
-- 
2.17.1



  reply	other threads:[~2022-07-25 17:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  2:18 [PATCH] livepatch: create-diff-object: Check that the section has a secsym Sarah Newman
2022-07-06  6:54 ` Jan Beulich
2022-07-25  3:20   ` [PATCH v2] " Sarah Newman
2022-07-25  8:04     ` Jan Beulich
2022-07-25 17:13       ` Sarah Newman [this message]
2022-07-26  6:25         ` [PATCH v3] " Jan Beulich
2022-07-26 17:39           ` Sarah Newman
2022-07-13 16:21 ` [PATCH] " Ross Lagerwall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220725171302.25910-1-sarah.newman@computer.org \
    --to=sarah.newman@computer.org \
    --cc=konrad.wilk@oracle.com \
    --cc=ross.lagerwall@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.