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: <0ff0672d-9c36-4ff6-b863-3dce83d4d172@foss.st.com>
Date: Thu, 12 Sep 2024 16:51:51 +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,


I put in attachment result of pahole.

It is :

struct ptp_clock_caps {
     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 */
};

ptp4l used: ptp4l -v
4.1

Thanks,

BR

Christophe

On 9/11/24 06:14, Richard Cochran wrote:
> 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 */
> };
View attachment "pahole_ptp4l_aarch64" of type "text/plain" (98864 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ