Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1444051ybl; Tue, 13 Aug 2019 12:42:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxq6G8awBxdU9tTNts551QCQ1iLtp1uGIwOzEaKMnk59kt291bkWjVnfzXKbdqnS2+Ge4W5 X-Received: by 2002:a63:c055:: with SMTP id z21mr35160027pgi.380.1565725373200; Tue, 13 Aug 2019 12:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565725373; cv=none; d=google.com; s=arc-20160816; b=YBjgY/M3MsRYudQmU3QA8QZTPcQb++Y8NaiDZOwQw0+odrrHPySMjuQcFuHkzChNIs J/Jd/c+0p2Llh74gfmZ4PqsYDuL4wSERMjf+Xd2ef5w+APS4fpXbDHUePkVTzN+8tqtB /CEPi9eHoz2wBRaXamH8NPVm9u/i0EBcyMgyR79qiWo68an02nHNkx87gsHOBmRXSSK6 RPLZDRP8bfQepDL+JlFIzM7Qz/GgLFU7ahnFGaflsVJWuUBfFlpq+9T2G6rlEy1sxGNl /Sm/GSFW26gyFPTGK3XPepMgtqD5FAQvoSrJVf+B8qDQZvbSDI1dS72r8YvDIBrR+VRp Z06g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=MCvgFN5GXnda2r43SDXMWKSjfSyNoGtkYFt/JRtKgrU=; b=HZQvOlpoZYgtRD6Tboh2STDiOU3yFnkncU3Lm3FKsHL121C/7k2vXEixgrfBATA+Fe 9OmiQ3Vd4ghVUp/6SRrr9Rc25XPNhyrGiljGHcP3zW7rC/UbP0etFG6qPtcBxcLE6mEw q8wevbs6XbV3lXMBgNp8Qp+KuHiEoodObNZiCX9uMMvWfzieqzgmKvlEBV1bYZRSuFIC RwcfGai81JMjEvRgyJPmXW+dI78ymIO7rDZg0pytzvDpD5WILwRertGhYQpLsRTesVaQ FMviPGwFgL9EXke88sHYwzcWGaGOmGMuyr+4QVAoacmYYoAMuxQE63Jd71LXCu0nauT3 esMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si1524082pjv.5.2019.08.13.12.42.37; Tue, 13 Aug 2019 12:42:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726188AbfHMTle (ORCPT + 99 others); Tue, 13 Aug 2019 15:41:34 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:38944 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725923AbfHMTle (ORCPT ); Tue, 13 Aug 2019 15:41:34 -0400 Received: by mail-qk1-f196.google.com with SMTP id 125so7613244qkl.6; Tue, 13 Aug 2019 12:41:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MCvgFN5GXnda2r43SDXMWKSjfSyNoGtkYFt/JRtKgrU=; b=i4HT8YeOngNKCfhfVwlHiFADe+2dFSI1RzR2HBqrv86R/8YCik9iIDdCbzf2uJ1ZWI fg2KMOUUO0KZ4f4yTFGFQ3xMmYUkvdSO4ou9Psc9UZu22Lys3tNWvv4EVIFX73Sj2dG7 rPszXlbhXu11+Xw7OnWu/tvupVT9ow5yan4Furx1idZqcNNnXWY4rIDdQ4IL8O0dhDR8 HHzA0W/79UQW+hBu1bUUPVkHET1/U5MjEn2rHcaEL+Th5419hDF2l6ApUl9r3yOz3WU2 8obrev341QVJ80cSbcni7e0WisAXSS6TAjdfLDvMAXRMTLzZf9Hn6gwJWxsy+ytIBXkO 7e9Q== X-Gm-Message-State: APjAAAVE1EVL2kxQa60Iy4gGuLsiyde78I3F7VM691qP+qhUvFjBLreS ilwLsqRn8IP0N4AhJ/e+VhlpJPHyzfLBYDNb7O2soZmb X-Received: by 2002:a05:620a:b:: with SMTP id j11mr35177645qki.352.1565725293275; Tue, 13 Aug 2019 12:41:33 -0700 (PDT) MIME-Version: 1.0 References: <20190810010758.16407-1-alistair.francis@wdc.com> In-Reply-To: From: Arnd Bergmann Date: Tue, 13 Aug 2019 21:41:17 +0200 Message-ID: Subject: Re: [PATCH] syscalls: Update the syscall #defines to match uapi To: Alistair Francis Cc: Alistair Francis , Linux Kernel Mailing List , Linux API , Deepa Dinamani Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 13, 2019 at 9:01 PM Alistair Francis wrote: > On Mon, Aug 12, 2019 at 2:49 AM Arnd Bergmann wrote: > > > diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h > > > index 2bcef4c70183..e4bf5e480d60 100644 > > > --- a/include/linux/syscalls.h > > > +++ b/include/linux/syscalls.h > > > @@ -512,7 +512,7 @@ asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *bu > > > asmlinkage long sys_newfstatat(int dfd, const char __user *filename, > > > struct stat __user *statbuf, int flag); > > > asmlinkage long sys_newfstat(unsigned int fd, struct stat __user *statbuf); > > > -#if defined(__ARCH_WANT_STAT64) || defined(__ARCH_WANT_COMPAT_STAT64) > > > +#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) > > > asmlinkage long sys_fstat64(unsigned long fd, struct stat64 __user *statbuf); > > > asmlinkage long sys_fstatat64(int dfd, const char __user *filename, > > > struct stat64 __user *statbuf, int flag); > > > > I think this is wrong: when __ARCH_WANT_NEW_STAT is set, we are > > on a 64-bit architecture and only want the sys_newfstat{,at} system > > calls, not sys_fstat{,at}64 that gets used on 32-bit machines. > > Ah, that would make sense then. I don't think you will see the error then. So we don't need this patch to build riscv32 kernels, right? It's possible that it was the result of an incorrect forward port of some other patch, as older riscv32 kernels did provide stat64(), but newer ones only have statx(). Arnd