arm64/efi: Make strnlen() available to the EFI namespace
Subsystems (2)
PATCH 1/1 arm64/efi: Make strnlen() available to the EFI namespace
From: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit 91feabc2e224 ("scripts/dtc: Update to upstream commit b06e55c88b9b") use the strnlen() function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.
--- arch/arm64/kernel/image.h | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/kernel/image.h +2 -0
@@ -96,6 +96,8 @@ __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); __efistub_strncmp =KALLSYMS_HIDE (__pi_strncmp); __efistub___flush_dcache_area =KALLSYMS_HIDE (__pi___flush_dcache_area); +__efistub_strnlen =KALLSYMS_HIDE (strnlen); +#ifdef CONFIG_KASAN __efistub___memcpy =KALLSYMS_HIDE (__pi_memcpy); __efistub___memmove =KALLSYMS_HIDE (__pi_memmove);
Signature · 1 line
2.7.1
PATCH 1/1 arm64/efi: Make strnlen() available to the EFI namespace
Hi Thierry,
Quoted 21 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit
91feabc2e224("scripts/dtc: Update to upstream commitb06e55c88b9b") use thestrnlen()function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.Cc Ard Biesheuvel <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Thierry Reding <[email protected]>--- arch/arm64/kernel/image.h | 2 ++ 1 file changed, 2 insertions(+)arch/arm64/kernel/image.h +0
-0
arch/arm64/kernel/image.h __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); · line 100
Quoted 5 lines
arch/arm64/kernel/image.h +2
-0@@ -96,6 +96,8 @@ __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); __efistub_strncmp =KALLSYMS_HIDE (__pi_strncmp); __efistub___flush_dcache_area =KALLSYMS_HIDE (__pi___flush_dcache_area); +__efistub_strnlen =KALLSYMS_HIDE (strnlen); +
To align with the existing code, we should use __pi_strnlen here, and declare the asm version of strnlen with ENDPIPROC()
Thanks,
Ard.
Quoted 6 lines
arch/arm64/kernel/image.h +0
-1#ifdef CONFIG_KASAN __efistub___memcpy =KALLSYMS_HIDE (__pi_memcpy); __efistub___memmove =KALLSYMS_HIDE (__pi_memmove); --2.7.1
PATCH 1/1 arm64/efi: Make strnlen() available to the EFI namespace
Quoted 27 lines · Ard Biesheuvel
Hi Thierry,
Quoted 24 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit
91feabc2e224("scripts/dtc: Update to upstream commitb06e55c88b9b") use thestrnlen()function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.Cc Ard Biesheuvel <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Thierry Reding <[email protected]>--- arch/arm64/kernel/image.h | 2 ++ 1 file changed, 2 insertions(+)arch/arm64/kernel/image.h +0
-0@@ -96,6 +96,8 @@ __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); __efistub_strncmp =KALLSYMS_HIDE (__pi_strncmp); __efistub___flush_dcache_area =KALLSYMS_HIDE (__pi___flush_dcache_area);
Quoted 5 lines
arch/arm64/kernel/image.h __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); · line 100
Quoted 2 lines
arch/arm64/kernel/image.h +2
-0+__efistub_strnlen =KALLSYMS_HIDE (strnlen); +To align with the existing code, we should use
__pi_strnlenhere, and declare the asm version of strnlen withENDPIPROC()
Yes, you're absolutely right. For some reason I had missed the ARM64 implementation of strnlen() in the grep output. Sent a v2 now which is consistent with the existing code.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160216/a3e4386c/attachment.sig>
PATCH 1/1 arm64/efi: Make strnlen() available to the EFI namespace
In reply to Thierry RedingQuoted 21 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit
91feabc2e224("scripts/dtc: Update to upstream commitb06e55c88b9b") use thestrnlen()function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.Cc Ard Biesheuvel <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Thierry Reding <[email protected]>--- arch/arm64/kernel/image.h | 2 ++ 1 file changed, 2 insertions(+)arch/arm64/kernel/image.h +0
-0
arch/arm64/kernel/image.h __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); · line 99
Quoted 4 lines
arch/arm64/kernel/image.h +1
-0@@ -96,6 +96,8 @@ __efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp); __efistub_strncmp =KALLSYMS_HIDE (__pi_strncmp); __efistub___flush_dcache_area =KALLSYMS_HIDE (__pi___flush_dcache_area); +__efistub_strnlen =KALLSYMS_HIDE (strnlen);
Shouldn't this refer to __pi_strnlen once we've established that our strnlen implementation is position independent? It looks like it is, so you just need to s/ENDPROC/ENDPIPROC/ over there to get the symbol defined.
Will
PATCH v2 1/1 arm64/efi: Make strnlen() available to the EFI namespace
In reply to Thierry RedingFrom: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit 91feabc2e224 ("scripts/dtc: Update to upstream commit b06e55c88b9b") use the strnlen() function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.
---
Changes in v2:
- mark strnlen() position independent and refer to __pi_strnlen
arch/arm64/kernel/image.h | 1 + arch/arm64/lib/strnlen.S | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm64/kernel/image.h +1 -0
@@ -89,6 +89,7 @@ __efistub_memcpy = KALLSYMS_HIDE(__pi_memcpy); __efistub_memmove =KALLSYMS_HIDE (__pi_memmove); __efistub_memset =KALLSYMS_HIDE (__pi_memset); __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___flush_dcache_area =KALLSYMS_HIDE (__pi___flush_dcache_area);
arch/arm64/lib/strnlen.S +1 -1
@@ -168,4 +168,4 @@ CPU_LE( lsr tmp2, tmp2, tmp4 ) /* Shift (tmp1 & 63). */ .Lhit_limit: mov len, limit ret -ENDPROC(strnlen) +ENDPIPROC(strnlen)
Signature · 1 line
2.7.1
PATCH v2 1/1 arm64/efi: Make strnlen() available to the EFI namespace
Quoted 7 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit
91feabc2e224("scripts/dtc: Update to upstream commitb06e55c88b9b") use thestrnlen()function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.
Quoted 5 lines
Cc Ard Biesheuvel <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Thierry Reding <[email protected]>
Quoted 33 lines
---
Changes in v2:
- markstrnlen()position independent and refer to__pi_strnlenarch/arm64/kernel/image.h | 1 + arch/arm64/lib/strnlen.S | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)arch/arm64/kernel/image.h +1
-0@@ -89,6 +89,7 @@ __efistub_memcpy = KALLSYMS_HIDE(__pi_memcpy); __efistub_memmove =KALLSYMS_HIDE (__pi_memmove); __efistub_memset =KALLSYMS_HIDE (__pi_memset); __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___flush_dcache_area =KALLSYMS_HIDE (__pi___flush_dcache_area);arch/arm64/lib/strnlen.S +1
-2@@ -168,4 +168,4 @@ CPU_LE( lsr tmp2, tmp2, tmp4 ) /* Shift (tmp1 & 63). */ .Lhit_limit: mov len, limit ret -ENDPROC(strnlen) +ENDPIPROC(strnlen) --2.7.1
PATCH v2 1/1 arm64/efi: Make strnlen() available to the EFI namespace
In reply to Thierry RedingQuoted 7 lines · Thierry Reding
From: Thierry Reding <[email protected]>
Changes introduced in the upstream version of libfdt pulled in by commit
91feabc2e224("scripts/dtc: Update to upstream commitb06e55c88b9b") use thestrnlen()function, which isn't currently available to the EFI name- space. Add it to the EFI namespace to avoid a linker error.
Quoted 8 lines
Cc Ard Biesheuvel <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>Cc Rob Herring <[email protected]>Signed-off-by Thierry Reding <[email protected]>---
Changes in v2:
- markstrnlen()position independent and refer to__pi_strnlen
Thanks, I'll queue this on the arm64 fixes branch.
Will