Re: [PATCH net-next] devlink: refactor end checks in devlink_nl_cmd_region_read_dumpit

2020-05-14 Thread David Miller
From: Jakub Kicinski Date: Wed, 13 May 2020 10:28:22 -0700 > Clean up after recent fixes, move address calculations > around and change the variable init, so that we can have > just one start_offset == end_offset check. > > Make the check a little stricter to preserve the -EINVAL > error if requ

Re: [PATCH net-next] devlink: refactor end checks in devlink_nl_cmd_region_read_dumpit

2020-05-13 Thread Jakub Kicinski
On Wed, 13 May 2020 13:56:40 -0700 Jacob Keller wrote: > > @@ -4294,8 +4289,21 @@ static int devlink_nl_cmd_region_read_dumpit(struct > > sk_buff *skb, > > goto out_unlock; > > } > > > > + if (attrs[DEVLINK_ATTR_REGION_CHUNK_ADDR] && > > + attrs[DEVLINK_ATTR_REGION_CHUNK_

Re: [PATCH net-next] devlink: refactor end checks in devlink_nl_cmd_region_read_dumpit

2020-05-13 Thread Jacob Keller
On 5/13/2020 10:28 AM, Jakub Kicinski wrote: > Clean up after recent fixes, move address calculations > around and change the variable init, so that we can have > just one start_offset == end_offset check. > > Make the check a little stricter to preserve the -EINVAL > error if requested start o

[PATCH net-next] devlink: refactor end checks in devlink_nl_cmd_region_read_dumpit

2020-05-13 Thread Jakub Kicinski
Clean up after recent fixes, move address calculations around and change the variable init, so that we can have just one start_offset == end_offset check. Make the check a little stricter to preserve the -EINVAL error if requested start offset is larger than the region itself. Signed-off-by: Jaku