All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] livepatch: create-diff-object: Check that the section has a secsym
@ 2022-07-06  2:18 Sarah Newman
  2022-07-06  6:54 ` Jan Beulich
  2022-07-13 16:21 ` [PATCH] " Ross Lagerwall
  0 siblings, 2 replies; 8+ messages in thread
From: Sarah Newman @ 2022-07-06  2:18 UTC (permalink / raw)
  To: Xen-devel; +Cc: Sarah Newman

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.

This is a livepatch backport of kpatch upstream commit [1]:
create-diff-object: Check that the section has a secsym ba3defa

Signed-off-by: Sarah Newman <sarah.newman@computer.org>

[1] https://github.com/dynup/kpatch/commit/ba3defa06073dcc69917dbbbb9df570ca4e56612
---
 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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] livepatch: create-diff-object: Check that the section has a secsym
  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-13 16:21 ` [PATCH] " Ross Lagerwall
  1 sibling, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2022-07-06  6:54 UTC (permalink / raw)
  To: Sarah Newman; +Cc: Xen-devel, Konrad Wilk, Ross Lagerwall

On 06.07.2022 04:18, 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.
> 
> This is a livepatch backport of kpatch upstream commit [1]:
> create-diff-object: Check that the section has a secsym ba3defa
> 
> Signed-off-by: Sarah Newman <sarah.newman@computer.org>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

However I think the 7-digit hash above wants either extending to at
least 10 digits (better 12), or dropping altogether for having the
full hash ...

> [1] https://github.com/dynup/kpatch/commit/ba3defa06073dcc69917dbbbb9df570ca4e56612

... here anyway. But I guess the rules set forth in
xen.git:docs/process/sending-patches.pandoc could be applied here,
and hence an Origin: tag would best be used.

The other thing is: You didn't Cc any of the maintainer(s).

Jan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] livepatch: create-diff-object: Check that the section has a secsym
  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-13 16:21 ` Ross Lagerwall
  1 sibling, 0 replies; 8+ messages in thread
From: Ross Lagerwall @ 2022-07-13 16:21 UTC (permalink / raw)
  To: Sarah Newman, Xen-devel

> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> on behalf of Sarah Newman <sarah.newman@computer.org>
> Sent: Wednesday, July 6, 2022 3:18 AM
> To: Xen-devel@lists.xenproject.org <Xen-devel@lists.xenproject.org>
> Cc: Sarah Newman <sarah.newman@computer.org>
> Subject: [PATCH] livepatch: create-diff-object: Check that the section has a secsym 
>  
> 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.
> 
> This is a livepatch backport of kpatch upstream commit [1]:
> create-diff-object: Check that the section has a secsym ba3defa
> 
> Signed-off-by: Sarah Newman <sarah.newman@computer.org>
> 

Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2] livepatch: create-diff-object: Check that the section has a secsym
  2022-07-06  6:54 ` Jan Beulich
@ 2022-07-25  3:20   ` Sarah Newman
  2022-07-25  8:04     ` Jan Beulich
  0 siblings, 1 reply; 8+ messages in thread
From: Sarah Newman @ 2022-07-25  3:20 UTC (permalink / raw)
  To: xen-devel; +Cc: konrad.wilk, ross.lagerwall, Sarah Newman

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 <sarah.newman@computer.org>
---
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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] livepatch: create-diff-object: Check that the section has a secsym
  2022-07-25  3:20   ` [PATCH v2] " Sarah Newman
@ 2022-07-25  8:04     ` Jan Beulich
  2022-07-25 17:13       ` [PATCH v3] " Sarah Newman
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2022-07-25  8:04 UTC (permalink / raw)
  To: Sarah Newman; +Cc: konrad.wilk, ross.lagerwall, xen-devel

On 25.07.2022 05:20, 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.
> 
> Origin: https://github.com/dynup/kpatch.git ba3defa06073
> Signed-off-by: Sarah Newman <sarah.newman@computer.org>
> ---
> Changes in v2:
> - commit message changed to use Origin

With this I don't see why you didn't keep Ross'es R-b. Please help
committers by keeping tags up-to-date.

Jan


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v3] livepatch: create-diff-object: Check that the section has a secsym
  2022-07-25  8:04     ` Jan Beulich
@ 2022-07-25 17:13       ` Sarah Newman
  2022-07-26  6:25         ` Jan Beulich
  0 siblings, 1 reply; 8+ messages in thread
From: Sarah Newman @ 2022-07-25 17:13 UTC (permalink / raw)
  To: xen-devel; +Cc: konrad.wilk, ross.lagerwall, Sarah Newman

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



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v3] livepatch: create-diff-object: Check that the section has a secsym
  2022-07-25 17:13       ` [PATCH v3] " Sarah Newman
@ 2022-07-26  6:25         ` Jan Beulich
  2022-07-26 17:39           ` Sarah Newman
  0 siblings, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2022-07-26  6:25 UTC (permalink / raw)
  To: Sarah Newman; +Cc: konrad.wilk, ross.lagerwall, xen-devel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v3] livepatch: create-diff-object: Check that the section has a secsym
  2022-07-26  6:25         ` Jan Beulich
@ 2022-07-26 17:39           ` Sarah Newman
  0 siblings, 0 replies; 8+ messages in thread
From: Sarah Newman @ 2022-07-26 17:39 UTC (permalink / raw)
  To: Jan Beulich; +Cc: konrad.wilk, ross.lagerwall, xen-devel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-26 17:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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       ` [PATCH v3] " Sarah Newman
2022-07-26  6:25         ` Jan Beulich
2022-07-26 17:39           ` Sarah Newman
2022-07-13 16:21 ` [PATCH] " Ross Lagerwall

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.