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] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0701030954470.26882@localhost.localdomain>
Date:	Wed, 3 Jan 2007 09:55:48 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Jiri Slaby <jirislaby@...il.com>
cc:	Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Replace __get_free_page() + memset(0) with get_zeroed_page()
 calls.

On Wed, 3 Jan 2007, Jiri Slaby wrote:

> Robert P. J. Day wrote:
> [...]
> > index fd82411..b3932e5 100644
> > --- a/include/asm-m68k/sun3_pgalloc.h
> > +++ b/include/asm-m68k/sun3_pgalloc.h
> > @@ -36,12 +36,11 @@ static inline void pte_free(struct page *page)
> >  static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
> >  					  unsigned long address)
> >  {
> > -	unsigned long page = __get_free_page(GFP_KERNEL|__GFP_REPEAT);
> > +	unsigned long page = get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);
> >
> >  	if (!page)
> >  		return NULL;
> >
> > -	memset((void *)page, 0, PAGE_SIZE);
> >  	return (pte_t *) (page);
> >  }
>
> perhaps simply
> return (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT);

i thought about it, but figured i'd keep the change minimal and not
get into any "editorializing."

rday
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ