Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1711839 > unrolled thread
| Started by | "Bernat, Yehezkel" <yehezkel.bernat@intel.com> |
|---|---|
| First post | 2017-08-15 07:20 +0200 |
| Last post | 2017-08-15 11:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/3] thunderbolt: Remove superfluous check "Bernat, Yehezkel" <yehezkel.bernat@intel.com> - 2017-08-15 07:20 +0200
Re: [PATCH 1/3] thunderbolt: Remove superfluous check Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-08-15 09:10 +0200
Re: [PATCH 1/3] thunderbolt: Remove superfluous check Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-08-15 11:40 +0200
| From | "Bernat, Yehezkel" <yehezkel.bernat@intel.com> |
|---|---|
| Date | 2017-08-15 07:20 +0200 |
| Subject | [PATCH 1/3] thunderbolt: Remove superfluous check |
| Message-ID | <ueCqJ-5xr-9@gated-at.bofh.it> |
The key size is tested by hex2bin() already (as '\0' isn't an hex digit) Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com> --- drivers/thunderbolt/switch.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index e9391bb..69fde0b 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -808,9 +808,6 @@ static ssize_t key_store(struct device *dev, struct device_attribute *attr, u8 key[TB_SWITCH_KEY_SIZE]; ssize_t ret = count; - if (count < 64) - return -EINVAL; - if (hex2bin(key, buf, sizeof(key))) return -EINVAL; -- 2.7.4
[toc] | [next] | [standalone]
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Date | 2017-08-15 09:10 +0200 |
| Message-ID | <ueE9c-6EU-17@gated-at.bofh.it> |
| In reply to | #1711839 |
On Tue, Aug 15, 2017 at 08:19:01AM +0300, Bernat, Yehezkel wrote: > The key size is tested by hex2bin() already (as '\0' isn't an hex digit) > > Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> > Signed-off-by: Yehezkel Bernat <yehezkel.bernat@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[toc] | [prev] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-08-15 11:40 +0200 |
| Message-ID | <ueGul-80m-17@gated-at.bofh.it> |
| In reply to | #1711839 |
On Tue, Aug 15, 2017 at 8:19 AM, Bernat, Yehezkel <yehezkel.bernat@intel.com> wrote: > The key size is tested by hex2bin() already (as '\0' isn't an hex digit) Yes, and it's guaranteed (by kernelfs) that '\0' will be there sooner or later. > Suggested-by: Andy Shevchenko <andriy.shevchenko@intel.com> I'm using @linux.intel.com, though for this tag it really doesn't matter. -- With Best Regards, Andy Shevchenko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web