From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 5F0B53858D3C for ; Mon, 11 Sep 2023 19:33:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5F0B53858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-50098cc8967so7749984e87.1 for ; Mon, 11 Sep 2023 12:33:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; t=1694460783; x=1695065583; darn=sourceware.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=MDxxN8z9KDWsV1QafHYvAB9YSEYc0+uJCmlIpQadHYI=; b=CuH2f61bjhT4xZtIaXcdFQbLb8bFzxld2j/fI4fqiqBqOZgxyayhuakGHYyiqidjrE 1Nuu6X9sw5AOrSY+Gn5l/pNY8hD+hcCFvCyE6W+2N5UjXflYchE5TiYJZVeCbRQmACcX /ekVmhxUa2euL2KQ74a9QHEMQcxhq11vTGPFE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694460783; x=1695065583; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MDxxN8z9KDWsV1QafHYvAB9YSEYc0+uJCmlIpQadHYI=; b=ia2aP5zqEFKCDK7Qk7X8CYGZ7tINTspnTwmfBQL0uHVFylTSQyaj/YwWNlwDNVwV7n XZgJNwi6Gknc+Zr5WK02jv4eIlcwqsRBp4y3E4aGE12yiE/M9X1qLsTlbnxo8n4jkPWk zWXmwoZQGFkIzpH3sWPcrrA86TU99J/WRk7nxqVFCMf8MwWdjuHF4P+3S6eCFnZXX0wW 9cE9jPq2GgjAYcx50yG73/FmY0Hzd1eo7cliALTkPrf8O6tDF4neX9ZpAyAbyxI2Mkg3 ub1s5szaKQ/NojR/uZct+AgGOGtEA9FcvN4LoqZoLUclLlbbbdNAWMviKo0+0RuyxzFM KCEw== X-Gm-Message-State: AOJu0Yzr2MQyXThw8dTYA1YfZwbH3YM/VU9Ffgb1oG5AJFMruUqcfr9q wUvLOSFnGBZgVXCzln5/rhE9rE0alpIegw41/wUavQ== X-Google-Smtp-Source: AGHT+IHxy6C8nQZw+OpMZ37KOTayvSFdAOU1Vck6FtPhK5xys+W2IJHtQRP9FWzykLjVlxwDoa5Xww== X-Received: by 2002:a05:6512:e9c:b0:501:b8dc:6c45 with SMTP id bi28-20020a0565120e9c00b00501b8dc6c45mr9928325lfb.18.1694460782665; Mon, 11 Sep 2023 12:33:02 -0700 (PDT) Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com. [209.85.208.181]) by smtp.gmail.com with ESMTPSA id d4-20020ac25444000000b005009b979e3dsm1439276lfn.303.2023.09.11.12.33.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Sep 2023 12:33:01 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id 38308e7fff4ca-2b95d5ee18dso84056951fa.1 for ; Mon, 11 Sep 2023 12:33:01 -0700 (PDT) X-Received: by 2002:a2e:3817:0:b0:2be:5b09:5544 with SMTP id f23-20020a2e3817000000b002be5b095544mr8351008lja.27.1694460781375; Mon, 11 Sep 2023 12:33:01 -0700 (PDT) MIME-Version: 1.0 References: <20230905203421.2127750-1-adhemerval.zanella@linaro.org> <87ledjxc33.fsf@oldenburg.str.redhat.com> In-Reply-To: From: Linus Torvalds Date: Mon, 11 Sep 2023 12:32:44 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] io: Do not implement fstat with fstatat To: Adhemerval Zanella Netto Cc: Florian Weimer , Adhemerval Zanella via Libc-alpha , Mateusz Guzik Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 Mon, 11 Sept 2023 at 06:11, Adhemerval Zanella Netto wrote: > > I used the same fstatat logic, but using __NR_fstat should be fine. I think you should keep using the same logic as in fstatat(). Using "#ifdef __NR_newfstatat" basically checks for "not stat64". So, for example, x86-64 (and x64) have __NR_newfstatat, but 32-bit i386 has __NR_fstatat64. Now, maybe the other tests effectively already capture this (ie I suspect FSTATAT_USE_STATX may already be the thing that makes 32-bit i386 different), but I do think it's actually better the way it was. ... except maybe a comment somewhere? And maybe it might be good to actually make this "struct stat64" vs "struct stat" more obvious. Linus