* [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
[not found] <cover.1539036280.git.gustavo@embeddedor.com>
@ 2018-10-08 22:21 ` Gustavo A. R. Silva
2018-10-09 7:27 ` Quentin Schulz
0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-08 22:21 UTC (permalink / raw)
To: Rob Herring, Mark Rutland
Cc: linux-kernel, Quentin Schulz, Gustavo A. R. Silva, devicetree
SERDES_MAX is a valid value to index ctrl->phys in
drivers/phy/mscc/phy-ocelot-serdes.c. But, currently,
there is an out-of-bounds bug in the mentioned driver
when reading from ctrl->phys, because the size of
array ctrl->phys is SERDES_MAX.
Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1.
Notice that this is the first part of the solution to
the out-of-bounds bug mentioned above. Although this
change is not dependent on any other one.
Suggested-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
include/dt-bindings/phy/phy-ocelot-serdes.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/dt-bindings/phy/phy-ocelot-serdes.h b/include/dt-bindings/phy/phy-ocelot-serdes.h
index bd28f21..fe70ada 100644
--- a/include/dt-bindings/phy/phy-ocelot-serdes.h
+++ b/include/dt-bindings/phy/phy-ocelot-serdes.h
@@ -7,6 +7,6 @@
#define SERDES1G_MAX SERDES1G(5)
#define SERDES6G(x) (SERDES1G_MAX + 1 + (x))
#define SERDES6G_MAX SERDES6G(2)
-#define SERDES_MAX SERDES6G_MAX
+#define SERDES_MAX (SERDES6G_MAX + 1)
#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
2018-10-08 22:21 ` [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1 Gustavo A. R. Silva
@ 2018-10-09 7:27 ` Quentin Schulz
2018-10-16 8:44 ` Gustavo A. R. Silva
0 siblings, 1 reply; 7+ messages in thread
From: Quentin Schulz @ 2018-10-09 7:27 UTC (permalink / raw)
To: Gustavo A. R. Silva; +Cc: Rob Herring, Mark Rutland, linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 660 bytes --]
Hi Gustavo,
On Tue, Oct 09, 2018 at 12:21:36AM +0200, Gustavo A. R. Silva wrote:
> SERDES_MAX is a valid value to index ctrl->phys in
> drivers/phy/mscc/phy-ocelot-serdes.c. But, currently,
> there is an out-of-bounds bug in the mentioned driver
> when reading from ctrl->phys, because the size of
> array ctrl->phys is SERDES_MAX.
>
> Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1.
>
> Notice that this is the first part of the solution to
> the out-of-bounds bug mentioned above. Although this
> change is not dependent on any other one.
>
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Thanks,
Quentin
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
2018-10-09 7:27 ` Quentin Schulz
@ 2018-10-16 8:44 ` Gustavo A. R. Silva
2018-10-17 15:09 ` Rob Herring
0 siblings, 1 reply; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-16 8:44 UTC (permalink / raw)
To: Quentin Schulz; +Cc: Rob Herring, Mark Rutland, linux-kernel, devicetree
Hi,
On 10/9/18 9:27 AM, Quentin Schulz wrote:
> Hi Gustavo,
>
> On Tue, Oct 09, 2018 at 12:21:36AM +0200, Gustavo A. R. Silva wrote:
>> SERDES_MAX is a valid value to index ctrl->phys in
>> drivers/phy/mscc/phy-ocelot-serdes.c. But, currently,
>> there is an out-of-bounds bug in the mentioned driver
>> when reading from ctrl->phys, because the size of
>> array ctrl->phys is SERDES_MAX.
>>
>> Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1.
>>
>> Notice that this is the first part of the solution to
>> the out-of-bounds bug mentioned above. Although this
>> change is not dependent on any other one.
>>
>
> Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
>
Friendly ping. Who can you take this?
Thanks!
--
Gustavo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
2018-10-16 8:44 ` Gustavo A. R. Silva
@ 2018-10-17 15:09 ` Rob Herring
2018-10-17 15:19 ` Gustavo A. R. Silva
2018-10-17 15:23 ` Rob Herring
0 siblings, 2 replies; 7+ messages in thread
From: Rob Herring @ 2018-10-17 15:09 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Quentin Schulz, Mark Rutland, linux-kernel, devicetree
On Tue, Oct 16, 2018 at 10:44:52AM +0200, Gustavo A. R. Silva wrote:
> Hi,
>
> On 10/9/18 9:27 AM, Quentin Schulz wrote:
> > Hi Gustavo,
> >
> > On Tue, Oct 09, 2018 at 12:21:36AM +0200, Gustavo A. R. Silva wrote:
> >> SERDES_MAX is a valid value to index ctrl->phys in
> >> drivers/phy/mscc/phy-ocelot-serdes.c. But, currently,
> >> there is an out-of-bounds bug in the mentioned driver
> >> when reading from ctrl->phys, because the size of
> >> array ctrl->phys is SERDES_MAX.
> >>
> >> Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1.
> >>
> >> Notice that this is the first part of the solution to
> >> the out-of-bounds bug mentioned above. Although this
> >> change is not dependent on any other one.
> >>
> >
> > Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
> >
>
> Friendly ping. Who can you take this?
Applied. No need (nor benefit) to ping me. You can check the status of
DT patches on patchwork[1]. If it is there and in the "New" state, it is
in my queue.
Rob
[1] https://patchwork.ozlabs.org/project/devicetree-bindings/list/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
2018-10-17 15:09 ` Rob Herring
@ 2018-10-17 15:19 ` Gustavo A. R. Silva
2018-10-17 15:23 ` Rob Herring
1 sibling, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-17 15:19 UTC (permalink / raw)
To: Rob Herring; +Cc: Quentin Schulz, Mark Rutland, linux-kernel, devicetree
On 10/17/18 5:09 PM, Rob Herring wrote:
>>
>> Friendly ping. Who can you take this?
>
> Applied. No need (nor benefit) to ping me. You can check the status of
> DT patches on patchwork[1]. If it is there and in the "New" state, it is
> in my queue.
>
OK. I've got it. I just didn't know who usually takes these dt-bindings patches.
> Rob
>
> [1] https://patchwork.ozlabs.org/project/devicetree-bindings/list/
>
Thanks, Rob.
--
Gustavo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
2018-10-17 15:09 ` Rob Herring
2018-10-17 15:19 ` Gustavo A. R. Silva
@ 2018-10-17 15:23 ` Rob Herring
2018-10-17 15:45 ` Gustavo A. R. Silva
1 sibling, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-10-17 15:23 UTC (permalink / raw)
To: Gustavo A. R. Silva
Cc: Quentin Schulz, Mark Rutland, linux-kernel, devicetree
On Wed, Oct 17, 2018 at 10:09:31AM -0500, Rob Herring wrote:
> On Tue, Oct 16, 2018 at 10:44:52AM +0200, Gustavo A. R. Silva wrote:
> > Hi,
> >
> > On 10/9/18 9:27 AM, Quentin Schulz wrote:
> > > Hi Gustavo,
> > >
> > > On Tue, Oct 09, 2018 at 12:21:36AM +0200, Gustavo A. R. Silva wrote:
> > >> SERDES_MAX is a valid value to index ctrl->phys in
> > >> drivers/phy/mscc/phy-ocelot-serdes.c. But, currently,
> > >> there is an out-of-bounds bug in the mentioned driver
> > >> when reading from ctrl->phys, because the size of
> > >> array ctrl->phys is SERDES_MAX.
> > >>
> > >> Partially fix this by updating SERDES_MAX to be SERDES6G_MAX + 1.
> > >>
> > >> Notice that this is the first part of the solution to
> > >> the out-of-bounds bug mentioned above. Although this
> > >> change is not dependent on any other one.
> > >>
> > >
> > > Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
> > >
> >
> > Friendly ping. Who can you take this?
>
> Applied. No need (nor benefit) to ping me. You can check the status of
> DT patches on patchwork[1]. If it is there and in the "New" state, it is
> in my queue.
Actually, this doesn't apply to my tree as the file doesn't exist. It
needs to go thru the phy tree. You didn't Cc the maintainer nor list, so
resend.
Acked-by: Rob Herring <robh@kernel.org>
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1
2018-10-17 15:23 ` Rob Herring
@ 2018-10-17 15:45 ` Gustavo A. R. Silva
0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-10-17 15:45 UTC (permalink / raw)
To: Rob Herring; +Cc: Quentin Schulz, Mark Rutland, linux-kernel, devicetree
On 10/17/18 5:23 PM, Rob Herring wrote:
>>> Friendly ping. Who can you take this?
>>
>> Applied. No need (nor benefit) to ping me. You can check the status of
>> DT patches on patchwork[1]. If it is there and in the "New" state, it is
>> in my queue.
>
> Actually, this doesn't apply to my tree as the file doesn't exist. It
> needs to go thru the phy tree. You didn't Cc the maintainer nor list, so
> resend.
>
This is what I get when I run the get_maintainer script:
linux$ scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback include/dt-bindings/phy/phy-ocelot-serdes.h
Rob Herring <robh+dt@kernel.org> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
Mark Rutland <mark.rutland@arm.com> (maintainer:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS)
linux-kernel@vger.kernel.org (open list)
But I'll send it to the phy guys as you suggest.
> Acked-by: Rob Herring <robh@kernel.org>
>
Thanks
--
Gustavo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-10-17 15:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1539036280.git.gustavo@embeddedor.com>
2018-10-08 22:21 ` [PATCH 1/2] dt-bindings: phy: Update SERDES_MAX to be SERDES_MAX + 1 Gustavo A. R. Silva
2018-10-09 7:27 ` Quentin Schulz
2018-10-16 8:44 ` Gustavo A. R. Silva
2018-10-17 15:09 ` Rob Herring
2018-10-17 15:19 ` Gustavo A. R. Silva
2018-10-17 15:23 ` Rob Herring
2018-10-17 15:45 ` Gustavo A. R. Silva
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).