From nobody Mon May 16 07:59:29 2022 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 71C641B35F01 for ; Mon, 16 May 2022 07:59:37 +0000 (UTC) (envelope-from paulf2718@gmail.com) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L1s9426vdz3Nj7 for ; Mon, 16 May 2022 07:59:36 +0000 (UTC) (envelope-from paulf2718@gmail.com) Received: by mail-wr1-x431.google.com with SMTP id m1so19309874wrb.8 for ; Mon, 16 May 2022 00:59:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:to:references:from :in-reply-to:content-transfer-encoding; bh=ErHvUIB2DD6Drku3EUGuPuvcY5dvDIcadt4kLVdRKdY=; b=KeoSr6xE/8wiJOYPeaG/P0JFRQcBy7/rvZwkdfNmG1cUjDYkTB5VUCxp4hoCk139/b gsA7ecGQnFERoXl5146tpfYOAliEC/y1nrV+aYxVmswZGOuUFIrwTYjBZZgY9hRMoz5T x6K2xjNH+/GvzrSmxxUmeOTr++0slZQSZYnvMSFK/3pmQAFran3IAVTiJpvOxDZJ5eW7 ExdItfSCpu/T13LTpH0pzhSxQckDznMu7VYycZfixrYT6ZASKPZvegL++kvzmoqklYL9 bGkUcesrdxxJ1yd27bOlLie8va7vgoBuiT+G3lbxH3YFgtxkQcQhiUkc+VyqwURcggxL 2agA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :to:references:from:in-reply-to:content-transfer-encoding; bh=ErHvUIB2DD6Drku3EUGuPuvcY5dvDIcadt4kLVdRKdY=; b=zM4DS/Ee1FiHjc9kCHhslcQDN717RHbnPCC2oQFku/vJE3o+f01S18jTbw5yMbCInO gRHC+g4ND7gaIa7E+DavTc1UYrbztw04C0k0FO27MQjcPgmvTf9X42gzMCdHykuXybqc WrnsQ+LPg+baEZzk+HpsAWCOXI6XzWW3gAlsTDw4eEk3h91SsHbU3sady2w8Esy1Klnm nelCMr6XvOxmGrGEb/vsQ8UiHeqN9VEBCIs79eu1LQp3OKifaRYWzmusUSgmx/0W9ylg Orw5jr/YUk8OEZ2MgH9P+NlmYxaD50cYY2X/A7SAAMI8bugTFFMPXHCa06mcBX1nCBIb veLw== X-Gm-Message-State: AOAM531VvA/qVgkPbUtMHoT0OsWE0e06DHW+iY083YcgKIcVMYUgKFRU 2/mN7MbBoKjJBEQXXCvluLwsExRN6meuZw== X-Google-Smtp-Source: ABdhPJzO/+rbMFMUGObsaurK55lgS9SDCWr5sgzML/aqe4rGSibEuUxVImY3Fa/PhKNzipHZwY+kcA== X-Received: by 2002:adf:fd10:0:b0:20d:c38:d43a with SMTP id e16-20020adffd10000000b0020d0c38d43amr1501988wrr.84.1652687975080; Mon, 16 May 2022 00:59:35 -0700 (PDT) Received: from [137.202.243.61] (nat-ies.mentorg.com. [192.94.31.2]) by smtp.gmail.com with ESMTPSA id z12-20020a7bc7cc000000b003942a244f39sm14551781wmk.18.2022.05.16.00.59.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 00:59:34 -0700 (PDT) Message-ID: <8771f132-7388-29b6-313b-62b92869002d@gmail.com> Date: Mon, 16 May 2022 09:59:29 +0200 List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: Changes to stat ABI To: FreeBSD Hackers References: From: "Floyd, Paul" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4L1s9426vdz3Nj7 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=KeoSr6xE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of paulf2718@gmail.com designates 2a00:1450:4864:20::431 as permitted sender) smtp.mailfrom=paulf2718@gmail.com X-Spamd-Result: default: False [-3.98 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.994]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.983]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::431:from]; MLMMJ_DEST(0.00)[freebsd-hackers]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On 2022-05-15 19:31, Warner Losh wrote: > Scratch that, this is a clang 11 vs clang13 issue. > > Most likely clang 13 is more aggressively optimizing, so fstat is not > actually on the stack... Because > of LTO, you'll need to check the disassembled binary to know for sure. > Hi Warner I'll do some tests on varions combinations of FreeBSD 13 / 13.1 and clang 11 / 13. I don't understand why optimization would affect stat family syscalls but not any other syscalls though. One issue is whether system calls use a function prolog or not. Prior to FreeBSD 13.0, Valgrind assumed no prolog and looked directly for a return address at the top of the stack rather than saved RBP then the return address. This changed in FreeBSD 13.0. Actually I didn't see exactly what had changed in FreeBSD, but disabling the syscall-with-no-prolog check fixed a lot of test failures. It's also possible that the code that looks for CFI didn't work prior to FreeBSD 13.0. I'll also do some tests on Valgrind so see if the no-prolog code is causing this. A+ Paul