Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1354170 > unrolled thread

[PATCH] livepatch: Fix the error message about unresolvable ambiguity

Started byPetr Mladek <pmladek@suse.com>
First post2016-03-09 15:30 +0100
Last post2016-03-09 22:00 +0100
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] livepatch: Fix the error message about unresolvable ambiguity Petr Mladek <pmladek@suse.com> - 2016-03-09 15:30 +0100
    Re: [PATCH] livepatch: Fix the error message about unresolvable  ambiguity Josh Poimboeuf <jpoimboe@redhat.com> - 2016-03-09 17:20 +0100
      Re: [PATCH] livepatch: Fix the error message about unresolvable  ambiguity Chris J Arges <chris.j.arges@canonical.com> - 2016-03-09 17:50 +0100
    Re: [PATCH] livepatch: Fix the error message about unresolvable  ambiguity Jiri Kosina <jikos@kernel.org> - 2016-03-09 22:00 +0100

#1354170 — [PATCH] livepatch: Fix the error message about unresolvable ambiguity

FromPetr Mladek <pmladek@suse.com>
Date2016-03-09 15:30 +0100
Subject[PATCH] livepatch: Fix the error message about unresolvable ambiguity
Message-ID<raNhF-DP-25@gated-at.bofh.it>
klp_find_callback() stops the search when sympos is not defined and
a second symbol of the same name is found. It means that the current
error message about the unresolvable ambiguity always prints "(2 matches)".

Let's remove this information. The total number of occurrences is
not much helpful. The author of the patch still must put a non-trivial
effort into searching the right position in the object file.

Signed-off-by: Petr Mladek <pmladek@suse.com>
---
 kernel/livepatch/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index bc2c85c064c1..f2eda09e8357 100644
--- a/kernel/livepatch/core.c
+++ b/kernel/livepatch/core.c
@@ -190,8 +190,8 @@ static int klp_find_object_symbol(const char *objname, const char *name,
 	if (args.addr == 0)
 		pr_err("symbol '%s' not found in symbol table\n", name);
 	else if (args.count > 1 && sympos == 0) {
-		pr_err("unresolvable ambiguity (%lu matches) on symbol '%s' in object '%s'\n",
-		       args.count, name, objname);
+		pr_err("unresolvable ambiguity on symbol '%s' in object '%s'\n",
+		       name, objname);
 	} else if (sympos != args.count && sympos > 0) {
 		pr_err("symbol position %lu for symbol '%s' in object '%s' not found\n",
 		       sympos, name, objname ? objname : "vmlinux");
-- 
1.8.5.6

[toc] | [next] | [standalone]


#1354246 — Re: [PATCH] livepatch: Fix the error message about unresolvable ambiguity

FromJosh Poimboeuf <jpoimboe@redhat.com>
Date2016-03-09 17:20 +0100
SubjectRe: [PATCH] livepatch: Fix the error message about unresolvable ambiguity
Message-ID<raP06-1SG-35@gated-at.bofh.it>
In reply to#1354170
On Wed, Mar 09, 2016 at 03:20:59PM +0100, Petr Mladek wrote:
> klp_find_callback() stops the search when sympos is not defined and
> a second symbol of the same name is found. It means that the current
> error message about the unresolvable ambiguity always prints "(2 matches)".
> 
> Let's remove this information. The total number of occurrences is
> not much helpful. The author of the patch still must put a non-trivial
> effort into searching the right position in the object file.
> 
> Signed-off-by: Petr Mladek <pmladek@suse.com>
> ---
>  kernel/livepatch/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> index bc2c85c064c1..f2eda09e8357 100644
> --- a/kernel/livepatch/core.c
> +++ b/kernel/livepatch/core.c
> @@ -190,8 +190,8 @@ static int klp_find_object_symbol(const char *objname, const char *name,
>  	if (args.addr == 0)
>  		pr_err("symbol '%s' not found in symbol table\n", name);
>  	else if (args.count > 1 && sympos == 0) {
> -		pr_err("unresolvable ambiguity (%lu matches) on symbol '%s' in object '%s'\n",
> -		       args.count, name, objname);
> +		pr_err("unresolvable ambiguity on symbol '%s' in object '%s'\n",

While you're at it, can you improve the grammar: s/on/for/ ?

"unresolvable ambiguity *for* symbol..."

Either way,

Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

[toc] | [prev] | [next] | [standalone]


#1354264 — Re: [PATCH] livepatch: Fix the error message about unresolvable ambiguity

FromChris J Arges <chris.j.arges@canonical.com>
Date2016-03-09 17:50 +0100
SubjectRe: [PATCH] livepatch: Fix the error message about unresolvable ambiguity
Message-ID<raPt8-29V-5@gated-at.bofh.it>
In reply to#1354246
On Wed, Mar 09, 2016 at 10:19:46AM -0600, Josh Poimboeuf wrote:
> On Wed, Mar 09, 2016 at 03:20:59PM +0100, Petr Mladek wrote:
> > klp_find_callback() stops the search when sympos is not defined and
> > a second symbol of the same name is found. It means that the current
> > error message about the unresolvable ambiguity always prints "(2 matches)".
> > 
> > Let's remove this information. The total number of occurrences is
> > not much helpful. The author of the patch still must put a non-trivial
> > effort into searching the right position in the object file.
> > 
> > Signed-off-by: Petr Mladek <pmladek@suse.com>
> > ---
> >  kernel/livepatch/core.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
> > index bc2c85c064c1..f2eda09e8357 100644
> > --- a/kernel/livepatch/core.c
> > +++ b/kernel/livepatch/core.c
> > @@ -190,8 +190,8 @@ static int klp_find_object_symbol(const char *objname, const char *name,
> >  	if (args.addr == 0)
> >  		pr_err("symbol '%s' not found in symbol table\n", name);
> >  	else if (args.count > 1 && sympos == 0) {
> > -		pr_err("unresolvable ambiguity (%lu matches) on symbol '%s' in object '%s'\n",
> > -		       args.count, name, objname);
> > +		pr_err("unresolvable ambiguity on symbol '%s' in object '%s'\n",
> 
> While you're at it, can you improve the grammar: s/on/for/ ?
> 
> "unresolvable ambiguity *for* symbol..."
> 
> Either way,
> 
> Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
> 
> -- 
> Josh
>

I agree that the 'matches' error message doesn't added anything helpful.
With the word change above:
Acked-by: Chris J Arges <chris.j.arges@canonical.com>

--chris

[toc] | [prev] | [next] | [standalone]


#1354449 — Re: [PATCH] livepatch: Fix the error message about unresolvable ambiguity

FromJiri Kosina <jikos@kernel.org>
Date2016-03-09 22:00 +0100
SubjectRe: [PATCH] livepatch: Fix the error message about unresolvable ambiguity
Message-ID<raTn5-4Os-25@gated-at.bofh.it>
In reply to#1354170
On Wed, 9 Mar 2016, Petr Mladek wrote:

> klp_find_callback() stops the search when sympos is not defined and
> a second symbol of the same name is found. It means that the current
> error message about the unresolvable ambiguity always prints "(2 matches)".
> 
> Let's remove this information. The total number of occurrences is
> not much helpful. The author of the patch still must put a non-trivial
> effort into searching the right position in the object file.
> 
> Signed-off-by: Petr Mladek <pmladek@suse.com>

I've fixed the grammar as suggested by Josh and applied to 
for-4.6/upstream.

-- 
Jiri Kosina
SUSE Labs

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web