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]
Date:	Fri, 12 Feb 2016 11:57:36 +0100
From:	Ralf Baechle <ralf@...ux-mips.org>
To:	"Maciej W. Rozycki" <macro@...tec.com>
Cc:	Paul Burton <paul.burton@...tec.com>, linux-mips@...ux-mips.org,
	"Steven J. Hill" <Steven.Hill@...tec.com>,
	Joshua Kinard <kumba@...too.org>, linux-kernel@...r.kernel.org,
	Rafał Miłecki <zajec5@...il.com>,
	James Hogan <james.hogan@...tec.com>,
	Markos Chandras <markos.chandras@...tec.com>
Subject: Re: [PATCH] MIPS: tlb-r4k: panic if the MMU doesn't support PAGE_SIZE

On Thu, Feb 11, 2016 at 07:37:12PM +0000, Maciej W. Rozycki wrote:

> > > index 08318ec..4330315 100644
> > > --- a/arch/mips/mm/tlb-r4k.c
> > > +++ b/arch/mips/mm/tlb-r4k.c
> > > @@ -486,6 +487,10 @@ static void r4k_tlb_configure(void)
> > >  	 *     be set to fixed-size pages.
> > >  	 */
> > >  	write_c0_pagemask(PM_DEFAULT_MASK);
> > > +	back_to_back_c0_hazard();
> > > +	if (read_c0_pagemask() != PM_DEFAULT_MASK)
> > > +		panic("MMU doesn't support PAGE_SIZE=0x%lx", PAGE_SIZE);
> 
>  I think it would make sense to report here what the minimum/maximum page 
> size actually supported is, so that the users know what there might be 
> after.

This is a very unlikely error condition to be hit so I'd rather keep it
simple.  Even just BUG_ON() would suffice.

  Ralf

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ