[chrony-users] No packets transmitted when using Yocto 4.3.1 |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-users Archives
]
- To: chrony-users@xxxxxxxxxxxxxxxxxxxx
- Subject: [chrony-users] No packets transmitted when using Yocto 4.3.1
- From: Thomas Lange <thomas@xxxxxxxxxxxx>
- Date: Fri, 15 Dec 2023 11:46:57 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corelatus.se; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm1; t=1702637220; x=1702723620; bh=IJpa8O1WiZ bfhFwqt8zpehJOUmyjIb1zbK/pUtg7QTQ=; b=EpfHMUpywuPINv2B9KfF3TA/9v RLYMD2hr/34an8y8b2pU6hs4lex1AfZqUF2M6py2/ZNjajA3flfqeyrF5Hr4N7yV tznGW5lw3d2Yx27gTsihhZsJgJJZ20YhptVZeA5JtBa4OkCDMFOHIGZEH2ASrhhg bKw/yZyVhIBrsO0yDw+UwKhY4+PQU5GxHAeFGMLme8bf9I8CqAbZXM/f1mnl5fN+ G+utuTLgZNkmqb+W4nFO5J5Wvm9bg50ZhQXirmVI8ASiJQd/Xv8pRTN9d8F6HoCf xdDpZA6++ULJ0/bADrU0DXlUgjJyuDhptgcKrwr4iDuquRoXA9D1aOWt7qIA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1702637220; x=1702723620; bh=IJpa8O1WiZbfhFwqt8zpehJOUmyj Ib1zbK/pUtg7QTQ=; b=iW7ebH/A2HulTDKDV/gjhRN6CknfP7LC9Iyu3iDHojFk sefk46VOfleD3N6nFXLaLcchym+MSGBbY/7ay5aJwNR5M3ZezY17nBhAkvHMLDFf DtmR90bvwjvcwXS3pjH3jnvKkGk6d++tSbAnR6hR1WfzLQ6u2yhTlAuT2dGH7KA/ uQxpSXnjSdBe4ON7IRK0StxKnmx2SiA7/5le2cpzGchCSI/lgc652qwdJDPZeQBz Nt5lSjDG99WYfLFA7oRYtp6CBooNHK9iMOu50lSXLyuC1V6RVOxLfqhuSwJ0s6RM CREJCCVO0gbyW1STdRdgfRVMbVOaKTT062mJQcnhcw==
- Feedback-id: ia69946ac:Fastmail
Hi,
when I cross compile Chrony for a 32bit ARM system using Yocto 4.3.1, no NTP
packets are transmitted.
cmsg_type is set to SO_TIMESTAMPING_NEW.
This is rejected by __sock_cmsg_send() in net/core/sock.c and no packet
is transmitted:
4.3.1
-----
clock_gettime64(CLOCK_REALTIME, {tv_sec=1702632790, tv_nsec=105009194}) = 0
sendmsg(5, {msg_name={sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("172.16.1.2")}, msg_namelen=16, msg_iov=[{iov_base="#\0\6 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=48}], msg_iovlen=1, msg_control=[{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SO_TIMESTAMPING_NEW, cmsg_data=???}], msg_controllen=16, msg_flags=0}, 0) = -1 EINVAL (Invalid argument)
When using Yocto 4.2.3, cmsg_type is set to SO_TIMESTAMPING_OLD.
This works fine:
4.2.3
-----
clock_gettime64(CLOCK_REALTIME, {tv_sec=1702632678, tv_nsec=601199243}) = 0
sendmsg(5, {msg_name={sa_family=AF_INET, sin_port=htons(123), sin_addr=inet_addr("172.16.1.2")}, msg_namelen=16, msg_iov=[{iov_base="#\0\6 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., iov_len=48}], msg_iovlen=1, msg_control=[{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SO_TIMESTAMPING_OLD, cmsg_data=???}], msg_controllen=16, msg_flags=0}, 0) = 48
I think the 4.3.1 behavior is due to 64bit time now being default in Yocto:
arm-poky-linux-gnueabi-gcc -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64 --sysroot=/opt/yocto/4.3.1/sysroots/cortexa9hf-neon-poky-linux-gnueabi -O2 -pipe -g -feliminate-unused-debug-types -pthread -c socket.c
which maps SO_TIMESTAMP to SO_TIMESTAMP_NEW.
I am currently using a kernel based on 5.15.100. I haven't tried a newer one yet
but looking at 6.7-rc5, the code in __sock_cmsg_send still doesn't support
SO_TIMESTAMPING_NEW.
Before I dig deeper, I want to check if this is a known issue already?
/Thomas
--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.