Re: [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias(),Re: [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias()

2017-12-20 Thread David Miller
From: Serhey Popovich Date: Wed, 20 Dec 2017 21:44:46 +0200 > Sorry but I do not mean larger. I mean shorter. When nla_len() > > strlen() we allocate extra space up to IFALIASZ - 1. But the user typically does not do that. > This is definitely fix nothing: we never

Re: [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias()

2017-12-20 Thread Serhey Popovich
David Miller wrote: > From: Serhey Popovych > Date: Mon, 18 Dec 2017 23:38:35 +0200 > >> We supply number of bytes available in @alias via @len >> parameter to dev_set_alias() which is not the same >> as zero terminated string length that can be shorter. >> >> Both

Re: [PATCH net-next] dev: Correctly get length of alias string in dev_set_alias()

2017-12-20 Thread David Miller
From: Serhey Popovych Date: Mon, 18 Dec 2017 23:38:35 +0200 > We supply number of bytes available in @alias via @len > parameter to dev_set_alias() which is not the same > as zero terminated string length that can be shorter. > > Both dev_set_alias() users (rtnetlink

[PATCH net-next] dev: Correctly get length of alias string in dev_set_alias()

2017-12-18 Thread Serhey Popovych
We supply number of bytes available in @alias via @len parameter to dev_set_alias() which is not the same as zero terminated string length that can be shorter. Both dev_set_alias() users (rtnetlink and sysfs) can submit number of bytes up to IFALIASZ with actual string length slightly shorter by