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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101008173650.GH3863@angua.secretlab.ca>
Date:	Fri, 8 Oct 2010 11:36:50 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	David Miller <davem@...emloft.net>
Cc:	dilinger@...ued.net, sparclinux@...r.kernel.org,
	linux-kernel@...r.kernel.org, sam@...nborg.org,
	devicetree-discuss@...ts.ozlabs.org
Subject: Re: [PATCH 1/2 v2] of: move phandle/ihandle into types.h and
 export to userspace

On Fri, Oct 08, 2010 at 10:17:59AM -0700, David Miller wrote:
> From: Grant Likely <grant.likely@...retlab.ca>
> Date: Fri, 8 Oct 2010 11:12:10 -0600
> 
> > On Fri, Oct 08, 2010 at 12:43:54AM -0700, Andres Salomon wrote:
> >> 
> >> We need phandle for some exported sparc headers; of.h isn't an
> >> exported header, and it would be silly to export it when all we
> >> really need is one or two types from it.  Also, later patches
> >> use phandle in structs that are exported to userspace, so export
> >> a __kernel_phandle type.
> >> 
> >> Signed-off-by: Andres Salomon <dilinger@...ued.net>
> > 
> > Looks okay to me.  I'm build testing it now on powerpc and
> > microblaze.  If davem agrees, then I'll pick it up into my
> > devicetree-next branch.
> > 
> > Question though; since sparc userspace is the only user of this,
> > should the types.h header avoid exposing it on non-sparc?
> 
> I can't think of anything in Sparc userspace that needs the
> phandle_t type.
> 
> In fact I was a bit confused when you asked Andres to expose
> it to userspace.
> 
> What I remember from a previous thread is that some other platforms
> use the type in their DT device-tree building tools or whatever, but
> they define phandle_t for themselves I remember specifically
> mentioning sparc has no use for this currently.

Weird.  Yeah, no other platforms expect to get a phandle type
definition from the kernel headers.  The only thing driving this
conversation is from arch/sparc/include/asm/Kbuild:

header-y += openprom.h

I don't have any background on the history of that file or why it
needs to be exported to userspace.  There seems to be a lot of stuff
in there; but I cannot see the *_funcs structures having any utility
outside of the kernel.  Perhaps they should be moved out of
asm/openprom.h?

Here are the two affected structures:

$ git grep linux_nodeops arch/sparc/include
arch/sparc/include/asm/openprom.h:      struct linux_nodeops *pv_nodeops;
arch/sparc/include/asm/openprom.h:struct linux_nodeops {
arch/sparc/include/asm/oplib_32.h:extern struct linux_nodeops *prom_nodeops;
$ git grep linux_dev_v2_funcs arch/sparc/include
arch/sparc/include/asm/openprom.h:struct linux_dev_v2_funcs {
arch/sparc/include/asm/openprom.h:      struct linux_dev_v2_funcs pv_v2devops;
(devicetree/next) ~/hacking/linux-2.6$ 

And linux_romvec references linux_nodeops:
$ git grep linux_romvec arch/sparc/include
arch/sparc/include/asm/openprom.h:struct linux_romvec {
arch/sparc/include/asm/oplib_32.h:extern struct linux_romvec *romvec;
arch/sparc/include/asm/oplib_32.h:extern void prom_init(struct linux_romvec *rom_ptr);

oplib_32.h is not exported.

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