From: Greg KH <gregkh@linuxfoundation.org>
To: Changming Liu <liu.changm@northeastern.edu>
Cc: Changming Liu <charley.ashbringer@gmail.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"thomas@winischhofer.net" <thomas@winischhofer.net>
Subject: Re: [PATCH 0/4] USB: sisusbvga: series of changes char to u8
Date: Wed, 24 Jun 2020 17:13:04 +0200 [thread overview]
Message-ID: <20200624151304.GA1977333@kroah.com> (raw)
In-Reply-To: <BN6PR06MB2532B0A36A0C4781BEBB4387E5980@BN6PR06MB2532.namprd06.prod.outlook.com>
On Fri, Jun 19, 2020 at 08:50:52PM +0000, Changming Liu wrote:
> > > This patch series changes all appropriate instances of signed char
> > > arrays or buffer to unsigned char.
> > >
> > > For each patch, if changing one variable to u8 involves its
> > > callers/callees, then those changes are included in that patch as
> > > well.
> > >
> > > This doesn't apply to ioctl functions, since the types for buffer of
> > > ioctl-like functions needs to be char* instead of u8* to keep the
> > > compiler happy.
> >
> > Why is that? What is forcing those types to be that way? These are all self-
> > contained in the driver itself, so they should be able to be changed, right?
> >
> > Do you have an example of a function that you want to change but somehow
> > can not?
> >
> Sorry for this confusion, I should have put more context into this patch.
> This is a re-send of a former patch which was rejected by kernel build
> test robot when I tried to change all char instances of this driver to
> u8 in order to remove any potential undefined behaviors.
>
> This patch(also the former rejected one) were based on a former discussion
> with you, the email was quite lengthy, so I attached the link here for
> your reference. https://www.spinics.net/lists/linux-usb/msg196153.html
>
> In conclusion, only the one I noted in the link has security implication
> and should be fixed, the other changes from char to u8 are just
> "in case".
>
> If you still think it's needed to change all instances
> of char in this driver to u8, I'll enrich the patch note(which I should
> have done earlier) and re-send the patch series again.
> Or if you think just fixing that specific UB in sisusb_write_mem_bulk
> is enough, I'll submit another patch.
I think cleaning up everything is good, so fixing that up and resending
it would be great to have.
thanks,
greg k-h
prev parent reply other threads:[~2020-06-24 15:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 0:28 [PATCH 0/4] USB: sisusbvga: series of changes char to u8 Changming Liu
2020-06-19 0:28 ` [PATCH 1/4] USB: sisusbvga: change sisusb_write_mem_bulk Changming Liu
2020-06-19 7:02 ` Greg KH
2020-06-19 0:28 ` [PATCH 2/4] USB: sisusbvga: change the buffers of sisusb from char to u8 Changming Liu
2020-06-19 0:28 ` [PATCH 3/4] USB: sisusbvga: change userbuffer for sisusb_recv_bulk_msg " Changming Liu
2020-06-19 0:28 ` [PATCH 4/4] USB: sisusbvga: change sisusb_read_mem_bulk Changming Liu
2020-06-19 7:00 ` [PATCH 0/4] USB: sisusbvga: series of changes char to u8 Greg KH
2020-06-19 20:50 ` Changming Liu
2020-06-24 15:13 ` 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=20200624151304.GA1977333@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=charley.ashbringer@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=liu.changm@northeastern.edu \
--cc=thomas@winischhofer.net \
/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.