RE: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-30 Thread Alan Stern
On Tue, 30 Apr 2019, David Laight wrote: > From: Alan Stern > > Sent: 29 April 2019 18:55 > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > On Mo, 2019-04-29 at 12:08 -0400, Alan Stern wrote: > > > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > > > > > On Mo, 2019-04-29 at 15:06 +000

RE: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-30 Thread David Laight
From: Alan Stern > Sent: 29 April 2019 18:55 > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > On Mo, 2019-04-29 at 12:08 -0400, Alan Stern wrote: > > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > > > On Mo, 2019-04-29 at 15:06 +, David Laight wrote: > > > > > > > But the statement the

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Alan Stern
On Mon, 29 Apr 2019, Oliver Neukum wrote: > On Mo, 2019-04-29 at 13:55 -0400, Alan Stern wrote: > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > On Mo, 2019-04-29 at 12:08 -0400, Alan Stern wrote: > > > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > > > > > On Mo, 2019-04-29 at 15:

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Oliver Neukum
On Mo, 2019-04-29 at 13:55 -0400, Alan Stern wrote: > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > On Mo, 2019-04-29 at 12:08 -0400, Alan Stern wrote: > > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > > > On Mo, 2019-04-29 at 15:06 +, David Laight wrote: > > > > > > > But the stat

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Alan Stern
On Mon, 29 Apr 2019, Oliver Neukum wrote: > On Mo, 2019-04-29 at 12:08 -0400, Alan Stern wrote: > > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > > > On Mo, 2019-04-29 at 15:06 +, David Laight wrote: > > > > > But the statement the old comment made are no longer correct. > > > > Perhaps D

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Oliver Neukum
On Mo, 2019-04-29 at 12:08 -0400, Alan Stern wrote: > On Mon, 29 Apr 2019, Oliver Neukum wrote: > > > On Mo, 2019-04-29 at 15:06 +, David Laight wrote: > > > But the statement the old comment made are no longer correct. > > Perhaps David would be satisfied if the comment were changed to say

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Alan Stern
On Mon, 29 Apr 2019, Oliver Neukum wrote: > On Mo, 2019-04-29 at 15:06 +, David Laight wrote: > > From: Oliver Neukum > > > On Mo, 2019-04-29 at 14:19 +, David Laight wrote: > > > > AFAICT controllers do not export that property. > > > > Perhaps they need to > > Feel free to make a

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Oliver Neukum
On Mo, 2019-04-29 at 15:06 +, David Laight wrote: > From: Oliver Neukum > > On Mo, 2019-04-29 at 14:19 +, David Laight wrote: > > AFAICT controllers do not export that property. > > Perhaps they need to Feel free to make a patch. > > > Even if you decide the code is 'good enough' (

RE: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread David Laight
From: Oliver Neukum > On Mo, 2019-04-29 at 14:19 +, David Laight wrote: > > From: Oliver Neukum > > > Sent: 29 April 2019 14:38 > > > On Mo, 2019-04-29 at 13:31 +, David Laight wrote: > > > > From: Oliver Neukum > > > > > > > > > > + * USB has unusual scatter-gather requirements: the l

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Oliver Neukum
On Mo, 2019-04-29 at 14:19 +, David Laight wrote: > From: Oliver Neukum > > Sent: 29 April 2019 14:38 > > On Mo, 2019-04-29 at 13:31 +, David Laight wrote: > > > From: Oliver Neukum > > > > > > > > +* USB has unusual scatter-gather requirements: the length of > > > > each > > > >

RE: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread David Laight
From: Oliver Neukum > Sent: 29 April 2019 14:38 > On Mo, 2019-04-29 at 13:31 +, David Laight wrote: > > From: Oliver Neukum > > > > > > + * USB has unusual scatter-gather requirements: the length of each > > > + * scatterlist element except the last must be divisible by the > > > + * Bulk ma

Re: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Oliver Neukum
On Mo, 2019-04-29 at 13:31 +, David Laight wrote: > From: Oliver Neukum > > > > +* USB has unusual scatter-gather requirements: the length of each > > +* scatterlist element except the last must be divisible by the > > +* Bulk maxpacket value. Fortunately this value is always a >

RE: [PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread David Laight
From: Oliver Neukum > Sent: 29 April 2019 13:20 > This is the UAS version of > > 747668dbc061b3e62bc1982767a3a1f9815fcf0e > usb-storage: Set virt_boundary_mask to avoid SG overflows > > We are not as likely to be vulnerable as storage, as it is unlikelier > that UAS is run over a controller witho

[PATCH] UAS: fix alignment of scatter/gather segments

2019-04-29 Thread Oliver Neukum
This is the UAS version of 747668dbc061b3e62bc1982767a3a1f9815fcf0e usb-storage: Set virt_boundary_mask to avoid SG overflows We are not as likely to be vulnerable as storage, as it is unlikelier that UAS is run over a controller without native support for SG, but the issue exists. Signed-off-by