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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7f33997-de4e-4a3d-ab1e-0e8fc77854ec@foss.st.com>
Date: Tue, 10 Sep 2024 08:49:57 +0200
From: Christophe ROULLIER <christophe.roullier@...s.st.com>
To: Richard Cochran <richardcochran@...il.com>
CC: Rahul Rameshbabu <rrameshbabu@...dia.com>, <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Shuah Khan <shuah@...nel.org>,
        Maciek Machnikowski <maciek@...hnikowski.net>
Subject: Re: [BUG] Regression with commit: ptp: Add .getmaxphase callback to
 ptp_clock_info

Hi Richard,

On 9/9/24 17:35, Richard Cochran wrote:
> On Mon, Sep 09, 2024 at 05:13:02PM +0200, Christophe ROULLIER wrote:
>> Hi Rahul, All,
>>
>> I'm facing regression using ptp in STM32 platform with kernel v6.6.
>>
>> When I use ptp4l I have now an error message :
>>
>> ptp4l[116.627]: config item (null).step_window is 0
>> PTP_CLOCK_GETCAPS: Inappropriate ioctl for device
> Strange.  The ptp4l code does simply:
>
> 	err = ioctl(fd, PTP_CLOCK_GETCAPS, caps);
> 	if (err)
> 		perror("PTP_CLOCK_GETCAPS");
>
> But this kernel change...
>
>> This regression was introduced in kernel v6.3 by commit "ptp: Add
>> .getmaxphase callback to ptp_clock_info" SHA1:
>> c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81:
> ...should not have changed the ioctl magic number:
>
> diff --git a/include/uapi/linux/ptp_clock.h b/include/uapi/linux/ptp_clock.h
> index 1d108d597f66d..05cc35fc94acf 100644
> --- a/include/uapi/linux/ptp_clock.h
> +++ b/include/uapi/linux/ptp_clock.h
> @@ -95,7 +95,8 @@ struct ptp_clock_caps {
>   	int cross_timestamping;
>   	/* Whether the clock supports adjust phase */
>   	int adjust_phase;
> -	int rsv[12];   /* Reserved for future use. */
> +	int max_phase_adj; /* Maximum phase adjustment in nanoseconds. */
> +	int rsv[11];       /* Reserved for future use. */
>   };
>
> Maybe the compiler added or removed padding?  What compilers did you
> use?

I've tested with platform 32bits and 64 bits and I have same error.

Toolchain/compiler used are:

aarch64-ostl-linux-gcc --version
aarch64-ostl-linux-gcc (GCC) 11.3.0
or

arm-ostl-linux-gnueabi-gcc --version
arm-ostl-linux-gnueabi-gcc (GCC) 12.2.0

Thanks,

Christophe

>
> Thanks,
> Richard
>
>
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ