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:	Mon, 2 Mar 2009 15:13:43 -0800
From:	Greg KH <greg@...ah.com>
To:	Mike Murphy <mamurph@...clemson.edu>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
	linux-usb@...r.kernel.org, oliver@...kum.org, fweisbec@...il.com,
	torvalds@...ux-foundation.org
Subject: Re: PATCH [1/3] drivers/input/xpad.c: Improve Xbox 360 wireless
	support and add sysfs interface

On Mon, Mar 02, 2009 at 06:04:00PM -0500, Mike Murphy wrote:
> On Mon, Mar 2, 2009 at 5:39 PM, Greg KH <greg@...ah.com> wrote:
> >
> > I tried to create such an interface years ago, and the macro tricks
> > involved ended up being horrible, and in the end, it didn't work.  But
> > if you can come up with something, I'd love to see it.
> >
> > thanks,
> >
> > greg k-h
> >
> 
> I could probably give it a shot, but possibly not until May... once
> the current semester ends. I really need to understand the kernel type
> system -- or at least the types that "should" be exposed to userspace
> -- before thinking about the design too much. Maybe that's the
> question that needs to be asked first: in general, what does a sysfs
> interface into a driver look like? It's certainly flexible enough to
> do a lot, and the existing interfaces allow it to do a lot, but is
> there a simplification that covers some large percentage of cases?

Look at some of the easy things, like integers.  If you could get those
working, the hwmon drivers could be simplified a lot more.

The problem I ran into was that the attribute show/store functions deals
with a "struct device" which you need to cast into some other structure
type, and then determine the offset of the integer you are needing to
access.

Hm, maybe that wouldn't be that hard with 2 offset_of() values, I think
I was only trying to do one, but that was a long time ago...

thanks,

greg k-h
--
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