* [PATCH 1/3] thunderbolt: Remove superfluous check
@ 2017-08-15 5:19 Bernat, Yehezkel
2017-08-15 7:02 ` Mika Westerberg
2017-08-15 9:32 ` Andy Shevchenko
0 siblings, 2 replies; 7+ messages in thread
From: Bernat, Yehezkel @ 2017-08-15 5:19 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Andreas Noever, Michael Jamet, Mika Westerberg, Lukas Wunner,
Andy Shevchenko, linux-kernel
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] thunderbolt: Remove superfluous check
2017-08-15 5:19 [PATCH 1/3] thunderbolt: Remove superfluous check Bernat, Yehezkel
@ 2017-08-15 7:02 ` Mika Westerberg
2017-08-27 13:31 ` Mika Westerberg
2017-08-15 9:32 ` Andy Shevchenko
1 sibling, 1 reply; 7+ messages in thread
From: Mika Westerberg @ 2017-08-15 7:02 UTC (permalink / raw)
To: Bernat, Yehezkel
Cc: Greg Kroah-Hartman, Andreas Noever, Michael Jamet, Lukas Wunner,
Andy Shevchenko, linux-kernel
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>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] thunderbolt: Remove superfluous check
2017-08-15 5:19 [PATCH 1/3] thunderbolt: Remove superfluous check Bernat, Yehezkel
2017-08-15 7:02 ` Mika Westerberg
@ 2017-08-15 9:32 ` Andy Shevchenko
1 sibling, 0 replies; 7+ messages in thread
From: Andy Shevchenko @ 2017-08-15 9:32 UTC (permalink / raw)
To: Bernat, Yehezkel
Cc: Greg Kroah-Hartman, Andreas Noever, Michael Jamet,
Mika Westerberg, Lukas Wunner, Andy Shevchenko, linux-kernel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] thunderbolt: Remove superfluous check
2017-08-15 7:02 ` Mika Westerberg
@ 2017-08-27 13:31 ` Mika Westerberg
2017-08-28 14:20 ` Greg Kroah-Hartman
0 siblings, 1 reply; 7+ messages in thread
From: Mika Westerberg @ 2017-08-27 13:31 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Bernat, Yehezkel, Andreas Noever, Michael Jamet, Lukas Wunner,
Andy Shevchenko, linux-kernel
On Tue, Aug 15, 2017 at 10:02:28AM +0300, Mika Westerberg wrote:
> 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>
Hi Greg,
Do you have any comments regarding these patches? If not could you take
them to your char-misc tree?
Thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] thunderbolt: Remove superfluous check
2017-08-27 13:31 ` Mika Westerberg
@ 2017-08-28 14:20 ` Greg Kroah-Hartman
2017-08-30 14:00 ` Bernat, Yehezkel
0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-28 14:20 UTC (permalink / raw)
To: Mika Westerberg
Cc: Bernat, Yehezkel, Andreas Noever, Michael Jamet, Lukas Wunner,
Andy Shevchenko, linux-kernel
On Sun, Aug 27, 2017 at 04:31:27PM +0300, Mika Westerberg wrote:
> On Tue, Aug 15, 2017 at 10:02:28AM +0300, Mika Westerberg wrote:
> > 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>
>
> Hi Greg,
>
> Do you have any comments regarding these patches? If not could you take
> them to your char-misc tree?
Will do, thanks.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] thunderbolt: Remove superfluous check
2017-08-28 14:20 ` Greg Kroah-Hartman
@ 2017-08-30 14:00 ` Bernat, Yehezkel
2017-08-30 14:25 ` gregkh
0 siblings, 1 reply; 7+ messages in thread
From: Bernat, Yehezkel @ 2017-08-30 14:00 UTC (permalink / raw)
To: mika.westerberg, gregkh
Cc: andreas.noever, andriy.shevchenko, Jamet, Michael, lukas, linux-kernel
On Mon, 2017-08-28 at 16:20 +0200, Greg Kroah-Hartman wrote:
> On Sun, Aug 27, 2017 at 04:31:27PM +0300, Mika Westerberg wrote:
> >
> > On Tue, Aug 15, 2017 at 10:02:28AM +0300, Mika Westerberg wrote:
> > >
> > > 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>
> > Hi Greg,
> >
> > Do you have any comments regarding these patches? If not could you
> > take
> > them to your char-misc tree?
> Will do, thanks.
>
> greg k-h
Hi Greg,
I'm not sure if you intended to do so anyway, but I think it worth
adding to v4.13, as these are fixes (and somewhat security related).
Thanks,
Yehezkel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] thunderbolt: Remove superfluous check
2017-08-30 14:00 ` Bernat, Yehezkel
@ 2017-08-30 14:25 ` gregkh
0 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2017-08-30 14:25 UTC (permalink / raw)
To: Bernat, Yehezkel
Cc: mika.westerberg, andreas.noever, andriy.shevchenko, Jamet,
Michael, lukas, linux-kernel
On Wed, Aug 30, 2017 at 02:00:53PM +0000, Bernat, Yehezkel wrote:
> On Mon, 2017-08-28 at 16:20 +0200, Greg Kroah-Hartman wrote:
> > On Sun, Aug 27, 2017 at 04:31:27PM +0300, Mika Westerberg wrote:
> > >
> > > On Tue, Aug 15, 2017 at 10:02:28AM +0300, Mika Westerberg wrote:
> > > >
> > > > 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>
> > > Hi Greg,
> > >
> > > Do you have any comments regarding these patches? If not could you
> > > take
> > > them to your char-misc tree?
> > Will do, thanks.
> >
> > greg k-h
>
> Hi Greg,
>
> I'm not sure if you intended to do so anyway, but I think it worth
> adding to v4.13, as these are fixes (and somewhat security related).
I didn't intend to, it's a bit late for 4.13, if you think these should
be backported, let stable@vger.kernel.org know the git commit ids when
they land in Linus's tree, and I'll be glad to backport them.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-30 14:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-15 5:19 [PATCH 1/3] thunderbolt: Remove superfluous check Bernat, Yehezkel
2017-08-15 7:02 ` Mika Westerberg
2017-08-27 13:31 ` Mika Westerberg
2017-08-28 14:20 ` Greg Kroah-Hartman
2017-08-30 14:00 ` Bernat, Yehezkel
2017-08-30 14:25 ` gregkh
2017-08-15 9:32 ` Andy Shevchenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.