From: Greg KH <greg@kroah.com>
To: Wolfgang Wilhelm <wilhelm@fastcomtec.com>
Cc: linux-usb@vger.kernel.org,
Austin S Hemmelgarn <ahferroin7@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: Problem with USB driver using two devices
Date: Wed, 23 Nov 2016 17:39:17 +0100 [thread overview]
Message-ID: <20161123163917.GC10750@kroah.com> (raw)
In-Reply-To: <20161123163545.GB10750@kroah.com>
On Wed, Nov 23, 2016 at 05:35:45PM +0100, Greg KH wrote:
> On Wed, Nov 23, 2016 at 05:17:35PM +0100, Wolfgang Wilhelm wrote:
> > Thankyou very much for the really fast answer.
> >
> > I don't get any error messages and I can communicate with
> > the driver for the second device via ioctrl and write functions,
> > i.e. write registers and read registers via the RBUF ioctrl function,
> > only the read function for the second device does not work,
> > i.e. no data is obtained from the mcs6_read function for the
> > second device.
>
> Hm, let me go look at the driver again, maybe something's odd with it.
I don't see anything odd with your read function, is it just timing out?
Have you tried doing read/writes from userspace with libusb and that
works correctly?
> > Which security problems do you see in the code?
>
> No checking that the values given to you by userspace are actually valid
> and within "sane" ranges :)
Oh, also your ioctl types need to be better specified than "int" as that
doesn't make much sense with 64bit kernels and a 32bit userspace. You
need to use types like __u32 in order to make sure that works correctly
in all situations.
thanks,
greg k-h
prev parent reply other threads:[~2016-11-23 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 13:24 problem with "serial" driver in kernel 3.16.0 Wolfgang Wilhelm
2015-09-17 13:54 ` Greg KH
2015-09-17 20:03 ` Austin S Hemmelgarn
2015-09-18 9:24 ` Wolfgang Wilhelm
2015-09-18 16:23 ` Greg KH
2015-09-18 17:52 ` Dr. Wolfgang Wilhelm
2016-11-23 13:14 ` Problem with USB driver using two devices Wolfgang Wilhelm
2016-11-23 14:57 ` Greg KH
[not found] ` <5835C11F.28335.C2ECC3B@wilhelm.fastcomtec.com>
2016-11-23 16:35 ` Greg KH
2016-11-23 16:39 ` Greg KH [this message]
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=20161123163917.GC10750@kroah.com \
--to=greg@kroah.com \
--cc=ahferroin7@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=wilhelm@fastcomtec.com \
/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