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: <CAPcyv4g1cMCDUZGrWz6Epmp4XvYuuLOPneiOTqrRsX1PoOS9gA@mail.gmail.com>
Date:	Thu, 30 Jul 2015 13:59:20 -0700
From:	Dan Williams <dan.j.williams@...el.com>
To:	"Luis R. Rodriguez" <mcgrof@...e.com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	"H. Peter Anvin" <hpa@...or.com>, linux-arch@...r.kernel.org,
	"Kani, Toshimitsu" <toshi.kani@...com>,
	"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Russell King <rmk+kernel@....linux.org.uk>,
	Christoph Hellwig <hch@....de>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v3 01/24] mm: enhance region_is_ram() to region_intersects()

On Thu, Jul 30, 2015 at 1:54 PM, Luis R. Rodriguez <mcgrof@...e.com> wrote:
> On Thu, Jul 30, 2015 at 01:44:44PM -0700, Dan Williams wrote:
>> On Thu, Jul 30, 2015 at 1:42 PM, Luis R. Rodriguez <mcgrof@...e.com> wrote:
>> > On Thu, Jul 30, 2015 at 12:53:45PM -0400, Dan Williams wrote:
>> >> diff --git a/include/linux/mm.h b/include/linux/mm.h
>> >> index 2e872f92dbac..84b05ebedb2d 100644
>> >> --- a/include/linux/mm.h
>> >> +++ b/include/linux/mm.h
>> >> @@ -369,7 +369,14 @@ static inline int put_page_unless_one(struct page *page)
>> >>  }
>> >>
>> >>  extern int page_is_ram(unsigned long pfn);
>> >> -extern int region_is_ram(resource_size_t phys_addr, unsigned long size);
>> >> +
>> >> +enum {
>> >> +     REGION_INTERSECTS,
>> >> +     REGION_DISJOINT,
>> >> +     REGION_MIXED,
>> >> +};
>> >> +
>> >
>> > Can you Kdoc'ify this? Part of the reason for the enum request was this
>> > could be then documented really well. The helper is documented but here
>> > you can go into more detail about each region intersection.
>>
>> Given region_intersects() has its own kdoc I'd probably just say "See
>> region_intersects() for details".
>
> With the kdoc in place in the enum you'd kick people to elaborate when
> extending the enums, whereas without this you'd hope they do it. With
> the enum in place you can also be more verbose.
>

Care to send a patch on what you are thinking?  I wasn't planning on
this enum growing any other entries.
--
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