RE: [PATCH 12/12] RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH 12/12] RDMA/mana_ib: Add a driver for Microsoft Azure
> Network Adapter
> 
> On Thu, May 19, 2022 at 05:57:01AM +0000, Long Li wrote:
> 
> > > > +
> > > > +	err = ib_copy_from_udata(&ucmd, udata, min(sizeof(ucmd),
> > > > +udata->inlen));
> > >
> > > Skeptical this min is correct, many other drivers get this wrong.
> >
> > I think this is correct. This is to prevent user-mode passing more data that may
> overrun the kernel buffer.
> 
> And what happens when udata->inlen is, say, 0?

Thanks. I'll add check before calling ib_copy_from_udata().

Long




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux