From: Simon Horman <horms@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: "Tony Nguyen" <anthony.l.nguyen@intel.com>,
"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Richard Cochran" <richardcochran@gmail.com>,
"Ruud Bos" <kernel.hbk@gmail.com>,
"Paul Barker" <paul.barker.ct@bp.renesas.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Bryan Whitehead" <bryan.whitehead@microchip.com>,
UNGLinuxDriver@microchip.com,
"Raju Lakkaraju" <Raju.Lakkaraju@microchip.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Jonathan Lemon" <jonathan.lemon@gmail.com>,
"Lasse Johnsen" <l@ssejohnsen.me>,
"Vadim Fedorenko" <vadim.fedorenko@linux.dev>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [Intel-wired-lan] [PATCH net 2/5] renesas: reject PTP_STRICT_FLAGS as unsupported
Date: Tue, 18 Mar 2025 13:59:47 +0000 [thread overview]
Message-ID: <20250318135947.GR688833@kernel.org> (raw)
In-Reply-To: <20250310-jk-net-fixes-supported-extts-flags-v1-2-854ffb5f3a96@intel.com>
+ Shimoda-san
On Mon, Mar 10, 2025 at 03:16:37PM -0700, Jacob Keller wrote:
> The ravb_ptp_extts() function checks the flags coming from the
> PTP_EXTTS_REQUEST ioctl, to ensure that future flags are not accepted on
> accident.
>
> This was updated to 'honor' the PTP_STRICT_FLAGS in commit 6138e687c7b6
> ("ptp: Introduce strict checking of external time stamp options.").
> However, the driver does not *actually* validate the flags.
>
> I originally fixed this driver to reject future flags in commit
> 592025a03b34 ("renesas: reject unsupported external timestamp flags"). It
> is still unclear whether this hardware timestamps the rising, falling, or
> both edges of the input signal.
>
> Accepting requests with PTP_STRICT_FLAGS is a bug, as this could lead to
> users mistakenly assuming a request with PTP_RISING_EDGE actually
> timestamps the rising edge only.
>
> Reject requests with PTP_STRICT_FLAGS (and hence all PTP_EXTTS_REQUEST2
> requests) until someone with access to the datasheet or hardware knowledge
> can confirm the timestamping behavior and update this driver.
>
> Fixes: 6138e687c7b6 ("ptp: Introduce strict checking of external time stamp options.")
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Adding Shimoda-san who may be able to help coordinate a review if
Niklas and Paul are unavailable for some reason.
> ---
> drivers/net/ethernet/renesas/ravb_ptp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c
> index 6e4ef7af27bf31ab2aad8e06a65e0ede6046e3c0..b4365906669f3bd40953813e263aeaafd2e1eb70 100644
> --- a/drivers/net/ethernet/renesas/ravb_ptp.c
> +++ b/drivers/net/ethernet/renesas/ravb_ptp.c
> @@ -179,8 +179,7 @@ static int ravb_ptp_extts(struct ptp_clock_info *ptp,
> /* Reject requests with unsupported flags */
> if (req->flags & ~(PTP_ENABLE_FEATURE |
> PTP_RISING_EDGE |
> - PTP_FALLING_EDGE |
> - PTP_STRICT_FLAGS))
> + PTP_FALLING_EDGE))
> return -EOPNOTSUPP;
>
> if (req->index)
>
> --
> 2.48.1.397.gec9d649cc640
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: "Tony Nguyen" <anthony.l.nguyen@intel.com>,
"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Richard Cochran" <richardcochran@gmail.com>,
"Ruud Bos" <kernel.hbk@gmail.com>,
"Paul Barker" <paul.barker.ct@bp.renesas.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Bryan Whitehead" <bryan.whitehead@microchip.com>,
UNGLinuxDriver@microchip.com,
"Raju Lakkaraju" <Raju.Lakkaraju@microchip.com>,
"Florian Fainelli" <florian.fainelli@broadcom.com>,
"Broadcom internal kernel review list"
<bcm-kernel-feedback-list@broadcom.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"Jonathan Lemon" <jonathan.lemon@gmail.com>,
"Lasse Johnsen" <l@ssejohnsen.me>,
"Vadim Fedorenko" <vadim.fedorenko@linux.dev>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-renesas-soc@vger.kernel.org,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>
Subject: Re: [PATCH net 2/5] renesas: reject PTP_STRICT_FLAGS as unsupported
Date: Tue, 18 Mar 2025 13:59:47 +0000 [thread overview]
Message-ID: <20250318135947.GR688833@kernel.org> (raw)
In-Reply-To: <20250310-jk-net-fixes-supported-extts-flags-v1-2-854ffb5f3a96@intel.com>
+ Shimoda-san
On Mon, Mar 10, 2025 at 03:16:37PM -0700, Jacob Keller wrote:
> The ravb_ptp_extts() function checks the flags coming from the
> PTP_EXTTS_REQUEST ioctl, to ensure that future flags are not accepted on
> accident.
>
> This was updated to 'honor' the PTP_STRICT_FLAGS in commit 6138e687c7b6
> ("ptp: Introduce strict checking of external time stamp options.").
> However, the driver does not *actually* validate the flags.
>
> I originally fixed this driver to reject future flags in commit
> 592025a03b34 ("renesas: reject unsupported external timestamp flags"). It
> is still unclear whether this hardware timestamps the rising, falling, or
> both edges of the input signal.
>
> Accepting requests with PTP_STRICT_FLAGS is a bug, as this could lead to
> users mistakenly assuming a request with PTP_RISING_EDGE actually
> timestamps the rising edge only.
>
> Reject requests with PTP_STRICT_FLAGS (and hence all PTP_EXTTS_REQUEST2
> requests) until someone with access to the datasheet or hardware knowledge
> can confirm the timestamping behavior and update this driver.
>
> Fixes: 6138e687c7b6 ("ptp: Introduce strict checking of external time stamp options.")
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Adding Shimoda-san who may be able to help coordinate a review if
Niklas and Paul are unavailable for some reason.
> ---
> drivers/net/ethernet/renesas/ravb_ptp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c
> index 6e4ef7af27bf31ab2aad8e06a65e0ede6046e3c0..b4365906669f3bd40953813e263aeaafd2e1eb70 100644
> --- a/drivers/net/ethernet/renesas/ravb_ptp.c
> +++ b/drivers/net/ethernet/renesas/ravb_ptp.c
> @@ -179,8 +179,7 @@ static int ravb_ptp_extts(struct ptp_clock_info *ptp,
> /* Reject requests with unsupported flags */
> if (req->flags & ~(PTP_ENABLE_FEATURE |
> PTP_RISING_EDGE |
> - PTP_FALLING_EDGE |
> - PTP_STRICT_FLAGS))
> + PTP_FALLING_EDGE))
> return -EOPNOTSUPP;
>
> if (req->index)
>
> --
> 2.48.1.397.gec9d649cc640
>
>
next prev parent reply other threads:[~2025-03-18 13:59 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 22:16 [Intel-wired-lan] [PATCH net 0/5] net: ptp: fix egregious supported flag checks Jacob Keller
2025-03-10 22:16 ` Jacob Keller
2025-03-10 22:16 ` [Intel-wired-lan] [PATCH net 1/5] igb: reject invalid external timestamp requests for 82580-based HW Jacob Keller
2025-03-10 22:16 ` Jacob Keller
2025-03-11 6:03 ` [Intel-wired-lan] " Michal Swiatkowski
2025-03-11 6:03 ` Michal Swiatkowski
2025-03-12 5:03 ` [Intel-wired-lan] " Keller, Jacob E
2025-03-12 5:03 ` Keller, Jacob E
2025-03-12 20:58 ` [Intel-wired-lan] " Keller, Jacob E
2025-03-12 20:58 ` Keller, Jacob E
2025-03-10 22:16 ` [Intel-wired-lan] [PATCH net 2/5] renesas: reject PTP_STRICT_FLAGS as unsupported Jacob Keller
2025-03-10 22:16 ` Jacob Keller
2025-03-18 13:59 ` Simon Horman [this message]
2025-03-18 13:59 ` Simon Horman
2025-03-18 14:03 ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:03 ` Simon Horman
2025-03-10 22:16 ` [Intel-wired-lan] [PATCH net 3/5] net: lan743x: reject unsupported external timestamp requests Jacob Keller
2025-03-10 22:16 ` Jacob Keller
2025-03-18 14:00 ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:00 ` Simon Horman
2025-03-10 22:16 ` [Intel-wired-lan] [PATCH net 4/5] broadcom: fix supported flag check in periodic output function Jacob Keller
2025-03-10 22:16 ` Jacob Keller
2025-03-18 14:01 ` [Intel-wired-lan] " Simon Horman
2025-03-18 14:01 ` Simon Horman
2025-03-10 22:16 ` [Intel-wired-lan] [PATCH net 5/5] ptp: ocp: reject unsupported periodic output flags Jacob Keller
2025-03-10 22:16 ` Jacob Keller
2025-03-10 23:35 ` [Intel-wired-lan] " Vadim Fedorenko
2025-03-10 23:35 ` Vadim Fedorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250318135947.GR688833@kernel.org \
--to=horms@kernel.org \
--cc=Raju.Lakkaraju@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bryan.whitehead@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=florian.fainelli@broadcom.com \
--cc=hkallweit1@gmail.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jacob.e.keller@intel.com \
--cc=jonathan.lemon@gmail.com \
--cc=kernel.hbk@gmail.com \
--cc=kuba@kernel.org \
--cc=l@ssejohnsen.me \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=niklas.soderlund@ragnatech.se \
--cc=pabeni@redhat.com \
--cc=paul.barker.ct@bp.renesas.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=richardcochran@gmail.com \
--cc=vadim.fedorenko@linux.dev \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.