From: Paul Burton <paul.burton@imgtec.com>
To: "Maciej W. Rozycki" <macro@imgtec.com>
Cc: <linux-mips@linux-mips.org>, Ralf Baechle <ralf@linux-mips.org>,
"James Hogan" <james.hogan@imgtec.com>,
Andrey Konovalov <adech.fo@gmail.com>,
"Steven J. Hill" <Steven.Hill@imgtec.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
<linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs
Date: Wed, 3 Feb 2016 16:15:17 +0000 [thread overview]
Message-ID: <20160203161517.GE30470@NP-P-BURTON> (raw)
In-Reply-To: <alpine.DEB.2.00.1602031139250.15885@tp.orcam.me.uk>
On Wed, Feb 03, 2016 at 12:24:38PM +0000, Maciej W. Rozycki wrote:
> On Wed, 3 Feb 2016, Paul Burton wrote:
>
> > --- a/arch/mips/kernel/module-rela.c
> > +++ b/arch/mips/kernel/module-rela.c
> > @@ -134,9 +135,21 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
> > return -ENOENT;
> > }
> >
> > - v = sym->st_value + rel[i].r_addend;
> > + type = ELF_MIPS_R_TYPE(rel[i]);
> > +
> > + if (type < ARRAY_SIZE(reloc_handlers_rela))
> > + handler = reloc_handlers_rela[type];
> > + else
> > + handler = NULL;
> >
> > - res = reloc_handlers_rela[ELF_MIPS_R_TYPE(rel[i])](me, location, v);
> > + if (!handler) {
> > + pr_warn("%s: Unknown relocation type %u\n",
> > + me->name, type);
> > + return -EINVAL;
>
> Hmm, this looks like a fatal error condition to me, the module won't
> load. Why `pr_warn' rather than `pr_err' then? Likewise in the other
> file.
>
> Maciej
Hi Maciej,
To me fatality implies death, and nothing dies here. The module isn't
loaded but that's done gracefully & is not likely due to an error in the
kernel - it's far more likely that the module isn't valid. So to me,
warning seems appropriate rather than implying an error in the kernel.
Having said that I think it's a non-issue & don't really care either
way, so if Ralf wants it to be pr_err fine.
Thanks,
Paul
next prev parent reply other threads:[~2016-02-03 16:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-03 3:44 [PATCH 0/5] Support new MIPSr6 relocations Paul Burton
2016-02-03 3:44 ` [PATCH 1/5] MIPS: Bail on unsupported module relocs Paul Burton
2016-02-03 12:23 ` James Hogan
2016-02-03 12:24 ` Maciej W. Rozycki
2016-02-03 16:15 ` Paul Burton [this message]
2016-02-03 16:55 ` Maciej W. Rozycki
2016-02-03 3:44 ` [PATCH 2/5] MIPS: module-rela: Make consistent use of pr_*() Paul Burton
2016-02-03 3:44 ` [PATCH 3/5] MIPS: Add support for 64-bit R6 ELF relocations Paul Burton
2016-02-03 3:44 ` [PATCH 4/5] MIPS: Support R_MIPS_PC16 rel-style reloc Paul Burton
2016-02-03 10:25 ` Sergei Shtylyov
2016-02-03 10:32 ` Paul Burton
2016-02-03 10:36 ` Sergei Shtylyov
2016-02-03 10:48 ` Paul Burton
2016-02-03 12:49 ` James Hogan
2016-02-03 3:44 ` [PATCH 5/5] MIPS: Implement MIPSr6 R_MIPS_PC2x rel-style relocs Paul Burton
2016-02-03 12:47 ` James Hogan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160203161517.GE30470@NP-P-BURTON \
--to=paul.burton@imgtec.com \
--cc=Steven.Hill@imgtec.com \
--cc=adech.fo@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=macro@imgtec.com \
--cc=macro@linux-mips.org \
--cc=ralf@linux-mips.org \
--cc=ryabinin.a.a@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox