lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  popa3d-users  crypt-dev  /  oss-security  kernel-hardening  xvendor  musl  sabotage  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4 
Open Source and information security mailing list archives
Looking for a web hosting provider? Try DreamHost (enter the promo code WAIVE to waive the $49.95 setup fee)
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 29 Dec 2006 01:16:07 -0500 (EST)
From:	"Robert P. J. Day" <>
To:	Linux kernel mailing list <>
Subject: replace "memset(...,0,PAGE_SIZE)" calls with "clear_page()"?

  is there some reason there are so many calls of the form

  memset(addr, 0, PAGE_SIZE)

rather than the apparently equivalent invocation of


the majority of architectures appear to define the clear_page() macro
in their include/<arch>/page.h header file, but not entirely
identically, and in some cases that definition is conditional, as with

#define clear_page(page)        mmx_clear_page((void *)(page))
#define clear_page(page)        memset((void *)(page), 0, PAGE_SIZE)

  should it perhaps be part of the CodingStyle doc to use the
clear_page() macro rather than an explicit call to memset()?  (and
should all architectures be required to define that macro?)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ