* [PATCH] arm64/efi: Make strnlen() available to the EFI namespace
@ 2016-02-15 19:17 Thierry Reding
2016-02-15 19:23 ` Ard Biesheuvel
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Thierry Reding @ 2016-02-15 19:17 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon
Cc: Mark Brown, linux-arm-kernel, linux-next, Ard Biesheuvel, Rob Herring
From: Thierry Reding <treding@nvidia.com>
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.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
arch/arm64/kernel/image.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h
index c9c62cab25a4..8a1978f4a555 100644
--- a/arch/arm64/kernel/image.h
+++ b/arch/arm64/kernel/image.h
@@ -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);
--
2.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64/efi: Make strnlen() available to the EFI namespace
2016-02-15 19:17 [PATCH] arm64/efi: Make strnlen() available to the EFI namespace Thierry Reding
@ 2016-02-15 19:23 ` Ard Biesheuvel
2016-02-16 10:19 ` Thierry Reding
2016-02-15 19:27 ` Will Deacon
2016-02-16 10:16 ` [PATCH v2] " Thierry Reding
2 siblings, 1 reply; 7+ messages in thread
From: Ard Biesheuvel @ 2016-02-15 19:23 UTC (permalink / raw)
To: Thierry Reding
Cc: Catalin Marinas, Will Deacon, Mark Brown, linux-arm-kernel,
linux-next, Rob Herring
Hi Thierry,
On 15 February 2016 at 20:17, Thierry Reding <thierry.reding@gmail.com> wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> arch/arm64/kernel/image.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h
> index c9c62cab25a4..8a1978f4a555 100644
> --- a/arch/arm64/kernel/image.h
> +++ b/arch/arm64/kernel/image.h
> @@ -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.
> #ifdef CONFIG_KASAN
> __efistub___memcpy = KALLSYMS_HIDE(__pi_memcpy);
> __efistub___memmove = KALLSYMS_HIDE(__pi_memmove);
> --
> 2.7.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64/efi: Make strnlen() available to the EFI namespace
2016-02-15 19:17 [PATCH] arm64/efi: Make strnlen() available to the EFI namespace Thierry Reding
2016-02-15 19:23 ` Ard Biesheuvel
@ 2016-02-15 19:27 ` Will Deacon
2016-02-16 10:16 ` [PATCH v2] " Thierry Reding
2 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2016-02-15 19:27 UTC (permalink / raw)
To: Thierry Reding
Cc: Catalin Marinas, Mark Brown, linux-arm-kernel, linux-next,
Ard Biesheuvel, Rob Herring
On Mon, Feb 15, 2016 at 08:17:36PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> arch/arm64/kernel/image.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h
> index c9c62cab25a4..8a1978f4a555 100644
> --- a/arch/arm64/kernel/image.h
> +++ b/arch/arm64/kernel/image.h
> @@ -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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] arm64/efi: Make strnlen() available to the EFI namespace
2016-02-15 19:17 [PATCH] arm64/efi: Make strnlen() available to the EFI namespace Thierry Reding
2016-02-15 19:23 ` Ard Biesheuvel
2016-02-15 19:27 ` Will Deacon
@ 2016-02-16 10:16 ` Thierry Reding
2016-02-16 10:20 ` Ard Biesheuvel
2016-02-16 10:32 ` Will Deacon
2 siblings, 2 replies; 7+ messages in thread
From: Thierry Reding @ 2016-02-16 10:16 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon
Cc: Mark Brown, linux-next, linux-arm-kernel, Ard Biesheuvel
From: Thierry Reding <treding@nvidia.com>
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.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
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(-)
diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h
index 999633bd7294..352f7abd91c9 100644
--- a/arch/arm64/kernel/image.h
+++ b/arch/arm64/kernel/image.h
@@ -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);
diff --git a/arch/arm64/lib/strnlen.S b/arch/arm64/lib/strnlen.S
index 2ca665711bf2..eae38da6e0bb 100644
--- a/arch/arm64/lib/strnlen.S
+++ b/arch/arm64/lib/strnlen.S
@@ -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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] arm64/efi: Make strnlen() available to the EFI namespace
2016-02-15 19:23 ` Ard Biesheuvel
@ 2016-02-16 10:19 ` Thierry Reding
0 siblings, 0 replies; 7+ messages in thread
From: Thierry Reding @ 2016-02-16 10:19 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: Catalin Marinas, Will Deacon, Mark Brown, linux-arm-kernel,
linux-next, Rob Herring
[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]
On Mon, Feb 15, 2016 at 08:23:22PM +0100, Ard Biesheuvel wrote:
> Hi Thierry,
>
> On 15 February 2016 at 20:17, Thierry Reding <thierry.reding@gmail.com> wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > 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.
> >
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Catalin Marinas <catalin.marinas@arm.com>
> > Cc: Will Deacon <will.deacon@arm.com>
> > Cc: Rob Herring <robh@kernel.org>
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > arch/arm64/kernel/image.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h
> > index c9c62cab25a4..8a1978f4a555 100644
> > --- a/arch/arm64/kernel/image.h
> > +++ b/arch/arm64/kernel/image.h
> > @@ -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()
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] arm64/efi: Make strnlen() available to the EFI namespace
2016-02-16 10:16 ` [PATCH v2] " Thierry Reding
@ 2016-02-16 10:20 ` Ard Biesheuvel
2016-02-16 10:32 ` Will Deacon
1 sibling, 0 replies; 7+ messages in thread
From: Ard Biesheuvel @ 2016-02-16 10:20 UTC (permalink / raw)
To: Thierry Reding
Cc: Catalin Marinas, Will Deacon, Mark Brown, linux-arm-kernel,
linux-next, Rob Herring
On 16 February 2016 at 11:16, Thierry Reding <thierry.reding@gmail.com> wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
> 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(-)
>
> diff --git a/arch/arm64/kernel/image.h b/arch/arm64/kernel/image.h
> index 999633bd7294..352f7abd91c9 100644
> --- a/arch/arm64/kernel/image.h
> +++ b/arch/arm64/kernel/image.h
> @@ -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);
> diff --git a/arch/arm64/lib/strnlen.S b/arch/arm64/lib/strnlen.S
> index 2ca665711bf2..eae38da6e0bb 100644
> --- a/arch/arm64/lib/strnlen.S
> +++ b/arch/arm64/lib/strnlen.S
> @@ -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
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] arm64/efi: Make strnlen() available to the EFI namespace
2016-02-16 10:16 ` [PATCH v2] " Thierry Reding
2016-02-16 10:20 ` Ard Biesheuvel
@ 2016-02-16 10:32 ` Will Deacon
1 sibling, 0 replies; 7+ messages in thread
From: Will Deacon @ 2016-02-16 10:32 UTC (permalink / raw)
To: Thierry Reding
Cc: Catalin Marinas, Mark Brown, linux-arm-kernel, linux-next,
Ard Biesheuvel, Rob Herring
On Tue, Feb 16, 2016 at 11:16:31AM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> 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.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
> Changes in v2:
> - mark strnlen() position independent and refer to __pi_strnlen
Thanks, I'll queue this on the arm64 fixes branch.
Will
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-02-16 10:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 19:17 [PATCH] arm64/efi: Make strnlen() available to the EFI namespace Thierry Reding
2016-02-15 19:23 ` Ard Biesheuvel
2016-02-16 10:19 ` Thierry Reding
2016-02-15 19:27 ` Will Deacon
2016-02-16 10:16 ` [PATCH v2] " Thierry Reding
2016-02-16 10:20 ` Ard Biesheuvel
2016-02-16 10:32 ` Will Deacon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).