lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160203161517.GE30470@NP-P-BURTON>
Date:	Wed, 3 Feb 2016 16:15:17 +0000
From:	Paul Burton <paul.burton@...tec.com>
To:	"Maciej W. Rozycki" <macro@...tec.com>
CC:	<linux-mips@...ux-mips.org>, Ralf Baechle <ralf@...ux-mips.org>,
	"James Hogan" <james.hogan@...tec.com>,
	Andrey Konovalov <adech.fo@...il.com>,
	"Steven J. Hill" <Steven.Hill@...tec.com>,
	Andrey Ryabinin <ryabinin.a.a@...il.com>,
	<linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Maciej W. Rozycki" <macro@...ux-mips.org>
Subject: Re: [PATCH 1/5] MIPS: Bail on unsupported module relocs

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ