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: <52A793D0.4020306@sr71.net>
Date:	Tue, 10 Dec 2013 14:21:04 -0800
From:	Dave Hansen <dave@...1.net>
To:	Christoph Lameter <cl@...ux.com>
CC:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	kirill.shutemov@...ux.intel.com, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH] [RFC] mm: slab: separate slab_page from 'struct page'

On 12/10/2013 02:00 PM, Christoph Lameter wrote:
>> > We _need_ to share fields when the structure is handed between different
>> > subsystems and it needs to be consistent in both places.  For slab page
>> > at least, the only data that actually gets used consistently is
>> > page->flags.  It seems silly to bend over backwards just to share a
>> > single bitfield.
> If you get corruption in one field then you need to figure out which other
> subsystem could have accessed that field. Its not a single bitfield. There
> are numerous relationships between the fields in struct page.

I'm not saying that every 'struct page' user should get their own
complete structure.  I'm just saying that the *slabs* should get their
own structure.  Let's go through it field by field for the "normal"
'struct page' without debugging options:

page->flags: shared by everybody, needs to be consistent for things 	
		like memory error handling
mapping: unioned over by s_mem for slab
index: unioned over by freelist for sl[oua]b
_count: unioned over by lots of stuff by sl[oua]b
lru: unioned over by lots of stuff by sl[oua]b, including another
	list_head called 'list' which blk-mq.c is now using.
private: opaque storage anyway, but unioned over by sl[au]b

See? *EVERYTHING* is overridden by at least one of the sl?b allocators
except ->flags.  In other words, there *ARE* no relationships when it
comes to the sl?bs, except for page->flags.

--
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