public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Jonathan McCune <jonmccune@cmu.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sysfs binary attribute API flux
Date: Thu, 22 Mar 2012 14:28:16 -0700	[thread overview]
Message-ID: <20120322212816.GB30888@kroah.com> (raw)
In-Reply-To: <CAEwYmTJzzUi1qfRHYfZg77g1K7myNsAh2oDiY7hWxzRO5hQGHA@mail.gmail.com>

On Thu, Mar 22, 2012 at 04:38:46PM -0400, Jonathan McCune wrote:
> Greetings,
> 
> I maintain a Linux kernel module for a research project*, where it is
> necessary to move some binary data from userspace into the kernel.

What exact type of binary data are you talking about here?

> I
> have been using sysfs's 'struct bin_attribute'.  Unfortunately, every
> few kernel versions, my code breaks because of a change in the
> definition of some elements in this struct.  For example, kernel
> versions 2.6.20, 2.6.32, and 2.6.38 each define the 'read' and 'write'
> function pointers differently. I will spare the inline diff, but they
> can each be seen here:

Is this a problem?  It's only an issue for code that lives outside of
the kernel, and there's nothing we can do about that, sorry.

> My question: is there some other interface that I should be using?  Am
> I using sysfs incorrectly?  All of the documentation I've been able to
> find seems to strongly encourage the use of sysfs.

debugfs?

What exactly are you using this data for?  Who creates it?  What does it
represent?

thanks,

greg k-h

  reply	other threads:[~2012-03-22 21:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 20:38 sysfs binary attribute API flux Jonathan McCune
2012-03-22 21:28 ` Greg KH [this message]
2012-03-23 13:25   ` Jonathan McCune
2012-03-23 16:20     ` Greg KH
2012-03-23 19:10       ` Jonathan McCune

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120322212816.GB30888@kroah.com \
    --to=greg@kroah.com \
    --cc=jonmccune@cmu.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox