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: <24a109a8fa0f45011daf3e2b55172392@kernel.crashing.org>
Date:	Tue, 2 Jan 2007 13:22:43 +0100
From:	Segher Boessenkool <segher@...nel.crashing.org>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc:	linux-kernel@...r.kernel.org, devel@...top.org,
	David Miller <davem@...emloft.net>, David Kahn <dmk@...x.com>,
	Mitch Bradley <wmb@...mworks.com>, jg@...top.org
Subject: Re: [PATCH] Open Firmware device tree virtual filesystem

> Except that none of the powerpc platforms can keep OF alive after the
> kernel has booted, which is why we do an in-memory copy of the tree.

Adding that functionality hasn't gotten easier at all since
we use the flattened tree for everything, heh.

> We have well defined interfaces to access that copy and you should do
> the same on i386.

There should be a well-defined "C-style" interface, yes.  But it
does _not_ have to be a copy of the data and it does _not_ have
to be the same interface.

You also can't require "i386" to add that stuff right now, when
they only have one user (the fs code) that is perfectly happy
calling the low-level interface for the three or four calls it
needs.

> We also have defined mecanisms for non-OF firmwares to pass 
> device-trees
> that follow the OF defined bindings, mostly for embedded things (and
> there are already some of these on the field).

Yeah, and that's a great thing.  Any "unified" interface we
come up with should support both those "flat trees", and
"real OF trees", but also "real, still alive during kernel
run-time, OF".

> There are some performances advantages, when walking the tree later on,
> in not using direct OF accesses all the time (on platforms where that 
> is
> possible at all) too.

Yes.  A problem that can easily be solved by a little cache
thing (for the device nodes, not even the property data) if
it turns out to be a real advantage.

> In addition, the kernel implementation with the
> in-memory tree adds some refcounting and locking while I suspect that 
> to
> access a real OF, you have to hard-single-thread everything.

Not single thread -- but a "global OF lock" yes.  Not that
it matters too much, (almost) all property accesses are init
time anyway (which is effectively single threaded).

> Finally, you can't have something as simple as powerpc's get_property()
> (that just returns a pointer to the property content) with direct OF
> access unless you use some magic static buffer or some crap around 
> those
> lines, or add passing of a buffer in, so from a driver pointer of view,
> the interface provided by powerpc/sparc is nicer.

But since you have a _put() function anyway, for your reference
counting, having magic (automatically allocated, not static of
course) buffers works just fine.

> There are additional issues on various platforms related to actually
> passing buffers in/out OF, which cannot always access the full system
> memory (think about OF running in 32 bits mode on some machines 
> etc...).

Or simply using a 32-bit client interface, yes.  You can sidestep that
issue by not having OF around at all anymore by the time the kernel
proper starts, but that's not a good argument for not running with OF
still alive.

> I still don't agree with having yet another interface different to the
> existing ones.

Yes, the interfaces should be consolidated (at least as far as it
makes sense, and people can reach agreement) -- let's get there step
by step please, don't say "you can't do an OF interface in the kernel
since it's not identical to ours and you didn't do all the necessary
work to merge and fix everything up front" :-)

So let's decide on the text-vs.-binary fs thing first...


Segher

-
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