From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 9109B3858D1E for ; Tue, 20 Jun 2023 12:38:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9109B3858D1E 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-wm1-x332.google.com with SMTP id 5b1f17b1804b1-3f80cbc37c5so11115835e9.1 for ; Tue, 20 Jun 2023 05:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687264724; x=1689856724; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=GZZJEciobkjFcZ/OGsAs1snoPL6EBKgItcsQziGcIjo=; b=Io8GYeeIg1Gao0i1YQRHO+Upzo378hYizeeKTVFoclxEDSeCaC+fD0tTTGZ5dPjolD SmcdSbrSslWzlg1FJrQKGUIPm77vNC5PoHr+DTgbABgfOHyhKFCxohqjnbrrkOZt2A/s avNrpLw6jex4wSxsudPvg/CbNO01F+zUO+70Ols+K2WPXJbc8N1X0Ux9omRQoB5pwYRY 8dbRa+fTZX5kSVzOq1Psg7FQUmCuDeL1SVnwd8A5iX1nGNfSd+adspoaSPHgaUgW3DBh 7zRxzucmXDNrb2WWrAp8ihLzlAeFfRjGjehyh1w6ze0nh8ehRj472FPWModww6TCTAaZ HyYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687264724; x=1689856724; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GZZJEciobkjFcZ/OGsAs1snoPL6EBKgItcsQziGcIjo=; b=MDVfjHXyJWsBB5Yt+7b55G1yqt+vFHXZdeENhK1Ll5Y6OJMrFntvm4wsFR9yh3d7Hi C85O0qi391Stjpn9yWwGZvzRzYhJeJMD76wIhwxnd8x+UKhR9S5mEOAvmB2DimRl9fI3 nllvKrOIVaFBmF7aqiSYh7ZBGKIfnWjE+BqbZbiFdwhTGuUhuMJqIYrKMDZ25nHrWTNG yeAK6o05DotsaKNiy4RK5+AsLTmfqNJsMPpHcDFvv04VkWauHkeGRzO2EC9KHWKOoIzh YeRESdQZfjjWtuKA8arJ4QF0zG22gR9W3E23qyqzNWa4fA8fHHiuo8c8Mp4+2IkAENPb GClQ== X-Gm-Message-State: AC+VfDyTqf8f4UkuGZ1u86HXyD1/4TEM+Ipkjg69JIJ1rus2Qbtjz3ip 3oITLGsguvOQHOcGBDwJYY/hoMtKbOvgzDeb/g== X-Google-Smtp-Source: ACHHUZ7NwJ2Gx7SmJHC1g2ydSn56QH6W4kDNp8P0F0N7dAOV7IUciT0Aa5NAVqyfDO251xf7i+a7DA== X-Received: by 2002:a05:600c:470d:b0:3f9:ba3:70b5 with SMTP id v13-20020a05600c470d00b003f90ba370b5mr5472839wmo.0.1687264724315; Tue, 20 Jun 2023 05:38:44 -0700 (PDT) Received: from smtpclient.apple ([2a00:cc47:21f0:f400:f808:7520:927e:5d33]) by smtp.gmail.com with ESMTPSA id m7-20020a7bce07000000b003f9b155b148sm5154146wmc.34.2023.06.20.05.38.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jun 2023 05:38:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: [PATCH v3 0/5] fcntl fortification From: Maxim Kuvyrkov In-Reply-To: Date: Tue, 20 Jun 2023 16:38:32 +0400 Cc: Carlos O'Donell , Adhemerval Zanella Netto , Libc-alpha Content-Transfer-Encoding: quoted-printable Message-Id: <99B8C69B-D3F3-4ED3-9F3B-19BC586BF6B6@linaro.org> References: <20230617222218.642125-1-bugaevc@gmail.com> <1249c048-c72d-0bf1-f0e0-2e619cfe5372@redhat.com> <783b1d24-f2b4-3a3c-d636-2b231be3b823@linaro.org> <2B723D88-546D-4AA6-8BDA-7B6CC9F5D404@linaro.org> <4F21801F-83DB-44EE-A463-9C6FC42F81B4@linaro.org> To: Sergey Bugaev X-Mailer: Apple Mail (2.3731.600.7) X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Jun 20, 2023, at 15:28, Sergey Bugaev wrote: >=20 > On Tue, Jun 20, 2023 at 12:41=E2=80=AFPM Maxim Kuvyrkov > wrote: >> I don't think CPU architecture plays a role here either. My guess = (didn't verify) is that the difference comes from GCC version and its = default C standard. >=20 > But the C standard is being explicitly set in these tests (those > -std=3Dc89 flags), no? >=20 >> In our case we are running CI in latest Ubuntu LTS (22.04 at the = moment), which has GCC 11. >>=20 >> What environment did you test this in? >=20 > I have GCC 13.1 and Clang 16.0 targeting {x86_64,i686}-linux-gnu, GCC > 12.2 targeting i686-gnu, and GCC master targeting x86_64-gnu. I have > only run the full testsuite on x86_64-linux-gnu (and it does pass, > including all the check-installed-headers tests); for the other > variants I've only checked debug/tst-fortify (which also tries to > compile the header in various configurations) and tried to build > sample code against the installed headers manually (but have not > checked different C standards and _XXXX_SOURCE definitions while doing > that). I have also done some checks on Compiler Explorer, and indeed I > can reproduce F_DUPFD_CLOEXEC being unavailable with -std=3Dc89 (or = any > non-GNU C, e.g. -std=3Dc11) there -- but that happens when targeting > x86_64 too. >=20 > ...Having written the above, I went and re-ran the test suite, and > traced which files GCC opens, and it does not even look at fcntl3.h > when running check-installed-headers! That explains it, the CI must > have _FORTIFY_SOURCE set in the CFLAGS for glibc itself, but I don't, > and Adhemerval probably doesn't either. With _FORTIFY_SOURCE manually > added, I can reproduce the exact test failure on my setup too. We don't set _FORTIFY_SOURCE in our CI's glibc build, but, I think, it = comes from Ubuntu's GCC, where it may be enabled by default. Or are you = using Ubuntu and not seeing this with default Ubuntu toolchain? -- Maxim Kuvyrkov https://www.linaro.org