All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Various GRUB build fixes
@ 2019-03-19 12:39 Daniel Kiper
  2019-03-19 12:39 ` [PATCH 1/5] verifiers: IA-64 fallout cleanup Daniel Kiper
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-19 12:39 UTC (permalink / raw)
  To: grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder,
	ross.philipson

Hey,

As in subject... I am CC-ing folks who were somehow involved in
doing/reviewing patches touching broken files. If I missed somebody
then sorry about that. Anyway, please take a look.

There are still broken builds which I am going to fix soon. However,
fortunately most of our targets build without any issue right now.

Daniel

 grub-core/kern/compiler-rt.c              | 5 +++--
 grub-core/loader/ia64/efi/linux.c         | 3 +--
 grub-core/loader/mips/linux.c             | 2 +-
 grub-core/loader/powerpc/ieee1275/linux.c | 4 ++--
 include/grub/compiler-rt.h                | 4 +++-
 5 files changed, 10 insertions(+), 8 deletions(-)

Daniel Kiper (5):
      verifiers: IA-64 fallout cleanup
      verifiers: PowerPC fallout cleanup
      verifiers: MIPS fallout cleanup
      mips: Enable __clzsi2()
      sparc: Enable __clzsi2() and __clzdi2()



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

* [PATCH 1/5] verifiers: IA-64 fallout cleanup
  2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
@ 2019-03-19 12:39 ` Daniel Kiper
  2019-03-19 12:39 ` [PATCH 2/5] verifiers: PowerPC " Daniel Kiper
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-19 12:39 UTC (permalink / raw)
  To: grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder,
	ross.philipson

IA-64 fallout cleanup after commit 4d4a8c96e (verifiers: Add possibility
to verify kernel and modules command lines).

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/loader/ia64/efi/linux.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/grub-core/loader/ia64/efi/linux.c b/grub-core/loader/ia64/efi/linux.c
index 639a1f379..7987fd1ba 100644
--- a/grub-core/loader/ia64/efi/linux.c
+++ b/grub-core/loader/ia64/efi/linux.c
@@ -505,8 +505,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
 
   *p = '\0';
 
-  err = grub_verify_string (cmdline, GRUB_VERIFY_KERNEL_CMDLINE);
-  if (err)
+  if (grub_verify_string (cmdline, GRUB_VERIFY_KERNEL_CMDLINE))
     goto fail;
   
   boot_param->command_line = (grub_uint64_t) cmdline;
-- 
2.11.0



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

* [PATCH 2/5] verifiers: PowerPC fallout cleanup
  2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
  2019-03-19 12:39 ` [PATCH 1/5] verifiers: IA-64 fallout cleanup Daniel Kiper
@ 2019-03-19 12:39 ` Daniel Kiper
  2019-03-19 12:39 ` [PATCH 3/5] verifiers: MIPS " Daniel Kiper
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-19 12:39 UTC (permalink / raw)
  To: grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder,
	ross.philipson

PowerPC fallout cleanup after commit 4d4a8c96e (verifiers: Add possibility
to verify kernel and modules command lines) and ca0a4f689 (verifiers: File
type for fine-grained signature-verification controlling).

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/loader/powerpc/ieee1275/linux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/loader/powerpc/ieee1275/linux.c b/grub-core/loader/powerpc/ieee1275/linux.c
index c114e7df4..818b2a86d 100644
--- a/grub-core/loader/powerpc/ieee1275/linux.c
+++ b/grub-core/loader/powerpc/ieee1275/linux.c
@@ -270,7 +270,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
       goto out;
     }
 
-  elf = grub_elf_open (argv[0]);
+  elf = grub_elf_open (argv[0], GRUB_FILE_TYPE_LINUX_KERNEL);
   if (! elf)
     goto out;
 
@@ -303,7 +303,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
   /* Create kernel command line.  */
   grub_memcpy (linux_args, LINUX_IMAGE, sizeof (LINUX_IMAGE));
   if (grub_create_loader_cmdline (argc, argv, linux_args + sizeof (LINUX_IMAGE) - 1,
-				  size))
+				  size, GRUB_VERIFY_KERNEL_CMDLINE))
     goto out;
 
 out:
-- 
2.11.0



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

* [PATCH 3/5] verifiers: MIPS fallout cleanup
  2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
  2019-03-19 12:39 ` [PATCH 1/5] verifiers: IA-64 fallout cleanup Daniel Kiper
  2019-03-19 12:39 ` [PATCH 2/5] verifiers: PowerPC " Daniel Kiper
@ 2019-03-19 12:39 ` Daniel Kiper
  2019-03-19 12:39 ` [PATCH 4/5] mips: Enable __clzsi2() Daniel Kiper
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-19 12:39 UTC (permalink / raw)
  To: grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder,
	ross.philipson

MIPS fallout cleanup after commit 4d4a8c96e (verifiers: Add possibility
to verify kernel and modules command lines).

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/loader/mips/linux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c
index e256c440f..7b723bf18 100644
--- a/grub-core/loader/mips/linux.c
+++ b/grub-core/loader/mips/linux.c
@@ -314,7 +314,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
 
   grub_memcpy (params, LINUX_IMAGE, sizeof (LINUX_IMAGE));
   grub_create_loader_cmdline (argc, argv, params + sizeof (LINUX_IMAGE) - 1,
-			      size);
+			      size, GRUB_VERIFY_KERNEL_CMDLINE);
 #else
   linux_argv = extra;
   argv_off = (grub_uint8_t *) linux_argv - (grub_uint8_t *) playground;
-- 
2.11.0



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

* [PATCH 4/5] mips: Enable __clzsi2()
  2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
                   ` (2 preceding siblings ...)
  2019-03-19 12:39 ` [PATCH 3/5] verifiers: MIPS " Daniel Kiper
@ 2019-03-19 12:39 ` Daniel Kiper
  2019-03-19 12:39 ` [PATCH 5/5] sparc: Enable __clzsi2() and __clzdi2() Daniel Kiper
  2019-03-19 15:16 ` [PATCH 0/5] Various GRUB build fixes Ross Philipson
  5 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-19 12:39 UTC (permalink / raw)
  To: grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder,
	ross.philipson

This patch is similiar to commit e795b9011 (RISC-V: Add libgcc helpers
for clz) but for MIPS target.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/kern/compiler-rt.c | 5 +++--
 include/grub/compiler-rt.h   | 4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c
index e10b6668c..33e08fe06 100644
--- a/grub-core/kern/compiler-rt.c
+++ b/grub-core/kern/compiler-rt.c
@@ -420,8 +420,7 @@ __aeabi_llsl (grub_uint64_t u, int b)
 
 #endif
 
-#ifdef __riscv
-
+#if defined(__mips__) || defined(__riscv)
 /* Based on libgcc from gcc suite. */
 int
 __clzsi2 (grub_uint32_t val)
@@ -447,7 +446,9 @@ __clzsi2 (grub_uint32_t val)
     }
   return (i - val);
 }
+#endif
 
+#ifdef __riscv
 int
 __clzdi2 (grub_uint64_t val)
 {
diff --git a/include/grub/compiler-rt.h b/include/grub/compiler-rt.h
index e6a25c6ea..31c0fd750 100644
--- a/include/grub/compiler-rt.h
+++ b/include/grub/compiler-rt.h
@@ -110,10 +110,12 @@ EXPORT_FUNC (__aeabi_llsr) (grub_uint64_t u, int b);
 
 #endif
 
-#ifdef __riscv
+#if defined(__mips__) || defined(__riscv)
 int
 EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
+#endif
 
+#ifdef __riscv
 int
 EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
 #endif
-- 
2.11.0



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

* [PATCH 5/5] sparc: Enable __clzsi2() and __clzdi2()
  2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
                   ` (3 preceding siblings ...)
  2019-03-19 12:39 ` [PATCH 4/5] mips: Enable __clzsi2() Daniel Kiper
@ 2019-03-19 12:39 ` Daniel Kiper
  2019-03-19 15:16 ` [PATCH 0/5] Various GRUB build fixes Ross Philipson
  5 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-19 12:39 UTC (permalink / raw)
  To: grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder,
	ross.philipson

This patch is similiar to commit e795b9011 (RISC-V: Add libgcc helpers
for clz) but for SPARC target.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/kern/compiler-rt.c | 4 ++--
 include/grub/compiler-rt.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/grub-core/kern/compiler-rt.c b/grub-core/kern/compiler-rt.c
index 33e08fe06..a464200c6 100644
--- a/grub-core/kern/compiler-rt.c
+++ b/grub-core/kern/compiler-rt.c
@@ -420,7 +420,7 @@ __aeabi_llsl (grub_uint64_t u, int b)
 
 #endif
 
-#if defined(__mips__) || defined(__riscv)
+#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
 /* Based on libgcc from gcc suite. */
 int
 __clzsi2 (grub_uint32_t val)
@@ -448,7 +448,7 @@ __clzsi2 (grub_uint32_t val)
 }
 #endif
 
-#ifdef __riscv
+#if defined(__riscv) || defined(__sparc__)
 int
 __clzdi2 (grub_uint64_t val)
 {
diff --git a/include/grub/compiler-rt.h b/include/grub/compiler-rt.h
index 31c0fd750..7591980b4 100644
--- a/include/grub/compiler-rt.h
+++ b/include/grub/compiler-rt.h
@@ -110,12 +110,12 @@ EXPORT_FUNC (__aeabi_llsr) (grub_uint64_t u, int b);
 
 #endif
 
-#if defined(__mips__) || defined(__riscv)
+#if defined(__mips__) || defined(__riscv) || defined(__sparc__)
 int
 EXPORT_FUNC (__clzsi2) (grub_uint32_t val);
 #endif
 
-#ifdef __riscv
+#if defined(__riscv) || defined(__sparc__)
 int
 EXPORT_FUNC (__clzdi2) (grub_uint64_t val);
 #endif
-- 
2.11.0



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

* Re: [PATCH 0/5] Various GRUB build fixes
  2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
                   ` (4 preceding siblings ...)
  2019-03-19 12:39 ` [PATCH 5/5] sparc: Enable __clzsi2() and __clzdi2() Daniel Kiper
@ 2019-03-19 15:16 ` Ross Philipson
  2019-03-20 12:02   ` Daniel Kiper
  5 siblings, 1 reply; 8+ messages in thread
From: Ross Philipson @ 2019-03-19 15:16 UTC (permalink / raw)
  To: Daniel Kiper, grub-devel
  Cc: alexander.burmashev, eric.snowberg, leif.lindholm, phcoder

On 03/19/2019 08:39 AM, Daniel Kiper wrote:
> Hey,
> 
> As in subject... I am CC-ing folks who were somehow involved in
> doing/reviewing patches touching broken files. If I missed somebody
> then sorry about that. Anyway, please take a look.
> 
> There are still broken builds which I am going to fix soon. However,
> fortunately most of our targets build without any issue right now.
> 
> Daniel
> 
>  grub-core/kern/compiler-rt.c              | 5 +++--
>  grub-core/loader/ia64/efi/linux.c         | 3 +--
>  grub-core/loader/mips/linux.c             | 2 +-
>  grub-core/loader/powerpc/ieee1275/linux.c | 4 ++--
>  include/grub/compiler-rt.h                | 4 +++-
>  5 files changed, 10 insertions(+), 8 deletions(-)
> 
> Daniel Kiper (5):
>       verifiers: IA-64 fallout cleanup

It seems like the things fixed in these two would have prevented
compiling. I guess it was not tried on these platforms?

>       verifiers: PowerPC fallout cleanup
>       verifiers: MIPS fallout cleanup>       mips: Enable __clzsi2()
>       sparc: Enable __clzsi2() and __clzdi2()
> 

Anyway, LGTM

Reviewed-by: Ross Philipson <ross.philipson@oracle.com>


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

* Re: [PATCH 0/5] Various GRUB build fixes
  2019-03-19 15:16 ` [PATCH 0/5] Various GRUB build fixes Ross Philipson
@ 2019-03-20 12:02   ` Daniel Kiper
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Kiper @ 2019-03-20 12:02 UTC (permalink / raw)
  To: Ross Philipson
  Cc: grub-devel, alexander.burmashev, eric.snowberg, leif.lindholm, phcoder

On Tue, Mar 19, 2019 at 11:16:52AM -0400, Ross Philipson wrote:
> On 03/19/2019 08:39 AM, Daniel Kiper wrote:
> > Hey,
> >
> > As in subject... I am CC-ing folks who were somehow involved in
> > doing/reviewing patches touching broken files. If I missed somebody
> > then sorry about that. Anyway, please take a look.
> >
> > There are still broken builds which I am going to fix soon. However,
> > fortunately most of our targets build without any issue right now.
> >
> > Daniel
> >
> >  grub-core/kern/compiler-rt.c              | 5 +++--
> >  grub-core/loader/ia64/efi/linux.c         | 3 +--
> >  grub-core/loader/mips/linux.c             | 2 +-
> >  grub-core/loader/powerpc/ieee1275/linux.c | 4 ++--
> >  include/grub/compiler-rt.h                | 4 +++-
> >  5 files changed, 10 insertions(+), 8 deletions(-)
> >
> > Daniel Kiper (5):
> >       verifiers: IA-64 fallout cleanup
>
> It seems like the things fixed in these two would have prevented
> compiling. I guess it was not tried on these platforms?

Nope.

> >       verifiers: PowerPC fallout cleanup
> >       verifiers: MIPS fallout cleanup>       mips: Enable __clzsi2()
> >       sparc: Enable __clzsi2() and __clzdi2()
> >
>
> Anyway, LGTM
>
> Reviewed-by: Ross Philipson <ross.philipson@oracle.com>

Thanks a lot! Patches have been pushed.

Daniel


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

end of thread, other threads:[~2019-03-20 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-19 12:39 [PATCH 0/5] Various GRUB build fixes Daniel Kiper
2019-03-19 12:39 ` [PATCH 1/5] verifiers: IA-64 fallout cleanup Daniel Kiper
2019-03-19 12:39 ` [PATCH 2/5] verifiers: PowerPC " Daniel Kiper
2019-03-19 12:39 ` [PATCH 3/5] verifiers: MIPS " Daniel Kiper
2019-03-19 12:39 ` [PATCH 4/5] mips: Enable __clzsi2() Daniel Kiper
2019-03-19 12:39 ` [PATCH 5/5] sparc: Enable __clzsi2() and __clzdi2() Daniel Kiper
2019-03-19 15:16 ` [PATCH 0/5] Various GRUB build fixes Ross Philipson
2019-03-20 12:02   ` Daniel Kiper

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.