Re: [PATCH] firmware: make sure builtin firmware is page alignment

From: gregkh@xxxxxxxxxxxxxxxxxxx
Date: Tue Aug 07 2018 - 04:12:38 EST


On Tue, Aug 07, 2018 at 02:27:31AM +0000, Zhang, Ning A wrote:
> å 2018-08-06äç 16:05 +0200ïgregkh@xxxxxxxxxxxxxxxxxxxåéï
> > On Mon, Aug 06, 2018 at 01:48:44AM +0000, Zhang, Ning A wrote:
> > > å 2018-08-03äç 12:31 +0200ïgregkh@xxxxxxxxxxxxxxxxxxxåéï
> > > > On Fri, Aug 03, 2018 at 08:42:25AM +0000, Zhang, Ning A wrote:
> > > > > å 2018-08-03äç 07:39 +0200ïGreg KHåéï
> > > > > > On Fri, Aug 03, 2018 at 09:45:21AM +0800, Zhang Ning wrote:
> > > > > > > when firmware is in filesystem, request_firmware will load
> > > > > > > it,
> > > > > > > and copy it to vmalloc memory, that is page align memory.
> > > > > > >
> > > > > > > but when firmware is builtin, it is 8 bytes or 4 bytes
> > > > > > > alignment.
> > > > > > >
> > > > > > > make sure builtin firmware is page algnment, that can
> > > > > > > simplify
> > > > > > > algorithm
> > > > > > > to handle firmware.
> > > > > >
> > > > > > How is it simplified?ÂÂI don't see any such change like that
> > > > > > here
> > > > > > :(
> > > > > >
> > > > >
> > > > > Thank you for review this patch.
> > > > >
> > > > > When driver handles its firmware based onÂÂpage, like below:
> > > > >
> > > > > struct page *p;
> > > > > p = vmalloc_to_page(fw->data);ÂÂ// for filesystem
> > > > > firmware
> > > > > p = virt_to_page(fw->data); // for builtin firmware
> > > > >
> > > > > but if builtin firmware is not page alignment, page pointer for
> > > > > builtin
> > > > > firmware is wrong, it contains memory not belong to firmware.
> > > > > drivers
> > > > > has to use additional code to handle this.Â
> > > > >
> > > > > if builtin firmware is also page alignment, no need additional
> > > > > code
> > > > > to
> > > > > handle builtin firmware. simplified.
> > > >
> > > > But you did not change anything like this in your code, so why
> > > > would
> > > > I
> > > > know this?
> > >
> > > I understand it is very difficult to review this patch without
> > > context.
> > > The driver is not opensource, I can't show the patch for driver.
> >
> > Then I can not accept your patch.ÂÂGo talk to your corporate lawyers
> > about changing core kernel code for a closed source driver and what
> > that
> > implies about that closed driver (hint, your driver can not be
> > closed...) :)
>
> It's very sad,

"sad"? Again, please go discuss this with your corporate lawyers before
thinking that this is even something that is possible to do. Hint, if
I _were_ to accept this, they would be _VERY_ upset at both me, and you.

I am trying to _save_ you problems, please realize this.

greg k-h