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, 13 Apr 2007 10:15:24 +1000
From:	Nick Piggin <nickpiggin@...oo.com.au>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	William Lee Irwin III <wli@...omorphy.com>,
	Matt Mackall <mpm@...enic.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/13] maps: pagemap, kpagemap, and related cleanups

Andrew Morton wrote:
> On Thu, 12 Apr 2007 16:10:50 -0700
> William Lee Irwin III <wli@...omorphy.com> wrote:

>>+       while (count > 0) {
>>+               chunk = min_t(size_t, count, PAGE_SIZE);
>>+               i = 0;
>>+
>>+               if (pfn == -1) {
>>+                       page[0] = 0;
>>+                       page[1] = 0;
>>+                       ((char *)page)[0] = (ntohl(1) != 1);
> 
> 
> OK.
> 
> 
>>+                       ((char *)page)[1] = PAGE_SHIFT;
> 
> 
> OK.

Shouldn't we just expose page size and endianness by other means? (another file or
syscall).

>>+               for (; i < 2 * chunk / KPMSIZE; i += 2, pfn++) {
>>+                       ppage = pfn_to_page(pfn);
>>+                       if (!ppage) {
>>+                               page[i] = 0;
>>+                               page[i + 1] = 0;
>>+                       } else {
>>+                               page[i] = ppage->flags;
>>+                               page[i + 1] = atomic_read(&ppage->_count);
>>+                       }
>>+               }
> 
> 
> Not a good idea to expose raw flags in this manner - it changes at the drop
> of a hat.  We'd need to also expose the kernel's PG_foo-to-bitnumber
> mapping to make this viable.

I don't think it is viable because that makes the flags part of the
userspace ABI. I wonder what they are needed for.

-- 
SUSE Labs, Novell Inc.
-
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