diff mbox series

[1/5] lib: do not build OID registry in SPL

Message ID 20200415164623.142908-2-xypron.glpk@gmx.de
State Accepted
Commit 4f4d526f593de46a165342259c9cb9648c1e70d8
Headers show
Series lib: reduce SPL size | expand

Commit Message

Heinrich Schuchardt April 15, 2020, 4:46 p.m. UTC
The OID registry is only used by crypto functions that are not built in
SPL. So we should not build it in SPL.

Fixes: a9b45e6e8382 ("lib: add oid registry utility")
Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
---
 lib/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--
2.25.1

Comments

Tom Rini April 16, 2020, 2:32 a.m. UTC | #1
On Wed, Apr 15, 2020 at 06:46:19PM +0200, Heinrich Schuchardt wrote:

> The OID registry is only used by crypto functions that are not built in
> SPL. So we should not build it in SPL.
> 
> Fixes: a9b45e6e8382 ("lib: add oid registry utility")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
>  lib/Makefile | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

This problem shows up with the full secure boot patch series, yes?
Thanks.
Heinrich Schuchardt April 16, 2020, 3:49 p.m. UTC | #2
On 4/16/20 4:32 AM, Tom Rini wrote:
> On Wed, Apr 15, 2020 at 06:46:19PM +0200, Heinrich Schuchardt wrote:
>
>> The OID registry is only used by crypto functions that are not built in
>> SPL. So we should not build it in SPL.
>>
>> Fixes: a9b45e6e8382 ("lib: add oid registry utility")
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>>  lib/Makefile | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> This problem shows up with the full secure boot patch series, yes?
> Thanks.
>

Take origin/master:

pine64-lts_defconfig
+ CONFIG_RSA=y
+ CONFIG_ASYMMETRIC_KEY_TYPE=y
+ CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
+ CONFIG_RSA_PUBLIC_KEY_PARSER=y

and you will see spl/lib/oid_registry.o being built.

These settings will in future be needed for UEFI secure boot.

Best regards

Heinrich
Tom Rini April 16, 2020, 5 p.m. UTC | #3
On Thu, Apr 16, 2020 at 05:49:13PM +0200, Heinrich Schuchardt wrote:
> On 4/16/20 4:32 AM, Tom Rini wrote:
> > On Wed, Apr 15, 2020 at 06:46:19PM +0200, Heinrich Schuchardt wrote:
> >
> >> The OID registry is only used by crypto functions that are not built in
> >> SPL. So we should not build it in SPL.
> >>
> >> Fixes: a9b45e6e8382 ("lib: add oid registry utility")
> >> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> >> ---
> >>  lib/Makefile | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > This problem shows up with the full secure boot patch series, yes?
> > Thanks.
> >
> 
> Take origin/master:
> 
> pine64-lts_defconfig
> + CONFIG_RSA=y
> + CONFIG_ASYMMETRIC_KEY_TYPE=y
> + CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
> + CONFIG_RSA_PUBLIC_KEY_PARSER=y
> 
> and you will see spl/lib/oid_registry.o being built.
> 
> These settings will in future be needed for UEFI secure boot.

Thanks.

Reviewed-by: Tom Rini <trini at konsulko.com>
Tom Rini April 24, 2020, 5:11 p.m. UTC | #4
On Wed, Apr 15, 2020 at 06:46:19PM +0200, Heinrich Schuchardt wrote:

> The OID registry is only used by crypto functions that are not built in
> SPL. So we should not build it in SPL.
> 
> Fixes: a9b45e6e8382 ("lib: add oid registry utility")
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Reviewed-by: Tom Rini <trini at konsulko.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/lib/Makefile b/lib/Makefile
index 32bf3f3693..5d4bb3232c 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -119,6 +119,7 @@  obj-$(CONFIG_$(SPL_TPL_)STRTO) += strto.o
 else
 # Main U-Boot always uses the full printf support
 obj-y += vsprintf.o strto.o
+obj-$(CONFIG_OID_REGISTRY) += oid_registry.o
 endif

 obj-y += date.o
@@ -127,8 +128,6 @@  obj-$(CONFIG_LIB_ELF) += elf.o
 #
 # Build a fast OID lookup registry from include/linux/oid_registry.h
 #
-obj-$(CONFIG_OID_REGISTRY) += oid_registry.o
-
 $(obj)/oid_registry.o: $(obj)/oid_registry_data.c

 $(obj)/oid_registry_data.c: $(srctree)/include/linux/oid_registry.h \