linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] modpost: skip section mismatch warnings on ELF local symbols by default
@ 2018-11-15  0:56 Paul Walmsley
  2018-11-15  0:56 ` [PATCH v2 1/2] modpost: drop unused command line switches Paul Walmsley
  2018-11-15  0:56 ` [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check Paul Walmsley
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Walmsley @ 2018-11-15  0:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Walmsley, Russell King, Jim Wilson, Masahiro Yamada,
	Michal Marek, Sam Ravnborg, Paul Walmsley, linux-kbuild

modpost reports section mismatch warnings on ELF local symbols.  This
caused false positive warnings to be reported for a local symbol name
that would otherwise be elided by matching against a name pattern.
This was observed using a RISC-V gcc 8.2.0 toolchain that generates
section anchors.

To avoid this noise in the common case, this patch series disables
section mismatch warnings on ELF local symbols.  It also drops some
unused command line switches from modpost, per feedback from Sam
Ravnborg <sam@ravnborg.org>.

This modpost series can also be found at:

https://github.com/sifive/riscv-linux/tree/dev/paulw/modpost-elf-local-symbols-v4.20-rc2

The series was tested on a RISC-V build of the SiFive UART serial
driver, at:

https://github.com/sifive/riscv-linux/tree/dev/paulw/serial-v4.19-rc7


Paul Walmsley (2):
  modpost: drop unused command line switches
  modpost: skip ELF local symbols by default during section mismatch
    check

 scripts/mod/modpost.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

Cc: Russell King <linux@armlinux.org.uk>
Cc: Jim Wilson <jimw@sifive.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

-- 
2.19.1


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

* [PATCH v2 1/2] modpost: drop unused command line switches
  2018-11-15  0:56 [PATCH v2 0/2] modpost: skip section mismatch warnings on ELF local symbols by default Paul Walmsley
@ 2018-11-15  0:56 ` Paul Walmsley
  2018-11-16 19:51   ` Sam Ravnborg
  2018-11-21  6:14   ` Masahiro Yamada
  2018-11-15  0:56 ` [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check Paul Walmsley
  1 sibling, 2 replies; 8+ messages in thread
From: Paul Walmsley @ 2018-11-15  0:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Walmsley, Sam Ravnborg, Masahiro Yamada, Michal Marek,
	linux-kbuild, Paul Walmsley

Drop modpost command line switches that are no longer used by
makefile.modpost, upon request from Sam Ravnborg <sam@ravnborg.org>,
who wrote:

    modpost is not supposed to be used outside the kernel build. [...]
    I checked if there were any options supported by modpost that
    was not configurable in makefile.modpost.
    And I could see that the -M and -K options in getopt() was leftovers.
    The code that used these option was was dropped in:
    commit a8773769d1a1 ("Kbuild: clear marker out of modpost")

    Could you add a patch that delete these on top of what you already have.

https://lore.kernel.org/lkml/20181020140835.GA3351@ravnborg.org/

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 scripts/mod/modpost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0d998c54564d..85bd93c63180 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2416,7 +2416,7 @@ int main(int argc, char **argv)
 	struct ext_sym_list *extsym_iter;
 	struct ext_sym_list *extsym_start = NULL;
 
-	while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awM:K:E")) != -1) {
+	while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awE")) != -1) {
 		switch (opt) {
 		case 'i':
 			kernel_read = optarg;
-- 
2.19.1


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

* [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check
  2018-11-15  0:56 [PATCH v2 0/2] modpost: skip section mismatch warnings on ELF local symbols by default Paul Walmsley
  2018-11-15  0:56 ` [PATCH v2 1/2] modpost: drop unused command line switches Paul Walmsley
@ 2018-11-15  0:56 ` Paul Walmsley
  2018-11-16 19:52   ` Sam Ravnborg
  2018-11-21  6:13   ` Masahiro Yamada
  1 sibling, 2 replies; 8+ messages in thread
From: Paul Walmsley @ 2018-11-15  0:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Paul Walmsley, Russell King, Jim Wilson, Masahiro Yamada,
	Michal Marek, Sam Ravnborg, linux-kbuild, Paul Walmsley

During development of a serial console driver with a gcc 8.2.0
toolchain for RISC-V, the following modpost warning appeared:

----
WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
The variable .LANCHOR1 references
the function __init sifive_serial_console_setup()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
----

".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
anchor generation code:

https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473

This was verified by compiling the kernel with -fno-section-anchors.
The serial driver code idiom triggering the warning is standard serial
driver practice, and one that has a specific whitelist inclusion in
modpost.c.

I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
useful for modpost to report section mismatch warnings caused by ELF
local symbols by default.  Local symbols have compiler-generated
names, and thus bypass modpost's whitelisting algorithm, which relies
on the presence of a non-autogenerated symbol name.  This increases
the likelihood that false positive warnings will be generated (as in
the above case).

Thus, disable section mismatch reporting on ELF local symbols.  The
rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
ARM binutils leaking ELF local symbols") and of similar code already
present in modpost.c:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256

This second version of the patch drops the option to keep section
mismatch warnings for local sections, based on feedback from Sam
Ravnborg <sam@ravnborg.org>; and clarifies that these warnings
appear with gcc 8.2.0.

Cc: Russell King <linux@armlinux.org.uk>
Cc: Jim Wilson <jimw@sifive.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Michal Marek <michal.lkml@markovi.net>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
 scripts/mod/modpost.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 85bd93c63180..0fb148171b78 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1253,6 +1253,17 @@ static inline int is_arm_mapping_symbol(const char *str)
 	       && (str[2] == '\0' || str[2] == '.');
 }
 
+/*
+ * If a symbol name follows the convention for ELF-local symbols (i.e., the
+ * name begins with a ".L"), return true; otherwise false.  This is used to
+ * skip section mismatch reporting on ELF-local symbols, due to the risk of
+ * false positives.
+ */
+static inline int is_local_symbol(const char *str)
+{
+	return str[0] == '.' && str[1] == 'L';
+}
+
 /*
  * If there's no name there, ignore it; likewise, ignore it if it's
  * one of the magic symbols emitted used by current ARM tools.
@@ -1535,6 +1546,9 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
 	if (strstarts(fromsym, "reference___initcall"))
 		return;
 
+	if (is_local_symbol(fromsym))
+		return;
+
 	tosec = sec_name(elf, get_secindex(elf, sym));
 	to = find_elf_symbol(elf, r->r_addend, sym);
 	tosym = sym_name(elf, to);
-- 
2.19.1


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

* Re: [PATCH v2 1/2] modpost: drop unused command line switches
  2018-11-15  0:56 ` [PATCH v2 1/2] modpost: drop unused command line switches Paul Walmsley
@ 2018-11-16 19:51   ` Sam Ravnborg
  2018-11-21  6:14   ` Masahiro Yamada
  1 sibling, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2018-11-16 19:51 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-kernel, Masahiro Yamada, Michal Marek, linux-kbuild, Paul Walmsley

On Wed, Nov 14, 2018 at 04:56:01PM -0800, Paul Walmsley wrote:
> Drop modpost command line switches that are no longer used by
> makefile.modpost, upon request from Sam Ravnborg <sam@ravnborg.org>,
> who wrote:
> 
>     modpost is not supposed to be used outside the kernel build. [...]
>     I checked if there were any options supported by modpost that
>     was not configurable in makefile.modpost.
>     And I could see that the -M and -K options in getopt() was leftovers.
>     The code that used these option was was dropped in:
>     commit a8773769d1a1 ("Kbuild: clear marker out of modpost")
> 
>     Could you add a patch that delete these on top of what you already have.
> 
> https://lore.kernel.org/lkml/20181020140835.GA3351@ravnborg.org/
> 
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: linux-kbuild@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>


> ---
>  scripts/mod/modpost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 0d998c54564d..85bd93c63180 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -2416,7 +2416,7 @@ int main(int argc, char **argv)
>  	struct ext_sym_list *extsym_iter;
>  	struct ext_sym_list *extsym_start = NULL;
>  
> -	while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awM:K:E")) != -1) {
> +	while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awE")) != -1) {
>  		switch (opt) {
>  		case 'i':
>  			kernel_read = optarg;
> -- 
> 2.19.1

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

* Re: [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check
  2018-11-15  0:56 ` [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check Paul Walmsley
@ 2018-11-16 19:52   ` Sam Ravnborg
  2018-11-21  6:13   ` Masahiro Yamada
  1 sibling, 0 replies; 8+ messages in thread
From: Sam Ravnborg @ 2018-11-16 19:52 UTC (permalink / raw)
  To: Paul Walmsley
  Cc: linux-kernel, Russell King, Jim Wilson, Masahiro Yamada,
	Michal Marek, linux-kbuild, Paul Walmsley

On Wed, Nov 14, 2018 at 04:56:02PM -0800, Paul Walmsley wrote:
> During development of a serial console driver with a gcc 8.2.0
> toolchain for RISC-V, the following modpost warning appeared:
> 
> ----
> WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
> The variable .LANCHOR1 references
> the function __init sifive_serial_console_setup()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
> ----
> 
> ".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
> anchor generation code:
> 
> https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html
> 
> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473
> 
> This was verified by compiling the kernel with -fno-section-anchors.
> The serial driver code idiom triggering the warning is standard serial
> driver practice, and one that has a specific whitelist inclusion in
> modpost.c.
> 
> I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
> useful for modpost to report section mismatch warnings caused by ELF
> local symbols by default.  Local symbols have compiler-generated
> names, and thus bypass modpost's whitelisting algorithm, which relies
> on the presence of a non-autogenerated symbol name.  This increases
> the likelihood that false positive warnings will be generated (as in
> the above case).
> 
> Thus, disable section mismatch reporting on ELF local symbols.  The
> rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
> ARM binutils leaking ELF local symbols") and of similar code already
> present in modpost.c:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256
> 
> This second version of the patch drops the option to keep section
> mismatch warnings for local sections, based on feedback from Sam
> Ravnborg <sam@ravnborg.org>; and clarifies that these warnings
> appear with gcc 8.2.0.
> 
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Jim Wilson <jimw@sifive.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: linux-kbuild@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

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

* Re: [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check
  2018-11-15  0:56 ` [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check Paul Walmsley
  2018-11-16 19:52   ` Sam Ravnborg
@ 2018-11-21  6:13   ` Masahiro Yamada
  2018-11-21 17:52     ` Paul Walmsley
  1 sibling, 1 reply; 8+ messages in thread
From: Masahiro Yamada @ 2018-11-21  6:13 UTC (permalink / raw)
  To: paul.walmsley
  Cc: Linux Kernel Mailing List, Russell King, jimw, Michal Marek,
	Sam Ravnborg, Linux Kbuild mailing list, Paul Walmsley

Hi Paul,


On Thu, Nov 15, 2018 at 9:57 AM Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> During development of a serial console driver with a gcc 8.2.0
> toolchain for RISC-V, the following modpost warning appeared:
>
> ----
> WARNING: vmlinux.o(.data+0x19b10): Section mismatch in reference from the variable .LANCHOR1 to the function .init.text:sifive_serial_console_setup()
> The variable .LANCHOR1 references
> the function __init sifive_serial_console_setup()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the variable:
> *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console
> ----
>
> ".LANCHOR1" is an ELF local symbol, automatically created by gcc's section
> anchor generation code:
>
> https://gcc.gnu.org/onlinedocs/gccint/Anchored-Addresses.html
>
> https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/varasm.c;h=cd9591a45617464946dcf9a126dde277d9de9804;hb=9fb89fa845c1b2e0a18d85ada0b077c84508ab78#l7473
>
> This was verified by compiling the kernel with -fno-section-anchors.
> The serial driver code idiom triggering the warning is standard serial
> driver practice, and one that has a specific whitelist inclusion in
> modpost.c.
>
> I'm neither a modpost nor an ELF expert, but naively, it doesn't seem
> useful for modpost to report section mismatch warnings caused by ELF
> local symbols by default.  Local symbols have compiler-generated
> names, and thus bypass modpost's whitelisting algorithm, which relies
> on the presence of a non-autogenerated symbol name.  This increases
> the likelihood that false positive warnings will be generated (as in
> the above case).
>
> Thus, disable section mismatch reporting on ELF local symbols.  The
> rationale here is similar to that of commit 2e3a10a1551d ("ARM: avoid
> ARM binutils leaking ELF local symbols") and of similar code already
> present in modpost.c:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/mod/modpost.c?h=v4.19-rc4&id=7876320f88802b22d4e2daf7eb027dd14175a0f8#n1256
>
> This second version of the patch drops the option to keep section
> mismatch warnings for local sections, based on feedback from Sam
> Ravnborg <sam@ravnborg.org>; and clarifies that these warnings
> appear with gcc 8.2.0.
>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Jim Wilson <jimw@sifive.com>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: linux-kbuild@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---
>  scripts/mod/modpost.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 85bd93c63180..0fb148171b78 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1253,6 +1253,17 @@ static inline int is_arm_mapping_symbol(const char *str)
>                && (str[2] == '\0' || str[2] == '.');
>  }
>
> +/*
> + * If a symbol name follows the convention for ELF-local symbols (i.e., the
> + * name begins with a ".L"), return true; otherwise false.  This is used to
> + * skip section mismatch reporting on ELF-local symbols, due to the risk of
> + * false positives.
> + */
> +static inline int is_local_symbol(const char *str)
> +{
> +       return str[0] == '.' && str[1] == 'L';
> +}
> +
>  /*
>   * If there's no name there, ignore it; likewise, ignore it if it's
>   * one of the magic symbols emitted used by current ARM tools.
> @@ -1535,6 +1546,9 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
>         if (strstarts(fromsym, "reference___initcall"))
>                 return;
>
> +       if (is_local_symbol(fromsym))
> +               return;
> +
>         tosec = sec_name(elf, get_secindex(elf, sym));
>         to = find_elf_symbol(elf, r->r_addend, sym);
>         tosym = sym_name(elf, to);
> --
> 2.19.1
>


I think this is almost good.
Just a nit.

Maybe, putting this check in secref_whitelist()
(with a comment "Pattern 6:")
could look more consistency.


Also, if you use strstart() helper,
you can remove is_local_symbol() function.


        /* Check for pattern 6 */
        if (strstarts(fromsym, ".L"))
                return 0;




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH v2 1/2] modpost: drop unused command line switches
  2018-11-15  0:56 ` [PATCH v2 1/2] modpost: drop unused command line switches Paul Walmsley
  2018-11-16 19:51   ` Sam Ravnborg
@ 2018-11-21  6:14   ` Masahiro Yamada
  1 sibling, 0 replies; 8+ messages in thread
From: Masahiro Yamada @ 2018-11-21  6:14 UTC (permalink / raw)
  To: paul.walmsley
  Cc: Linux Kernel Mailing List, Sam Ravnborg, Michal Marek,
	Linux Kbuild mailing list, Paul Walmsley

On Thu, Nov 15, 2018 at 9:56 AM Paul Walmsley <paul.walmsley@sifive.com> wrote:
>
> Drop modpost command line switches that are no longer used by
> makefile.modpost, upon request from Sam Ravnborg <sam@ravnborg.org>,
> who wrote:
>
>     modpost is not supposed to be used outside the kernel build. [...]
>     I checked if there were any options supported by modpost that
>     was not configurable in makefile.modpost.
>     And I could see that the -M and -K options in getopt() was leftovers.
>     The code that used these option was was dropped in:
>     commit a8773769d1a1 ("Kbuild: clear marker out of modpost")
>
>     Could you add a patch that delete these on top of what you already have.
>
> https://lore.kernel.org/lkml/20181020140835.GA3351@ravnborg.org/
>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Cc: Michal Marek <michal.lkml@markovi.net>
> Cc: linux-kbuild@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> ---

Applied to linux-kbuild.
Thanks!



>  scripts/mod/modpost.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 0d998c54564d..85bd93c63180 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -2416,7 +2416,7 @@ int main(int argc, char **argv)
>         struct ext_sym_list *extsym_iter;
>         struct ext_sym_list *extsym_start = NULL;
>
> -       while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awM:K:E")) != -1) {
> +       while ((opt = getopt(argc, argv, "i:I:e:mnsST:o:awE")) != -1) {
>                 switch (opt) {
>                 case 'i':
>                         kernel_read = optarg;
> --
> 2.19.1
>


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check
  2018-11-21  6:13   ` Masahiro Yamada
@ 2018-11-21 17:52     ` Paul Walmsley
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Walmsley @ 2018-11-21 17:52 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: paul.walmsley, Linux Kernel Mailing List, Russell King, jimw,
	Michal Marek, Sam Ravnborg, Linux Kbuild mailing list,
	Paul Walmsley

Hello Masahiro,

On Wed, 21 Nov 2018, Masahiro Yamada wrote:

> I think this is almost good.
> Just a nit.
>
> Maybe, putting this check in secref_whitelist()
> (with a comment "Pattern 6:")
> could look more consistency.
>
>
> Also, if you use strstart() helper,
> you can remove is_local_symbol() function.
>
>
>        /* Check for pattern 6 */
>        if (strstarts(fromsym, ".L"))
>                return 0;
>

Thank you for your suggestion.  This change is a definite improvement. 
The patch has been updated, and I will repost the patch after it's been 
tested.

Best regards,

- Paul

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

end of thread, other threads:[~2018-11-21 17:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15  0:56 [PATCH v2 0/2] modpost: skip section mismatch warnings on ELF local symbols by default Paul Walmsley
2018-11-15  0:56 ` [PATCH v2 1/2] modpost: drop unused command line switches Paul Walmsley
2018-11-16 19:51   ` Sam Ravnborg
2018-11-21  6:14   ` Masahiro Yamada
2018-11-15  0:56 ` [PATCH v2 2/2] modpost: skip ELF local symbols by default during section mismatch check Paul Walmsley
2018-11-16 19:52   ` Sam Ravnborg
2018-11-21  6:13   ` Masahiro Yamada
2018-11-21 17:52     ` Paul Walmsley

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).