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, 06 Mar 2009 16:10:23 -0800
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Yinghai Lu <yinghai@...nel.org>, mingo@...e.hu,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86: introduce bootmem_state

H. Peter Anvin wrote:
> Jeremy Fitzhardinge wrote:
>>
>> Please, no.  system_state should be deprecated; its hard enough to 
>> have a notion of some kind of system-wide state, but putting 
>> subsystem specific substates into it just makes things worse.
>>
>
> Does it?  It seems to me to have a bunch of state variables which can 
> interact in $DEITY knows how many ways sounds like a bad idea.

If each state variable describes the state of a single subsystem in a 
well-defined way then it is meaningful and fairly easy to understand;  I 
would love to have a straightforward way to query which allocator is 
safe to use at a given moment.

The total number of states is always going to be subsys1 * subsys2 * 
..., but folding them all into one state variable only makes sense if we 
have a well-defined set of states *and* transitions between them.  But 
even then it implies that we have enough coupling between our subsystems 
that we would even care what their aggregate state is, which is already 
a bad idea.  If we keep the internal workings of our subsystems as 
internal details, then having private state variables is the way to go.

The real problem with system_state is that it has a few broadly-defined 
values, but no real explanation of what they mean, so they end up 
getting used in inappropriate ways (like the virt_addr_valid() thing I 
fixed yesterday).

    J

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