From: Greg KH <greg@kroah.com>
To: Jorge Fernandez Monteagudo <jorgefm@cirsa.com>
Cc: "kernelnewbies@kernelnewbies.org" <kernelnewbies@kernelnewbies.org>
Subject: Re: How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version
Date: Tue, 12 Jan 2021 09:16:08 +0100 [thread overview]
Message-ID: <X/1ayMWbi92PUsbX@kroah.com> (raw)
In-Reply-To: <DB9PR10MB45226608AC1FFAE9C2F56603A1AA0@DB9PR10MB4522.EURPRD10.PROD.OUTLOOK.COM>
On Tue, Jan 12, 2021 at 07:39:37AM +0000, Jorge Fernandez Monteagudo wrote:
> >> Hi all, this is my first post in this mailing list... I hope to find an answer. I've post the question in stackoverflow with the same tittle with no answers yet. Since then, I've been able to reduce the demo kernel module to minimum in order to show but I see. The minimum kernel module code is attached at the end.
> >>
> >> My kernel module was working ok up to kernel 5.10.x. My kernel module adds a layer above the cdc-acm class driver to use all the infrastructure this driver because the hardware it controls has a ttyACMx device. The minimum kernel module code attached shows how I open the ttyACMx device and try to set the baudrate. Once the device is opened I use the unlocked_ioctl function with TCSETS to set the new device properties.
> >>
> >> ret = fd->f_op->unlocked_ioctl(fd, TCSETS, (unsigned long int) &newtio);
>
> >Ick, why do all of this from the kernel and not just do it from
> >userspace?
> >
> >Do you have a pointer to the source of your whole module so we can help
> >with solving the root problem and not mess with this specific
> >implementation which is not the correct thing to do at all.
>
> Hi Greg!
>
> Well, I can summarize as technological debt :(
> I have to maintain an old code and I've been succesful until now with
> minimal changes... Is there no way to overcome this?
There might be, again, do you have a pointer to your full source for the
module?
thanks,
greg k-h
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2021-01-12 8:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-12 7:21 How to replace set_fs(KERNEL_DS) for a kernel 5.10.x module driver version Jorge Fernandez Monteagudo
2021-01-12 7:29 ` Greg KH
2021-01-12 7:39 ` Jorge Fernandez Monteagudo
2021-01-12 8:16 ` Greg KH [this message]
2021-01-12 8:26 ` Jorge Fernandez Monteagudo
2021-01-12 8:56 ` Greg KH
2021-01-12 9:12 ` Jorge Fernandez Monteagudo
2021-01-12 9:28 ` Greg KH
2021-01-12 9:55 ` Jorge Fernandez Monteagudo
2021-01-12 10:26 ` 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=X/1ayMWbi92PUsbX@kroah.com \
--to=greg@kroah.com \
--cc=jorgefm@cirsa.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).