diff mbox series

[v3] livepatch: create-diff-object: Check that the section has a secsym

Message ID 20220725171302.25910-1-sarah.newman@computer.org (mailing list archive)
State New, archived
Headers show
Series [v3] livepatch: create-diff-object: Check that the section has a secsym | expand

Commit Message

Sarah Newman July 25, 2022, 5:13 p.m. UTC
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(-)

Comments

Jan Beulich July 26, 2022, 6:25 a.m. UTC | #1
On 25.07.2022 19:13, Sarah Newman wrote:
> 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>

Hmm - this wasn't here before. Does this then suggest the patch also
wants to be marked From: Bill?

> 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>

Sigh. I had given R-b on v1 as well. Actually I had meant to commit this
yesterday (with all adjustments made), but as it turns out committers
can't commit to that tree. So it'll be up to Ross or Konrad to actually
take care of this.

Jan
Sarah Newman July 26, 2022, 5:39 p.m. UTC | #2
On 7/25/22 23:25, Jan Beulich wrote:
> On 25.07.2022 19:13, Sarah Newman wrote:
>> 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>
> 
> Hmm - this wasn't here before. Does this then suggest the patch also
> wants to be marked From: Bill?

I don't know what the etiquette is here since this was a commit originally committed to kpatch, I just added that back because the xen patch 
submission guidelines said to preserve original tags.

> 
>> 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>
> 
> Sigh. I had given R-b on v1 as well. Actually I had meant to commit this
> yesterday (with all adjustments made), but as it turns out committers
> can't commit to that tree. So it'll be up to Ross or Konrad to actually
> take care of this.
> 
> Jan
> 

My apologies, I simply missed that.

I am doing this in my spare time. This is the first time I've gone through this process in a couple of years and have only done it a few times total.

Thanks, Sarah
diff mbox series

Patch

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;
 		}
 	}