Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1046622imu; Mon, 5 Nov 2018 12:56:55 -0800 (PST) X-Google-Smtp-Source: AJdET5eOuCedLFFnxpbXsYrA5fzjjfLfrxum+UbqtTIONw/yNRXxi4IBV65gu0/ANd5MHHvbqS/7 X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr23541060pla.256.1541451415527; Mon, 05 Nov 2018 12:56:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541451415; cv=none; d=google.com; s=arc-20160816; b=eVm2+ubtJPkVqunAR4FGOtgFTPq/5yBtAwOdE0e7gAxfD0cZPIqUo4K3hSKYMEyssa vMrMGBhZdXJfg2CyPY50TPGpMtRJoj0TAOAK1zuBXhDM/Cernn2340tTRzjhTDmTp9zf SR3o0OxpnQNHSce3xsv47l+XBZKQnyetSMz+IxnYKbLfoShHDwCkcd1nmBSMMSuKWfII D+WeecFEEQLkTh1r25FUbdH4PL1uEJXcNafoLQeC9HnaDG3TdDgi//c3ISDnuFPGuWO6 SP/FupLH7+O8AcfuGBP3YdsyqqI5PeC1zJUKSgh2BiUbBtreEHEUMAGncE77qVPVRVz9 m6ng== 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 :references:in-reply-to:mime-version:dkim-signature; bh=8d4NEiGrNkVi8cUcqMimSdQ7N/AwNLqD624fNDd2IK0=; b=V4hJAoHnWCx/c6sstvESaL2qWUOSACGK2q7W1XY8qXtZfkvz74TA3k3fa74QSCa8qf 1vARabAs6bn/Tj0ghFM4F2hoe4efUb9rf4KkFltJ6oE8b97CNzxnZzj1Wq+XTNi5oFoI uEoKuFHvhtfR30zIkGDZSHasPiEr/gRlrVG89XECmi5Ti8GAsQ0x9OCHisd/1xikSVjc qB7pX7cI34qv0z6rFeri6Uzlv1D/ciKpdCfk3KwsnhuC1/8vVFdBN6cn18Y1P5xkALsI soQoHmG8Ma2APGJzIGqtqJzsVkxUC5aeU9WHEtfsVfOdf7uYE7YuLIpOwvX2AGQ+AHIj 4qmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=YayVZZsL; 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 r4-v6si36103451pfb.43.2018.11.05.12.56.38; Mon, 05 Nov 2018 12:56: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=fail header.i=@gmail.com header.s=20161025 header.b=YayVZZsL; 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 S1730132AbeKFGRt (ORCPT + 99 others); Tue, 6 Nov 2018 01:17:49 -0500 Received: from mail-qt1-f194.google.com ([209.85.160.194]:45361 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbeKFGRt (ORCPT ); Tue, 6 Nov 2018 01:17:49 -0500 Received: by mail-qt1-f194.google.com with SMTP id l9-v6so231878qtj.12 for ; Mon, 05 Nov 2018 12:56:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=8d4NEiGrNkVi8cUcqMimSdQ7N/AwNLqD624fNDd2IK0=; b=YayVZZsLIF4xtmlVvlHtSytY4oOLL5cMFW668Wq0oDBxkcJOrDKGnIctr8zXyX9j8s 009wbHuD2WxfzUHXibkSdOt5abd6Fc0O1kkCgq2bbEH/qtW6VjvL/G0B19/15mhV8Lcu sRQekWv7+avY/Xpz7Q2G2/Pe9ur74hGM83BXhczI+mUroVNltasJDnSwcHL5kX8XOq1/ qWwOcZ3ZagwkaKtc3IDtkUVEvGcuzGkpBNl+EeH71ryD2d1nYNf5ymLiAqEhnIf5KKmz 6c6vAH7G6No21KPowmdE7u7U9nuFzx6Qi2T8T1jy9Phoc/2uXKMxdRyvt28oVf2sXPIb S/1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=8d4NEiGrNkVi8cUcqMimSdQ7N/AwNLqD624fNDd2IK0=; b=JS9IGBKsTL7mKlwAqCYwGFmewvf97KDSll5yHvIvrwR15+1//+mrhuvpwbgJlsxqZb pXaQDCLlCafubTZpRr5/wJiIKEVBANSaAyDZn4JKpdyHB44exmUSJpCnltAgLUimzoa6 gvzlDq3M7bBOYMXq8r7/304zWa3Aj1NkP35bjB44eH2J/m+9v1YR1qicjjMAyzYp9I84 wP/clLZ74lsyoRy1AGZ2aLMcVVMLIbICMQ7/L0jkO94T23uvg29gqjrhndUyS2vJvmNR RipIZZORq4OkMO1PkBH87+hQusAGlM/OMJuxU7Zhuyno8EsU9VoarsRgO5l5XGdi6y0G XfjQ== X-Gm-Message-State: AGRZ1gL3syFa/Hxpls/ZYZSvBCSbnHZzQP7LroIAyNedKrk+O9avHM3g 9dXEPph3/0slP+X3rl2/w0J921vDfjVDSD9MLLJ6Rg== X-Received: by 2002:a0c:d992:: with SMTP id y18mr23780816qvj.161.1541451375901; Mon, 05 Nov 2018 12:56:15 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a0c:9881:0:0:0:0:0 with HTTP; Mon, 5 Nov 2018 12:56:15 -0800 (PST) In-Reply-To: <20181105142602.25750-1-david.abdurachmanov@gmail.com> References: <20181105142602.25750-1-david.abdurachmanov@gmail.com> From: Arnd Bergmann Date: Mon, 5 Nov 2018 21:56:15 +0100 X-Google-Sender-Auth: GswIWNI4QiZGtCzUUGclOt-oTnA Message-ID: Subject: Re: [PATCH] riscv: add asm/unistd.h UAPI header To: David Abdurachmanov Cc: palmer@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Marcin Juszkiewicz , Guenter Roeck 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 11/5/18, David Abdurachmanov wrote: > Marcin Juszkiewicz reported issues while generating syscall table for riscv > using 4.20-rc1. The patch refactors our unistd.h files to match some other > architectures. > > - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT > - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h > - Adjust kernel asm/unistd.h > > So now asm/unistd.h UAPI header should show all syscalls for riscv. > > Before this, Makefile simply put `#include ` into > generated asm/unistd.h UAPI header thus user didn't see: > > - __NR_riscv_flush_icache > - __NR_newfstatat > - __NR_fstat > > which are supported by riscv kernel. > > Signed-off-by: David Abdurachmanov > Cc: Arnd Bergmann > Cc: Marcin Juszkiewicz > Cc: Guenter Roeck Thanks for addressing this, your patch correctly fixes riscv64, and I should have noticed the mistake when I originally merged the broken patch. However, looking closer I found another problem with the original patch that your fix does not address: __ARCH_WANT_NEW_STAT should only be set on 64-bit architectures. For a 32-bit architecture, we only want __ARCH_WANT_STAT64 if any. For 64-bit architectures with compat mode, we still need to set __ARCH_WANT_STAT64 from the non-uapi file so we get the syscall implementation. If we don't care about the riscv32 ABI changing yet, we can decide to leave out __ARCH_WANT_STAT64 here, and require glibc to implement it using statx() like any new architecture. stat64 is not y2038 safe, and statx replaces it because of that. > Fixes: 67314ec7b025 That line should be formatted as Fixes: 67314ec7b025 ("RISC-V: Request newstat syscalls")