kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: ioctl number change / backwards compatibility doubt
Date: Sun, 23 Jan 2022 20:55:30 +1300	[thread overview]
Message-ID: <20220123075530.GB79751@mail.google.com> (raw)
In-Reply-To: <YeVoAlv0ubKrmckV@kroah.com>

On Mon, Jan 17, 2022 at 01:58:42PM +0100, Greg KH wrote:
> Not many people ever look at that file, and it is ok to have conflicts
> as the same tool should never have to handle multiple drivers where a
> conflict happens.

Noted

> > 1: Given the driver's history and ioctl number conflit, is the backwards
> > compatibility something to be kept or not to be taken into consideration
> > as ioctl numbering rules weren't followed?
> 
> Try to find out who is using these ioctls.  If you can change the
> userspace tool at the same time, all is fine.  If not, then there can be
> problems.

Apologies for the delay, I had emailed the original author and I was waiting 
for his reply before I could answer this. It turns out I haven't gotten
an official answer from him yet. (I do understand that he might be busy)

I googled a fair bit of time and I'm 99% confident that there isn't such
userspace/lib tool so I guess this will have done the hard way :(

> > 2: The original author lists on the TODO file of the driver that 'he is
> > afraid that using ioctl wasn't a good idea'. I pondered the alternatives
> > and, *in case I can get rid of ioctl*, sysfs || configfs could be used. Does
> > anyone suggests a different approach?
> 
> Same answer as above, it depends on what userspace tool is using these
> ioctls.  Also it depends on what they do.  Many informational ioctls can
> just be replaced with sysfs files, and many configuration ioctls can be
> replaced with configfs, but for other things, sometimes you need an
> ioctl.
> 
> So it depends.  Try to get ahold of the userspace side and then you can
> usually work it out.
> 

Dan Carpenter suggested in one of patch reviews that we keep the ioctl
for backwards compatibility but start a brand new sysfs implementation to
encompass existing functionality to make it easier to add new features 
in future.

I will wrap my head around it and send some RFC patches soon.

thanks,

Paulo Almeida


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

  reply	other threads:[~2022-01-23  7:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17  7:01 ioctl number change / backwards compatibility doubt Paulo Miguel Almeida
2022-01-17 12:58 ` Greg KH
2022-01-23  7:55   ` Paulo Miguel Almeida [this message]
2022-01-23 11:04     ` Greg KH
2022-01-24  4:49       ` Paulo Miguel Almeida
2022-01-24  6:20         ` Greg KH
2022-03-12  0:05           ` Paulo Miguel Almeida
2022-03-14 12:30             ` Rogério Valentim Feitoza da Silva
2022-03-16 14:07             ` Greg KH

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=20220123075530.GB79751@mail.google.com \
    --to=paulo.miguel.almeida.rodenas@gmail.com \
    --cc=greg@kroah.com \
    --cc=kernelnewbies@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).