Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-18 Thread Stefano Garzarella
On Wed, Oct 16, 2024 at 09:25:54AM +0200, Philipp Stanner wrote: In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed to pcim_iomap_regions() is placed on the stack. Neither pcim_iomap_regions() nor the functions it calls copy that string. Should the string later ever be used, thi

Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Greg KH
On Wed, Oct 16, 2024 at 01:16:32PM +0200, Philipp Stanner wrote: > On Wed, 2024-10-16 at 12:51 +0200, Greg KH wrote: > > On Wed, Oct 16, 2024 at 11:22:48AM +0200, Philipp Stanner wrote: > > > On Wed, 2024-10-16 at 12:08 +0300, Andy Shevchenko wrote: > > > > On Wed, Oct 16, 2024 at 09:25:54AM +0200,

Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Philipp Stanner
On Wed, 2024-10-16 at 12:51 +0200, Greg KH wrote: > On Wed, Oct 16, 2024 at 11:22:48AM +0200, Philipp Stanner wrote: > > On Wed, 2024-10-16 at 12:08 +0300, Andy Shevchenko wrote: > > > On Wed, Oct 16, 2024 at 09:25:54AM +0200, Philipp Stanner wrote: > > > > In psnet_open_pf_bar() and snet_open_vf_b

Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Greg KH
On Wed, Oct 16, 2024 at 11:22:48AM +0200, Philipp Stanner wrote: > On Wed, 2024-10-16 at 12:08 +0300, Andy Shevchenko wrote: > > On Wed, Oct 16, 2024 at 09:25:54AM +0200, Philipp Stanner wrote: > > > In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed > > > to > > > pcim_iomap_regio

Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Andy Shevchenko
On Wed, Oct 16, 2024 at 12:22 PM Philipp Stanner wrote: > On Wed, 2024-10-16 at 12:08 +0300, Andy Shevchenko wrote: > > On Wed, Oct 16, 2024 at 09:25:54AM +0200, Philipp Stanner wrote: ... > > > --- > > > > I haven't found the reason for resending. Can you elaborate here? > > Impatience ;p > > T

Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Philipp Stanner
On Wed, 2024-10-16 at 12:08 +0300, Andy Shevchenko wrote: > On Wed, Oct 16, 2024 at 09:25:54AM +0200, Philipp Stanner wrote: > > In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed > > to > > pcim_iomap_regions() is placed on the stack. Neither > > pcim_iomap_regions() nor the funct

Re: [PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Andy Shevchenko
On Wed, Oct 16, 2024 at 09:25:54AM +0200, Philipp Stanner wrote: > In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed to > pcim_iomap_regions() is placed on the stack. Neither > pcim_iomap_regions() nor the functions it calls copy that string. > > Should the string later ever be u

[PATCH RESEND] vdpa: solidrun: Fix UB bug with devres

2024-10-16 Thread Philipp Stanner
In psnet_open_pf_bar() and snet_open_vf_bar() a string later passed to pcim_iomap_regions() is placed on the stack. Neither pcim_iomap_regions() nor the functions it calls copy that string. Should the string later ever be used, this, consequently, causes undefined behavior since the stack frame wi