From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92d.google.com (mail-ua1-x92d.google.com [IPv6:2607:f8b0:4864:20::92d]) by sourceware.org (Postfix) with ESMTPS id 424E93858D35 for ; Mon, 22 Nov 2021 13:00:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 424E93858D35 Received: by mail-ua1-x92d.google.com with SMTP id o1so36320988uap.4 for ; Mon, 22 Nov 2021 05:00:34 -0800 (PST) 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 :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=NsX9oJqBJdQZQI+b66hwRx8jpNrheOhpbzZqWhmjSAU=; b=geChLmaXMOnhZ24K8AcGE4VXmch7IIj0Lzvyx8ZqY3AfH/EF3qw8chK4A4KDEwdQJA S3Vq2yNi5kNdZPTVZV/sdyfCa1OAatwO0d5cIxGtucVMWc11YmpbAK3GzZTSjR0oc11p MuqgClHOfdpA09nJlEHzYo+3KUBPWZY9AwL0d7T0t1YSXTpRTFcUUYcYct2JrPVDV9Oj AxSILEiO39+nhxfKqtUup5u55iMbpeCMbkqHcG/2eNEJrfAUJoSjpSaFc7eTm8OmP3LH COzO0kd5SMFaExY5B17hIZMF0d5Od1U77bkOwbsXW9JO+8Z8o+c/gb5p+vOPnF0lyTpa dXxA== X-Gm-Message-State: AOAM533Fqi0JQMciS/mDieN9CtvtTW2CYOgzQX0WPbE+oDHupH935MNH KwJhbP84GwqYtUxgSSDVm2xhXw== X-Google-Smtp-Source: ABdhPJyVic6jcabgb4unm+cheXGhFHpvw8gOHfI886P6P/Xa/MuRKULN3YgPkWF46ypRENOB03Tgxw== X-Received: by 2002:a67:1ac1:: with SMTP id a184mr125106387vsa.22.1637586033680; Mon, 22 Nov 2021 05:00:33 -0800 (PST) Received: from ?IPV6:2804:431:c7cb:e054:bce6:bc54:280c:f077? ([2804:431:c7cb:e054:bce6:bc54:280c:f077]) by smtp.gmail.com with ESMTPSA id v7sm4480010uaj.13.2021.11.22.05.00.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Nov 2021 05:00:33 -0800 (PST) Message-ID: <7bea3e23-bbde-e5c8-137d-1fc105c1a7b7@linaro.org> Date: Mon, 22 Nov 2021 10:00:31 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 Subject: Re: [PATCH] linux: Define STAT64_IS_KERNEL_STAT64 by default Content-Language: en-US To: Stafford Horne , GLIBC patches References: <20211120210901.3991578-1-shorne@gmail.com> From: Adhemerval Zanella In-Reply-To: <20211120210901.3991578-1-shorne@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2021 13:00:36 -0000 On 20/11/2021 18:09, Stafford Horne via Libc-alpha wrote: > In commit 36260d5035 ("linux: Set default kernel_stat.h to LFS") the > default for STAT64_IS_KERNEL_STAT64 was removed. This patch adds it > back. > > For architectures that want to used the default kernel_stat.h and do not > have __NR_newfstatat, STAT64_IS_KERNEL_STAT64 needs to be defined. Set > the default as 1 as modern port's stat64 struct should match the kernel > stat64 layout. > > I tested this on the OpenRISC port and it seems to work fine. Currently, > all archs that use the default kernel_stat.h define __NR_newfstatat so > they will not use the STAT64_IS_KERNEL_STAT64 macro. However, arc seems > to be an outlier it uses the default kernel_stat.h, but does not define > __NR_newfstatat or __NR_fstatat64 I am not clear how arc works here. arc and usually newer 32-bit ports will only use __NR_statx: 138 #if (__WORDSIZE == 32 \ 139 && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ 140 || defined STAT_HAS_TIME32 141 # define FSTATAT_USE_STATX 1 142 #else 143 # define FSTATAT_USE_STATX 0 144 #endif The patch looks ok, but it seems strange that ork1 requires it since it setting minimum required kernel to 5.10. I would expect that __ASSUME_STATX would be defined and only fstatat64_time64_statx would be used. > --- > sysdeps/unix/sysv/linux/kernel_stat.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/sysdeps/unix/sysv/linux/kernel_stat.h b/sysdeps/unix/sysv/linux/kernel_stat.h > index 6c1b175cb4..b8c376f41e 100644 > --- a/sysdeps/unix/sysv/linux/kernel_stat.h > +++ b/sysdeps/unix/sysv/linux/kernel_stat.h > @@ -20,3 +20,4 @@ > #define XSTAT_IS_XSTAT64 1 > #define STATFS_IS_STATFS64 __STATFS_MATCHES_STATFS64 > #define STAT_IS_KERNEL_STAT 1 > +#define STAT64_IS_KERNEL_STAT64 1 >