Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-24 Thread Collin Walling
On 7/23/20 2:26 AM, Cornelia Huck wrote: > On Tue, 21 Jul 2020 14:40:14 -0400 > Collin Walling wrote: > >> On 7/21/20 4:41 AM, David Hildenbrand wrote: > >>> The options I would support are >>> >>> 1. "sccb_boundary_is_valid" which returns "true" if valid >>> 2. "sccb_boundary_is_invalid" which

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-23 Thread Cornelia Huck
On Tue, 21 Jul 2020 14:40:14 -0400 Collin Walling wrote: > On 7/21/20 4:41 AM, David Hildenbrand wrote: > > The options I would support are > > > > 1. "sccb_boundary_is_valid" which returns "true" if valid > > 2. "sccb_boundary_is_invalid" which returns "true" if invalid > > 3.

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-21 Thread Collin Walling
On 7/21/20 4:41 AM, David Hildenbrand wrote: > [...] > +switch (code & SCLP_CMD_CODE_MASK) { +default: +if (sccb_max_addr < sccb_boundary) { +return true; +} +} >>> >>> ^ what is that? >>> >>> if ((code &

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-21 Thread David Hildenbrand
[...] >>> +switch (code & SCLP_CMD_CODE_MASK) { >>> +default: >>> +if (sccb_max_addr < sccb_boundary) { >>> +return true; >>> +} >>> +} >> >> ^ what is that? >> >> if ((code & SCLP_CMD_CODE_MASK) && sccb_max_addr < sccb_boundary) { >> return

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-20 Thread Collin Walling
On 7/20/20 4:17 AM, David Hildenbrand wrote: > On 24.06.20 22:23, Collin Walling wrote: >> Rework the SCLP boundary check to account for different SCLP commands >> (eventually) allowing different boundary sizes. >> >> Move the length check code into a separate function, and introduce a >> new

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-07-20 Thread David Hildenbrand
On 24.06.20 22:23, Collin Walling wrote: > Rework the SCLP boundary check to account for different SCLP commands > (eventually) allowing different boundary sizes. > > Move the length check code into a separate function, and introduce a > new function to determine the length of the read SCP data

Re: [PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-06-25 Thread Thomas Huth
On 24/06/2020 22.23, Collin Walling wrote: Rework the SCLP boundary check to account for different SCLP commands (eventually) allowing different boundary sizes. Move the length check code into a separate function, and introduce a new function to determine the length of the read SCP data (i.e.

[PATCH v4 3/8] s390/sclp: rework sclp boundary and length checks

2020-06-24 Thread Collin Walling
Rework the SCLP boundary check to account for different SCLP commands (eventually) allowing different boundary sizes. Move the length check code into a separate function, and introduce a new function to determine the length of the read SCP data (i.e. the size from the start of the struct to where