From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id AAB603857373 for ; Mon, 16 May 2022 18:44:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AAB603857373 Received: by mail-ot1-x335.google.com with SMTP id i25-20020a9d6259000000b00605df9afea7so10665443otk.1 for ; Mon, 16 May 2022 11:44:48 -0700 (PDT) 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:cc:references:from:in-reply-to :content-transfer-encoding; bh=6bxGml6BkElqlFaA0pp2RxMtR1oatYOchTiVdTunfto=; b=5dAnM5Vj2P7HI8qXlhCEuKZ7maBDBU6/m+ogLVMMyOXZxEpJ25xwWrIBKl9Wwaaocd 3jbfPsSlFJ2mwLM587/ow+A2+1V+i4037loFGW3uIZagOwAmePfS0HfoJgctzKTGnQ1E Il+nQtm62Nkm0rFUlAXeaGCujIU6u4Kv+xVS3CvY0r6wY5JXlKA/eMBAhtq9AHNWCJp5 objzOJy7GRXEuJtxBusEGdnJUxA1T/nSM5iyUkGV2ig8TLBE6ciKutLAoZEzLl2adORz 7nMZbXAh5mazFsweL1Nit6HZZipUyDW4wmlgcdkfa4kCb2evKmacR+MCGOaZdt2TVQiF RwKg== X-Gm-Message-State: AOAM5339GmVaHlrlN4XdUBijuOvMzep/bCftlWyubN1/tXbUVkSijYYR BkTyR/875jY5TejQfIN1pX44rtOTntvOKA== X-Google-Smtp-Source: ABdhPJz5KMfMwxiTP0nd56zMIt79/PLZIdhlVKY5VHiAskuOKcrefsBxU9pxksZjAlcw+UKy1pe7JQ== X-Received: by 2002:a05:6830:4111:b0:606:4ed1:c10a with SMTP id w17-20020a056830411100b006064ed1c10amr6610338ott.377.1652726687871; Mon, 16 May 2022 11:44:47 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:cdd6:545a:8832:b9c2:3a47? ([2804:431:c7cb:cdd6:545a:8832:b9c2:3a47]) by smtp.gmail.com with ESMTPSA id v4-20020a056830140400b006061debeed4sm4177476otp.69.2022.05.16.11.44.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 May 2022 11:44:47 -0700 (PDT) Message-ID: Date: Mon, 16 May 2022 15:44:44 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v4 08/13] LoongArch: Linux Syscall Interface Content-Language: en-US To: caiyinyu , Arnd Bergmann Cc: GNU C Library , xuchenghua@loongson.cn, joseph_myers@mentor.com References: <20220509022611.1248063-1-caiyinyu@loongson.cn> <20220509022611.1248063-9-caiyinyu@loongson.cn> <6ef4c33f-c3d8-e360-212f-31d78b60522e@loongson.cn> From: Adhemerval Zanella In-Reply-To: <6ef4c33f-c3d8-e360-212f-31d78b60522e@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, BODY_8BITS, 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, 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 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, 16 May 2022 18:44:50 -0000 On 15/05/2022 04:53, caiyinyu wrote: > > 在 2022/5/11 下午3:02, Arnd Bergmann 写道: >> On Mon, May 9, 2022 at 4:26 AM caiyinyu wrote: >> >>> +#define __NR_clone 220 >>> +#define __NR_clone3 435 >>> +#define __NR_fstat 80 >>> +#define __NR_newfstatat 79 >> stat() and newfstatat() are not in the current ABI for the kernel, this needs >> to be updated, and the libc wrapper updated to call statx() instead. >> >> clone() is still an open question, this may have to be implemented on top >> of clone3() >> >>         Arnd > > > Currently, glibc is not enable FSTATAT_USE_STATX in 64 bits system. In fact I had the wrong assumption that __NR_newfstatat would continue t be used on 64-bit architectures (since it requires slight less memory copy to implement stat/lstat/fstat/fstatat. > Shall we modify sysdeps/unix/sysv/linux/fstatat64.c to support statx like: > > === > diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c > index 2ab914380d..bd3b20644e 100644 > --- a/sysdeps/unix/sysv/linux/fstatat64.c > +++ b/sysdeps/unix/sysv/linux/fstatat64.c > @@ -42,7 +42,7 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t), > >  #if (__WORDSIZE == 32 \ >       && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \ > -     || defined STAT_HAS_TIME32 > +     || defined STAT_HAS_TIME32 || !defined __NR_newfstatat It makes sense. >  # define FSTATAT_USE_STATX 1 > >  static inline int > === > > or add fstatat64.c in loongarch port?? No, if kernel interface for newers 64-bit ports to only provide statx we should adapt the generic code to so. > By now no other architectures have their own fstatat64.c. >