lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <43cc641e-4c77-49a0-a18a-9707600de344@foss.st.com>
Date: Thu, 4 Sep 2025 13:48:24 +0200
From: Alexandre TORGUE <alexandre.torgue@...s.st.com>
To: Gatien Chevallier <gatien.chevallier@...s.st.com>,
        Andrew Lunn
	<andrew+netdev@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        "Eric
 Dumazet" <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        "Richard
 Cochran" <richardcochran@...il.com>,
        Rob Herring <robh@...nel.org>,
        "Krzysztof Kozlowski" <krzk+dt@...nel.org>,
        Conor Dooley
	<conor+dt@...nel.org>,
        "John Stultz" <jstultz@...gle.com>,
        Thomas Gleixner
	<tglx@...utronix.de>,
        "Stephen Boyd" <sboyd@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH net-next v4 0/3] net: stmmac: allow generation of flexible
 PPS relative to MAC time

Hi Gatien

On 9/1/25 11:16, Gatien Chevallier wrote:
> When doing some testing on stm32mp2x platforms(MACv5), I noticed that
> the command previously used with a MACv4 for genering a PPS signal:
> echo "0 0 0 1 1" > /sys/class/ptp/ptp0/period
> did not work.
> 
> This is because the arguments passed through this command must contain
> the start time at which the PPS should be generated, relative to the
> MAC system time. For some reason, a time set in the past seems to work
> with a MACv4.
> 
> Because passing such an argument is tedious, consider that any time
> set in the past is an offset regarding the MAC system time. This way,
> this does not impact existing scripts and the past time use case is
> handled. Edit: But maybe that's not important and we can just change
> the default behavior to this.
> 
> Example to generate a flexible PPS signal that has a 1s period 3s
> relative to when the command was entered:
> 
> echo "0 3 0 1 1" > /sys/class/ptp/ptp0/period
> 
> Signed-off-by: Gatien Chevallier <gatien.chevallier@...s.st.com>
> ---
> Changes in v4:
> - Export timespec64_add_safe() symbol.
> - Link to v3: https://lore.kernel.org/r/20250827-relative_flex_pps-v3-0-673e77978ba2@foss.st.com
> 
> Changes in v3:
> - Fix warning on braces for the switch case.
> - Link to v2: https://lore.kernel.org/r/20250729-relative_flex_pps-v2-0-3e5f03525c45@foss.st.com
> 
> Changes in v2:
> - Drop STMMAC_RELATIVE_FLEX_PPS config switch
> - Add PTP reference clock in stm32mp13x SoCs
> - Link to v1: https://lore.kernel.org/r/20250724-relative_flex_pps-v1-0-37ca65773369@foss.st.com
> 
> ---
> Gatien Chevallier (3):
>        time: export timespec64_add_safe() symbol
>        drivers: net: stmmac: handle start time set in the past for flexible PPS
>        ARM: dts: stm32: add missing PTP reference clocks on stm32mp13x SoCs
> 
>   arch/arm/boot/dts/st/stm32mp131.dtsi             |  2 ++
>   arch/arm/boot/dts/st/stm32mp133.dtsi             |  2 ++
>   drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c | 34 +++++++++++++++++++++++-
>   kernel/time/time.c                               |  1 +
>   4 files changed, 38 insertions(+), 1 deletion(-)
> ---
> base-commit: 864ecc4a6dade82d3f70eab43dad0e277aa6fc78
> change-id: 20250723-relative_flex_pps-faa2fbcaf835
> 
> Best regards,

DT patch applied on stm32-next.

Thanks!
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ