All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: interview question how does application connects to device
Date: Mon, 11 Jul 2011 20:13:11 +0200	[thread overview]
Message-ID: <20110711181311.GA6726@kroah.com> (raw)
In-Reply-To: <1310406230.19271.YahooMailNeo@web30807.mail.mud.yahoo.com>

On Mon, Jul 11, 2011 at 10:43:50AM -0700, StephanT wrote:
> Hi all,
> 
> ----- Original Message -----
> > From: Greg Freemyer <greg.freemyer@gmail.com>
> 
> 
> > 
> > Correct, ioctl is no longer preferred, but it is definitely still
> > used.? And the ext4 team is still adding new ioctl commands despite it
> > being discouraged.
> > 
> 
> 
> If ioctl is no longer preferred what is its preferred alternative ?

a virtual filesystem, sysfs, debugfs, configfs, or something else is
usually all you need.  As mentioned, netlink is also a good alternative,
and so is the connector interface.

> Could you, please explain why ioctl felt in disgrace.

It's essencially adding a brand new system call every single time,
32/64bit problems, pointer problems, structure problems, incorrect
bounds checking almost always happens and other nastyness.

That being said, there are still times when ioctl is the correct thing
to use, but you have to really know what you are doing and be able to
justify it.

hope this helps,

greg k-h

  reply	other threads:[~2011-07-11 18:13 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOQuo6Nf9-uXBbHOi1_tpBmBOVPzuBtW699=ywDGSsfT_NVphA@mail.gmail.com>
2011-07-05  4:15 ` interview question how does application connects to device Bond
2011-07-05  5:43   ` Prashant Shah
2011-07-17 15:10     ` Bond
2011-07-17 15:34       ` Anuz Pratap Singh Tomar
2011-07-17 15:40         ` Bond
2011-07-17 15:47           ` Anuz Pratap Singh Tomar
2011-07-17 15:52             ` Bond
2011-07-17 16:06               ` Mulyadi Santosa
2011-07-17 17:34                 ` Bond
2011-07-17 17:49                   ` Anuz Pratap Singh Tomar
2011-07-17 19:25                   ` Greg Freemyer
2011-07-17 16:14               ` Anuz Pratap Singh Tomar
2011-07-17 17:31                 ` Bond
2011-07-05  6:51   ` Philipp Ittershagen
2011-07-05  6:59     ` Paraneetharan Chandrasekaran
2011-07-05  7:28       ` Mandeep Sandhu
2011-07-05  7:31         ` Mandeep Sandhu
2011-07-05  7:51           ` Abhijit Pawar
2011-07-05  8:12             ` er krishna
2011-07-05  9:13               ` Mandeep Sandhu
2011-07-05  9:38                 ` er krishna
2011-07-05 12:56   ` Greg Freemyer
2011-07-05 13:43     ` Mandeep Sandhu
2011-07-05 16:03       ` Greg Freemyer
2011-07-06  4:08         ` Abhijit Pawar
2011-07-06  4:43           ` Prashant Shah
2011-07-06  5:27             ` Abhijit Pawar
2011-07-11 17:43         ` StephanT
2011-07-11 18:13           ` Greg KH [this message]
2011-07-11 18:14           ` Greg Freemyer
     [not found]       ` <769A0B32-0869-4A2B-A005-D6AC0376D1E3@gmail.com>
2011-07-06  5:12         ` Mandeep Sandhu
2011-07-06 23:29           ` Javier Martinez Canillas
2011-07-07  3:20             ` Greg Freemyer
2011-07-07 12:51               ` Javier Martinez Canillas
2011-07-05 13:36   ` Shaz

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=20110711181311.GA6726@kroah.com \
    --to=greg@kroah.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.