Skip to contentSkip to conversation

arm64/efi: Make strrchr() available to the EFI namespace

PATCH In review Rob Herring 4 participants 5 messages Mar 1, 2018 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64/efi: Make strrchr() available to the EFI namespace

libfdt gained a new dependency on strrchr, so make it available to the EFI namespace before we update libfdt.

Thanks to Ard for providing this fix.

---
Please ack. This is a dependency on a dtc upstream sync.

 arch/arm64/kernel/image.h | 1 +
 arch/arm64/lib/strrchr.S  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/image.h +1 -0
index c7fcb232fe47..a820ed07fb80 100644
@@ -103,6 +103,7 @@ __efistub_strlen		= KALLSYMS_HIDE(__pi_strlen);
 __efistub_strnlen		= KALLSYMS_HIDE(__pi_strnlen);
 __efistub_strcmp		= KALLSYMS_HIDE(__pi_strcmp);
 __efistub_strncmp		= KALLSYMS_HIDE(__pi_strncmp);
+__efistub_strrchr		= KALLSYMS_HIDE(__pi_strrchr);
 __efistub___flush_dcache_area	= KALLSYMS_HIDE(__pi___flush_dcache_area);
 
 #ifdef CONFIG_KASAN
arch/arm64/lib/strrchr.S +1 -1
index 61eabd9a289a..f8e2784d5752 100644
@@ -40,4 +40,4 @@ ENTRY(strrchr)
 	b	1b
 2:	mov	x0, x3
 	ret
-ENDPROC(strrchr)
+ENDPIPROC(strrchr)
Signature · 1 line
2.14.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Rob Herring

libfdt gained a new dependency on strrchr, so make it available to the EFI namespace before we update libfdt.

Thanks to Ard for providing this fix.

---
Please ack. This is a dependency on a dtc upstream sync.

As an aside, I noticed that this __efistub prefixing is also being applied to mapping symbols, so we get crazy stuff like __efistub_$x. I didn't get round to working out whether that's going to be problematic, but maybe it's all fine...

Will

Quoted 30 lines
 arch/arm64/kernel/image.h | 1 +
 arch/arm64/lib/strrchr.S  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/image.h +1 -0
index c7fcb232fe47..a820ed07fb80 100644
@@ -103,6 +103,7 @@ __efistub_strlen		= KALLSYMS_HIDE(__pi_strlen);
 __efistub_strnlen		= KALLSYMS_HIDE(__pi_strnlen);
 __efistub_strcmp		= KALLSYMS_HIDE(__pi_strcmp);
 __efistub_strncmp		= KALLSYMS_HIDE(__pi_strncmp);
+__efistub_strrchr		= KALLSYMS_HIDE(__pi_strrchr);
 __efistub___flush_dcache_area	= KALLSYMS_HIDE(__pi___flush_dcache_area);
 
 #ifdef CONFIG_KASAN
arch/arm64/lib/strrchr.S +1 -1
index 61eabd9a289a..f8e2784d5752 100644
@@ -40,4 +40,4 @@ ENTRY(strrchr)
 	b	1b
 2:	mov	x0, x3
 	ret
-ENDPROC(strrchr)
+ENDPIPROC(strrchr)
Signature · 1 line
2.14.1
#2 lore raw
Quoted 13 lines · Will Deacon
Quoted 11 lines · Rob Herring

libfdt gained a new dependency on strrchr, so make it available to the EFI namespace before we update libfdt.

Thanks to Ard for providing this fix.

---
Please ack. This is a dependency on a dtc upstream sync.

Quoted 7 lines

As an aside, I noticed that this __efistub prefixing is also being applied to mapping symbols, so we get crazy stuff like __efistub_$x. I didn't get round to working out whether that's going to be problematic, but maybe it's all fine...

Ugh. Those mapping symbols.

We can filter them explicitly in scripts/kallsyms, I guess, or even better, get rid of all __efistub_ symbols entirely (since they are either aliases or part of __init code)

Quoted 30 lines
Quoted 30 lines
 arch/arm64/kernel/image.h | 1 +
 arch/arm64/lib/strrchr.S  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/image.h +1 -0
index c7fcb232fe47..a820ed07fb80 100644
@@ -103,6 +103,7 @@ __efistub_strlen          = KALLSYMS_HIDE(__pi_strlen);
 __efistub_strnlen            = KALLSYMS_HIDE(__pi_strnlen);
 __efistub_strcmp             = KALLSYMS_HIDE(__pi_strcmp);
 __efistub_strncmp            = KALLSYMS_HIDE(__pi_strncmp);
+__efistub_strrchr            = KALLSYMS_HIDE(__pi_strrchr);
 __efistub___flush_dcache_area        = KALLSYMS_HIDE(__pi___flush_dcache_area);
 
 #ifdef CONFIG_KASAN
arch/arm64/lib/strrchr.S +1 -2
index 61eabd9a289a..f8e2784d5752 100644
@@ -40,4 +40,4 @@ ENTRY(strrchr)
      b       1b
 2:   mov     x0, x3
      ret
-ENDPROC(strrchr)
+ENDPIPROC(strrchr)
--

2.14.1

#3 lore raw
Quoted 22 lines · Ard Biesheuvel
Quoted 13 lines · Will Deacon
Quoted 11 lines · Rob Herring

libfdt gained a new dependency on strrchr, so make it available to the EFI namespace before we update libfdt.

Thanks to Ard for providing this fix.

---
Please ack. This is a dependency on a dtc upstream sync.

Quoted 7 lines

As an aside, I noticed that this __efistub prefixing is also being applied to mapping symbols, so we get crazy stuff like __efistub_$x. I didn't get round to working out whether that's going to be problematic, but maybe it's all fine...

Quoted 5 lines

Ugh. Those mapping symbols.

We can filter them explicitly in scripts/kallsyms, I guess, or even better, get rid of all __efistub_ symbols entirely (since they are either aliases or part of __init code)

Yeah, I started hooking into frob_arch_sections, but I didn't have my ELF hat on so I set it aside for the time being. There were some other weird symbols that ended up in modules, some of them with unprintable characters due to gas generating weird local labels too (I think in BUG()).

Will

maintainer
#4 lore raw
In reply to Rob Herring
Quoted 11 lines · Rob Herring

libfdt gained a new dependency on strrchr, so make it available to the EFI namespace before we update libfdt.

Thanks to Ard for providing this fix.

---
Please ack. This is a dependency on a dtc upstream sync.

So I assume you'll merge this patch via the DT tree and we don't need to pick it up through the arm64 tree.

Signature · 1 line
Catalin