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: <ZuEZG6DM3SUdkE62@hoboy.vegasvil.org>
Date: Tue, 10 Sep 2024 21:14:19 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Christophe ROULLIER <christophe.roullier@...s.st.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

On Tue, Sep 10, 2024 at 08:49:57AM +0200, Christophe ROULLIER wrote:
> 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

Something is off.

Can you run `pahole` on the ptp4l binaries that you are using, and
check the layout of `struct ptp_clock_caps` ?

It should look something like the ones below...

Thanks,
Richard

---
struct ptp_clock_caps1 {
        int                        max_adj;              /*     0     4 */
        int                        n_alarm;              /*     4     4 */
        int                        n_ext_ts;             /*     8     4 */
        int                        n_per_out;            /*    12     4 */
        int                        pps;                  /*    16     4 */
        int                        rsv[15];              /*    20    60 */

        /* size: 80, cachelines: 2, members: 6 */
        /* last cacheline: 16 bytes */
};
struct ptp_clock_caps2 {
        int                        max_adj;              /*     0     4 */
        int                        n_alarm;              /*     4     4 */
        int                        n_ext_ts;             /*     8     4 */
        int                        n_per_out;            /*    12     4 */
        int                        pps;                  /*    16     4 */
        int                        n_pins;               /*    20     4 */
        int                        cross_timestamping;   /*    24     4 */
        int                        adjust_phase;         /*    28     4 */
        int                        rsv[12];              /*    32    48 */

        /* size: 80, cachelines: 2, members: 9 */
        /* last cacheline: 16 bytes */
};
struct ptp_clock_caps3 {
        int                        max_adj;              /*     0     4 */
        int                        n_alarm;              /*     4     4 */
        int                        n_ext_ts;             /*     8     4 */
        int                        n_per_out;            /*    12     4 */
        int                        pps;                  /*    16     4 */
        int                        n_pins;               /*    20     4 */
        int                        cross_timestamping;   /*    24     4 */
        int                        adjust_phase;         /*    28     4 */
        int                        max_phase_adj;        /*    32     4 */
        int                        rsv[11];              /*    36    44 */

        /* size: 80, cachelines: 2, members: 10 */
        /* last cacheline: 16 bytes */
};

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ