Re: Any plans for GRUB 2.03 release?

2018-08-01 Thread John Paul Adrian Glaubitz
On 08/01/2018 11:23 PM, Paul Menzel wrote:
> A lot of changes have been made since the GRUB 2.02 release, and
> distribution start to cherry-pick them. In my opinion, it’d be helpful
> if a new release was made.

Daniel and Vladimir actually talked about those plans at FOSDEM [1].

Adrian

> [1] https://www.youtube.com/watch?v=c5aELZYK_5M

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


Any plans for GRUB 2.03 release?

2018-08-01 Thread Paul Menzel
Dear GRUB developers,


A lot of changes have been made since the GRUB 2.02 release, and
distribution start to cherry-pick them. In my opinion, it’d be helpful
if a new release was made.

Do you have already plans?


Kind regards,

Paul


signature.asc
Description: This is a digitally signed message part
___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] Fix an 8 year old typo.

2018-08-01 Thread Peter Jones
Signed-off-by: Peter Jones 
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 5f47a9265f3..9ab683fefac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,7 +307,7 @@ fi
 
 AC_SUBST(bootdirname)
 AC_DEFINE_UNQUOTED(GRUB_BOOT_DIR_NAME, "$bootdirname",
-[Default boot directory name]")
+[Default boot directory name])
 
 AC_ARG_WITH([grubdir],
 AS_HELP_STRING([--with-grubdir=DIR],
-- 
2.17.1


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel


[PATCH] grub-module-verifier: report the filename or modname in errors.

2018-08-01 Thread Peter Jones
Make it so that when grub-module-verifier complains of an issue, it tells you
which module the issue was with.

Signed-off-by: Peter Jones 
---
 util/grub-module-verifier.c|  6 ++--
 util/grub-module-verifierXX.c  | 58 ++
 include/grub/module_verifier.h |  4 +--
 3 files changed, 36 insertions(+), 32 deletions(-)

diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
index a79271f6631..03ba1ab437a 100644
--- a/util/grub-module-verifier.c
+++ b/util/grub-module-verifier.c
@@ -157,7 +157,7 @@ main (int argc, char **argv)
 if (strcmp(archs[arch].name, argv[2]) == 0)
   break;
   if (arch == ARRAY_SIZE(archs))
-grub_util_error("unknown arch: %s", argv[2]);
+grub_util_error("%s: unknown arch: %s", argv[1], argv[2]);
 
   for (whitelist = 0; whitelist < ARRAY_SIZE(whitelists); whitelist++)
 if (strcmp(whitelists[whitelist].arch, argv[2]) == 0
@@ -169,8 +169,8 @@ main (int argc, char **argv)
   module_size = grub_util_get_image_size (argv[1]);
   module_img = grub_util_read_image (argv[1]);
   if (archs[arch].voidp_sizeof == 8)
-grub_module_verify64(module_img, module_size, [arch], 
whitelist_empty);
+grub_module_verify64(argv[1], module_img, module_size, [arch], 
whitelist_empty);
   else
-grub_module_verify32(module_img, module_size, [arch], 
whitelist_empty);
+grub_module_verify32(argv[1], module_img, module_size, [arch], 
whitelist_empty);
   return 0;
 }
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
index b7025e9e418..29846455622 100644
--- a/util/grub-module-verifierXX.c
+++ b/util/grub-module-verifierXX.c
@@ -160,14 +160,15 @@ find_section (const struct grub_module_verifier_arch 
*arch, Elf_Ehdr *e, const c
 }
 
 static void
-check_license (const struct grub_module_verifier_arch *arch, Elf_Ehdr *e)
+check_license (const char * const filename,
+  const struct grub_module_verifier_arch *arch, Elf_Ehdr *e)
 {
   Elf_Shdr *s = find_section (arch, e, ".module_license");
   if (s && (strcmp ((char *) e + grub_target_to_host(s->sh_offset), 
"LICENSE=GPLv3") == 0
|| strcmp ((char *) e + grub_target_to_host(s->sh_offset), 
"LICENSE=GPLv3+") == 0
|| strcmp ((char *) e + grub_target_to_host(s->sh_offset), 
"LICENSE=GPLv2+") == 0))
 return;
-  grub_util_error ("incompatible license");
+  grub_util_error ("%s: incompatible license", filename);
 }
 
 static Elf_Sym *
@@ -233,10 +234,10 @@ check_symbols (const struct grub_module_verifier_arch 
*arch,
   s = find_section (arch, e, ".moddeps");
 
   if (!s)
-   grub_util_error ("no symbol table and no .moddeps section");
+   grub_util_error ("%s: no symbol table and no .moddeps section", 
modname);
 
   if (!s->sh_size)
-   grub_util_error ("no symbol table and empty .moddeps section");
+   grub_util_error ("%s: no symbol table and empty .moddeps section", 
modname);
 
   return;
 }
@@ -257,7 +258,7 @@ check_symbols (const struct grub_module_verifier_arch *arch,
  break;
 
default:
- return grub_util_error ("unknown symbol type `%d'", (int) type);
+ return grub_util_error ("%s: unknown symbol type `%d'", modname, 
(int) type);
}
 }
 }
@@ -283,7 +284,8 @@ is_symbol_local(Elf_Sym *sym)
 }
 
 static void
-section_check_relocations (const struct grub_module_verifier_arch *arch, void 
*ehdr,
+section_check_relocations (const char * const modname,
+  const struct grub_module_verifier_arch *arch, void 
*ehdr,
   Elf_Shdr *s, size_t target_seg_size)
 {
   Elf_Rel *rel, *max;
@@ -292,7 +294,7 @@ section_check_relocations (const struct 
grub_module_verifier_arch *arch, void *e
 
   symtab = get_symtab (arch, ehdr, , );
   if (!symtab)
-grub_util_error ("relocation without symbol table");
+grub_util_error ("%s: relocation without symbol table", modname);
 
   for (rel = (Elf_Rel *) ((char *) ehdr + grub_target_to_host (s->sh_offset)),
 max = (Elf_Rel *) ((char *) rel + grub_target_to_host (s->sh_size));
@@ -303,7 +305,7 @@ section_check_relocations (const struct 
grub_module_verifier_arch *arch, void *e
   unsigned i;
 
   if (target_seg_size < grub_target_to_host (rel->r_offset))
-   grub_util_error ("reloc offset is out of the segment");
+   grub_util_error ("%s: reloc offset is out of the segment", modname);
 
   grub_uint32_t type = ELF_R_TYPE (grub_target_to_host (rel->r_info));
 
@@ -316,17 +318,17 @@ section_check_relocations (const struct 
grub_module_verifier_arch *arch, void *e
   if (arch->supported_relocations[i] != -1)
continue;
   if (!arch->short_relocations)
-   grub_util_error ("unsupported relocation 0x%x", type);
+   grub_util_error ("%s: unsupported relocation 0x%x", modname, type);
   for (i = 0; arch->short_relocations[i] != -1; i++)
if (type == arch->short_relocations[i])
  break;
   if 

[PATCH] module-verifier: make it possible to run checkers on grub-module-verifierxx.c

2018-08-01 Thread Peter Jones
This makes it so you can treat grub-module-verifierxx.c as a file you can
build directly, so syntax checkers like vim's "syntastic" plugin, which uses
"gcc -x c -fsyntax-only" to build it, will work.

One still has to do whatever setup is required to make it pick the right
include dirs, which -W options we use, etc., but this makes it so you can do
the checking on the file you're editing, rather than on a different file.

Signed-off-by: Peter Jones 
---
 util/grub-module-verifier32.c | 2 ++
 util/grub-module-verifier64.c | 2 ++
 util/grub-module-verifierXX.c | 9 +
 3 files changed, 13 insertions(+)

diff --git a/util/grub-module-verifier32.c b/util/grub-module-verifier32.c
index 257229f8f08..ba7d41aafea 100644
--- a/util/grub-module-verifier32.c
+++ b/util/grub-module-verifier32.c
@@ -1,2 +1,4 @@
 #define MODULEVERIFIER_ELF32 1
+#ifndef GRUB_MODULE_VERIFIERXX
 #include "grub-module-verifierXX.c"
+#endif
diff --git a/util/grub-module-verifier64.c b/util/grub-module-verifier64.c
index 4db6b4bedd1..fc23ef800b3 100644
--- a/util/grub-module-verifier64.c
+++ b/util/grub-module-verifier64.c
@@ -1,2 +1,4 @@
 #define MODULEVERIFIER_ELF64 1
+#ifndef GRUB_MODULE_VERIFIERXX
 #include "grub-module-verifierXX.c"
+#endif
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
index 1feaafc9b9e..b7025e9e418 100644
--- a/util/grub-module-verifierXX.c
+++ b/util/grub-module-verifierXX.c
@@ -1,3 +1,12 @@
+#define GRUB_MODULE_VERIFIERXX
+#if !defined(MODULEVERIFIER_ELF32) && !defined(MODULEVERIFIER_ELF64)
+#if __SIZEOF_POINTER__ == 8
+#include "grub-module-verifier64.c"
+#else
+#include "grub-module-verifier64.c"
+#endif
+#endif
+
 #include 
 
 #include 
-- 
2.17.1


___
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel