From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa35.google.com (mail-vk1-xa35.google.com [IPv6:2607:f8b0:4864:20::a35]) by sourceware.org (Postfix) with ESMTPS id 78C173854174 for ; Fri, 30 Sep 2022 12:51:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 78C173854174 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-vk1-xa35.google.com with SMTP id g27so2190591vkl.3 for ; Fri, 30 Sep 2022 05:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date; bh=CsEbMKilP3Mk7NV8Hsa4lWSv5E9LBGKuw3jJ2QYJWqk=; b=ys9/HhnDGmAzEb91f0HJQSje/kdnkvx9rF83dag/SD8TzSVdiUKditbJOGwT71YkqH 8VEXB7qggTshR2ZcD/oJz7AaDwC2wIrdfPtU4ytMLsyqS+ki0XACgnscL0pyxYvNUQJ1 s25raeBVZ09V2CXY21MhuT6K9tmbl/voT4p0XATL0YM1KPLVoQXfD8wKbOawOWutZmbn kdKiS40vjIFpRqmeyV2FFOZh4cZnNh+GLsGqfnEaYeGTATgTIY4u0OeUlthF8AC7Rjua idZXI9wm9qT1wrWzF2APxLE/BEyqcuiLrBYj5BpEuTLnenkwT8/4Jj2A0JPxY8QGS1MT P23g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=CsEbMKilP3Mk7NV8Hsa4lWSv5E9LBGKuw3jJ2QYJWqk=; b=Ui+oqETc+/ozxXg9kBG9RgJ3L1A+XkQsn519SEQ85CD1Pix0hHfNMqYygWzEsxmD+4 V4SeXatQMIgJPnTala8N0g4ffUWFyku82SodGggs1c9r3wM+de0sYmnwPgx/EuLBgmGl VyQFcyr/WcY0U+WR9E3NAL8Dikpr97lXd2eUYrx0oiThonOdQIMtGOJK1EQ/Tx7FGj8j OtQmf4i2SrbMchus6NAFCVbJNG19CUmZzU2q5o+dReyaavSnsHbmwvHuVHWCjUk3Zmjb vzf6mMKrLP8S/ivMLj/K1kC+NFPwoW8Bl3NNtRVV3cgVvuFvGh3fAVUIG9XXl5LFl04u P7Xw== X-Gm-Message-State: ACrzQf0lcuvgiZbIrykEelfCzr/amY2mCmlZdfpKXg1eZsGC0zvGpy5m RxFK4ftJwkH017mNSM8mjPGmCg== X-Google-Smtp-Source: AMsMyM5MAg13NEeqIGyiBZMka12QvNKfampXe4R2NQ8HtMKkMyLOIbEsmNtdcAgnCeZJM4BvYZJSdA== X-Received: by 2002:a1f:b201:0:b0:3a2:9d16:1d1f with SMTP id b1-20020a1fb201000000b003a29d161d1fmr4030294vkf.1.1664542318715; Fri, 30 Sep 2022 05:51:58 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:3736:5474:7f48:dc74:6616? ([2804:1b3:a7c2:3736:5474:7f48:dc74:6616]) by smtp.gmail.com with ESMTPSA id 6-20020a0561220a0600b0038c90405164sm1795753vkn.55.2022.09.30.05.51.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 05:51:58 -0700 (PDT) Message-ID: <9a7585d4-45de-d957-f746-770bc2abf55e@linaro.org> Date: Fri, 30 Sep 2022 09:51:56 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH v5 2/3] linux: Fix ancillary 64-bit time timestamp conversion (BZ #28349, BZ#28350) Content-Language: en-US To: Szabolcs Nagy Cc: Florian Weimer , libc-alpha@sourceware.org References: <20220127201542.2306657-1-adhemerval.zanella@linaro.org> <20220127201542.2306657-3-adhemerval.zanella@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 30/09/22 09:31, Szabolcs Nagy wrote: > The 09/30/2022 08:24, Adhemerval Zanella Netto wrote: >> On 30/09/22 08:05, Szabolcs Nagy wrote: >>> The 09/30/2022 11:47, Szabolcs Nagy via Libc-alpha wrote: >>>> The 01/27/2022 17:15, Adhemerval Zanella via Libc-alpha wrote: >>>>> The __convert_scm_timestamps only updates the control message last >>>>> pointer for SOL_SOCKET type, so if the message control buffer contains >>>>> multiple ancillary message types the converted timestamp one might >>>>> overwrite a valid message. >>>>> >>>>> The test checks if the extra ancillary space is correctly handled >>>>> by recvmsg/recvmmsg, where if there is no extra space for the 64-bit >>>>> time_t converted message the control buffer should be marked with >>>>> MSG_TRUNC. It also check if recvmsg/recvmmsg handle correctly multiple >>>>> ancillary data. >>>>> >>>>> Checked on x86_64-linux and on i686-linux-gnu on both 5.11 and >>>>> 4.15 kernel. >>>>> >>>>> Co-authored-by: Fabian Vogt >>>> >>>> note: the time64 recvmsg test started to fail on 32bit >>>> arm after i updated my aarch64 kernel to 5.18 >>> >>> sorry the kernel is >>> Linux 8a7948402d35 5.15.0-48-generic #54~20.04.1-Ubuntu SMP Thu Sep 1 16:20:53 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux >> >> I just check on exactly same kernel (ubuntu 22) on a aarch64 VM and I could not >> reproduce it: >> >> $ uname -a >> Linux ubuntu-aarch64 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:31:33 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux >> $ file socket/tst-socket-timestamp >> socket/tst-socket-timestamp: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped >> $ file socket/tst-socket-timestamp-time64 >> socket/tst-socket-timestamp-time64: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped >> $ ./testrun.sh socket/tst-socket-timestamp >> $ ./testrun.sh socket/tst-socket-timestamp-time64 >> $ >> >> I used gcc 12.1.1, maybe it is a compiler issue? > > sorry it was my fault: old kernel headers. Right, but I am puzzled since it should not matter (at least glibc should handle it). What was miscompiled due wrong kernel header?