Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3720302imu; Sun, 11 Nov 2018 22:19:55 -0800 (PST) X-Google-Smtp-Source: AJdET5eObFRWWryBw7d9pnNV9RZrqOKm0BHu4q4nR2tm14hCkKH7yYp2sRR2yXxf+iOttgPNR0At X-Received: by 2002:a62:4896:: with SMTP id q22-v6mr19035395pfi.248.1542003595656; Sun, 11 Nov 2018 22:19:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542003595; cv=none; d=google.com; s=arc-20160816; b=xhr/f9fFmkUhCcKjtnzx4AYvN4ieCznpiGmzRjSjlb8nqwN0M2d0RIE9+gHD3t5d0G hgq8Xgav1SGWNmGiyh5p12KqcxlivvpAzqLlBcwc7SJTvWCr6HzWLztdZNeiXAPBK+1H WWWchfwQTuLfxf8Yc/+uA7aT54Z1UjKgagjB1NsQX/6haGXI2HNlg3X0//4JCWrZzCBd nBPArOT26uyOjak8jo1SGmRn35Hr6Jf3WkUmJOTT4uOs4oQjLks1GpXyp/Qk/KbTPnnE +745q4qwc9LU8y1stexpWRJZa9gDiJT/rCKZ9yfrVdsyvOrT8ajmKGvCOVAudzaOurhL UZzg== 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:dkim-signature; bh=H6U+tqLICzGYJyvAoJyRXt8ctDXLaB3KKit/SZjRgoE=; b=bpQXAo+1kcP8EfmxQtzxExlZ1O4nsG73AQbxXzgGcTpWk2gCvWujE4UOQkfYXKdewK jQE70NjV3jEbRqw/c3voFxhaH98lZXqF6qFcg2Pd8G+4cmVyfgpvwSi4kYSrWopyiaoT 9OAiuLBFj/G/dh/I5PODAs4ZQIeLTmLByPzIrz5AwcWWcOtiOde1L+UrRLsJ56/CU+2m MVZjXdIF2hjAf/3qjyoe6zFg8AnulgfnukNf1RpzDkCwFzrflkUlzHTOmoydmlN/3p/X GF7GtxZ8YNORkQB9+kWesHTp2HAFwSwpjqKMpoFXOXOzVrUfDi+I5bxe4f/aRULZFiFH +jVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JOBXVVn7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si5399011pgh.299.2018.11.11.22.19.39; Sun, 11 Nov 2018 22:19:55 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JOBXVVn7; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729816AbeKLQLC (ORCPT + 99 others); Mon, 12 Nov 2018 11:11:02 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:45767 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbeKLQLB (ORCPT ); Mon, 12 Nov 2018 11:11:01 -0500 Received: by mail-ot1-f67.google.com with SMTP id 32so6423618ota.12 for ; Sun, 11 Nov 2018 22:19:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=H6U+tqLICzGYJyvAoJyRXt8ctDXLaB3KKit/SZjRgoE=; b=JOBXVVn7TVzzX5VjiPakncIqGx0mH91BCywaJ5InsQ3tDor4qK63UaYZqG2myz1W6m 4KA5BJBwZOcJuHEuHOSeR3hzVRIpd30kJr509GtTLieq40ZaGqcGJbwE7+hrO+OYJbSp vFKQzSSvDeXmHkVHYnmGAgQwj+txtcJe6o5KMBUZkf826GBLO8ENSxmMMf8HO4M6K8Bx FdxRujGFnkJ2VMYTb/83XCmNr9rQq9xXSJVcLYdfc09SMxSh49jYvbwUDnt6JczUut+6 aVvu6dWbS6fvgCJEfKu8YjEyQbgfxeRyKCLMIZmKfdDh7PV75JBmHr+6jvItDMNP9u50 /ong== 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=H6U+tqLICzGYJyvAoJyRXt8ctDXLaB3KKit/SZjRgoE=; b=euYncdpGWURfACCfCCqIX3JUIFLjU9rFMaAHOv+Jp7n7JJsDlB1DzUupY+ZhaIWmGH 6qZ+UbPmPdoJ62PTS9MTstJS7Szl+U0DksFdtYKwjaAowC5flTvcMOYJO/DaY/3Z04Zx WsCtHsLf1STdlbPbTUfcnR6kMUdeGv/9FA+uztuiXsNzO3aa13tOEGbCoYv+JzzvDooC 2OhJLH8itEujQKJe6Qo5cS+Jy+aS5eYVG6d8RUmK8hGb4E7Ijrzl/C4xPn8q8fembere eIeBdKtAEHOIcmLd7qDI/ERm5v4KbLOj76nrn+/XWqlXUK2ncQU7MM7M21kTwtXcuSv/ MnnQ== X-Gm-Message-State: AGRZ1gI2qu1sLB/c7L5Tgx3Hi4gm0VfQrF8bWc1OesS0qT4vO5ToLA0c lq3L/lIVwLsRpXi22DL3buzxum9x/RQCJg8R1sM= X-Received: by 2002:a9d:3fb0:: with SMTP id r45mr10728204otc.110.1542003553581; Sun, 11 Nov 2018 22:19:13 -0800 (PST) MIME-Version: 1.0 References: <41e8cb18d321244ab7000f7dc0467b6ebc5cab8f.1541995312.git.zongbox@gmail.com> In-Reply-To: <41e8cb18d321244ab7000f7dc0467b6ebc5cab8f.1541995312.git.zongbox@gmail.com> From: David Abdurachmanov Date: Mon, 12 Nov 2018 07:19:02 +0100 Message-ID: Subject: Re: [PATCH 1/2] RISC-V: Request stat64 on RV32 To: zongbox@gmail.com Cc: Palmer Dabbelt , aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, zong@andestech.com, Marcin Juszkiewicz , Arnd Bergmann 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 Mon, Nov 12, 2018 at 5:10 AM Zong Li wrote: > > The stat64 family that is used on 32-bit architectures to replace > newstat. > > Since commit 67314ec7b0250290cc85eaa7a2f88a8ddb9e8547 ("RISC-V: Request > newstat syscalls"), the RV32 build fail with undeclared 'sys_fstatat64' > > Signed-off-by: Zong Li > --- > arch/riscv/include/asm/unistd.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/riscv/include/asm/unistd.h b/arch/riscv/include/asm/unistd.h > index eff7aa9..a4aade9 100644 > --- a/arch/riscv/include/asm/unistd.h > +++ b/arch/riscv/include/asm/unistd.h > @@ -18,5 +18,6 @@ > > #define __ARCH_WANT_NEW_STAT > #define __ARCH_WANT_SYS_CLONE > +#define __ARCH_WANT_STAT64 > #include > #include > -- See: http://lists.infradead.org/pipermail/linux-riscv/2018-November/002087.html The plan is not to have old stat syscalls and support statx on riscv32, which is y2038 safe. The issue you see is a bug in include/uapi/asm-generic/unistd.h. Marcin (CC) already sent a patch to Arnd (CC) IIRC. Basically without __ARCH_WANT_NEW_STAT or __ARCH_WANT_STAT64 two macros are not defined: __NR3264_fstatat and __NR3264_fstat. Which is later used (without any guards): 763 #define __NR_newfstatat __NR3264_fstatat 764 #define __NR_fstat __NR3264_fstat