Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1325608
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Paul Burton <paul.burton@imgtec.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs |
| Date | Wed, 03 Feb 2016 17:20:03 +0100 |
| Message-ID | <qY8jV-4ft-45@gated-at.bofh.it> (permalink) |
| References | <qXWC5-4X7-3@gated-at.bofh.it> <qXWC5-4X7-7@gated-at.bofh.it> <qY4Jl-1TE-31@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8" |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.23 (2014-03-12) |
| X-Originating-IP | [10.100.200.164] |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 41 |
| Organization | linux.* mail to news gateway |
| X-Original-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> |
| X-Original-Date | Wed, 3 Feb 2016 16:15:17 +0000 |
| X-Original-Message-ID | <20160203161517.GE30470@NP-P-BURTON> |
| X-Original-References | <1454471085-20963-1-git-send-email-paul.burton@imgtec.com> <1454471085-20963-2-git-send-email-paul.burton@imgtec.com> <alpine.DEB.2.00.1602031139250.15885@tp.orcam.me.uk> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1325608 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/5] MIPS: Bail on unsupported module relocs Paul Burton <paul.burton@imgtec.com> - 2016-02-03 04:50 +0100
Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs James Hogan <james.hogan@imgtec.com> - 2016-02-03 13:30 +0100
Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs "Maciej W. Rozycki" <macro@imgtec.com> - 2016-02-03 13:30 +0100
Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs Paul Burton <paul.burton@imgtec.com> - 2016-02-03 17:20 +0100
Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs "Maciej W. Rozycki" <macro@imgtec.com> - 2016-02-03 18:00 +0100
csiph-web