From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54F4BC37120 for ; Mon, 21 Jan 2019 20:42:04 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CE1B82089F for ; Mon, 21 Jan 2019 20:42:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE1B82089F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43k3Pj6MJXzDqT5 for ; Tue, 22 Jan 2019 07:42:01 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gmail.com (client-ip=209.85.160.195; helo=mail-qt1-f195.google.com; envelope-from=arndbergmann@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=arndb.de Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43k3Mm3qc1zDqRd for ; Tue, 22 Jan 2019 07:40:20 +1100 (AEDT) Received: by mail-qt1-f195.google.com with SMTP id k12so25000229qtf.7 for ; Mon, 21 Jan 2019 12:40:20 -0800 (PST) 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=dkvN5kxF5ScgcD3pJdfvtsR7PQS22YCBaQenUgPUi4M=; b=e0Pa/SDwAuBgDY3pJ+XFDYiuZaCvYduu1VwmZGyR4IQ4cbLcQtLyie6iEz3vxlcWFn aIQNTaKqtamETfpiCyLi5nvxKIwvhp7OMIN1tAe0q4DD9NeOFSZOv//aG5ayFrAP5ElS c32BayyJMLPZ8iwE3KJ5DBg6vrjaoXe8L/88fI/SJpfltr5dAY2G64oJbi23K1vrqZo8 S+1Xy9EAVvREWOHCKSZhm10iFIbQ5H3VRqc3I4DaDO/Jz4wahE3LxGlOM3YlZTv69Di0 49Q4jF5SnySzjWY+7rIql/gx63qmHYPrG3MNJ9a2dVyDh9m/xphSldwlNn5zuBI2Vbvr MaeA== X-Gm-Message-State: AJcUukf0E3nUOnXZIxO8T2L0tlpLSocx+TL377H4lyJNZ0GQIvcbacb+ ni7Fexufv5a4HpcUIpOaZRXJRYBY8hIvvhV1yNc= X-Google-Smtp-Source: ALg8bN6NJA3JpmMy0Rnw4UHCeBwdUwtaoF1faqE/rX9S/LB1A3Pp1thWOe1j9+1qk4H6TfQ6cwy2yDs31Lm4Qgs2hsM= X-Received: by 2002:a05:6214:1087:: with SMTP id o7mr27413754qvr.115.1548103218172; Mon, 21 Jan 2019 12:40:18 -0800 (PST) MIME-Version: 1.0 References: <20190118161835.2259170-1-arnd@arndb.de> <20190118161835.2259170-30-arnd@arndb.de> <20190119142852.cntdihah4mpa3lgx@e5254000004ec.dyn.armlinux.org.uk> In-Reply-To: From: Arnd Bergmann Date: Mon, 21 Jan 2019 21:40:01 +0100 Message-ID: Subject: Re: [PATCH v2 29/29] y2038: add 64-bit time_t syscalls to all 32-bit architectures To: Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rich Felker , "linux-ia64@vger.kernel.org" , Linux-sh list , Heiko Carstens , linux-mips@vger.kernel.org, Max Filippov , Network Development , Deepa Dinamani , "H. Peter Anvin" , sparclinux , linux-arch , linux-s390 , y2038 Mailman List , Helge Deller , X86 ML , Russell King - ARM Linux admin , Ingo Molnar , Firoz Khan , Catalin Marinas , Matt Turner , Fenghua Yu , Will Deacon , Linux FS Devel , linux-m68k , Andy Lutomirski , Thomas Gleixner , linux-arm-kernel , Michal Simek , Tony Luck , Parisc List , Linux API , LKML , Paul Burton , "Eric W. Biederman" , alpha , Martin Schwidefsky , Andrew Morton , linuxppc-dev , "David S. Miller" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Mon, Jan 21, 2019 at 6:08 PM Arnd Bergmann wrote: > On Mon, Jan 21, 2019 at 9:19 AM Geert Uytterhoeven wrote: > > Regardless, I'm wondering what to do with the holes marked "room for > > arch specific calls". > > When is a syscall really arch-specific, and can it be added there, and > > when does it turn out (later) that it isn't, breaking the > > synchronization again? > > We've had a bit of that already, with cacheflush(), which exists on > a couple of architectures, including some that use the first > 'arch specific' slot (244) of the asm-generic table. I think this > will be rare enough that we can figure out a solution when we > get there. > > > The pkey syscalls may be a bad example, as AFAIU they can be implemented > > on some architectures, but not on some others. Still, I had skipped them > > when adding new syscalls to m68k. > > > > Perhaps we should get rid of the notion of "arch-specific syscalls", and > > reserve a slot everywhere anyway? > > I don't mind calling the hole something else if that helps. Out of > principle I would already assume that anything we add for x86 > or the generic table should be added everywhere, but we can > make it broader than that. Applying this fixup below, ARnd diff --git a/arch/x86/entry/syscalls/syscall_32.tbl b/arch/x86/entry/syscalls/syscall_32.tbl index d9c2d2eea044..955ab6a3b61f 100644 --- a/arch/x86/entry/syscalls/syscall_32.tbl +++ b/arch/x86/entry/syscalls/syscall_32.tbl @@ -398,7 +398,7 @@ 384 i386 arch_prctl sys_arch_prctl __ia32_compat_sys_arch_prctl 385 i386 io_pgetevents sys_io_pgetevents_time32 __ia32_compat_sys_io_pgetevents 386 i386 rseq sys_rseq __ia32_sys_rseq -# room for arch specific syscalls +# don't use numbers 387 through 392, add new calls at the end 393 i386 semget sys_semget __ia32_sys_semget 394 i386 semctl sys_semctl __ia32_compat_sys_semctl 395 i386 shmget sys_shmget __ia32_sys_shmget diff --git a/arch/x86/entry/syscalls/syscall_64.tbl b/arch/x86/entry/syscalls/syscall_64.tbl index 43a622aec07e..2ae92fddb6d5 100644 --- a/arch/x86/entry/syscalls/syscall_64.tbl +++ b/arch/x86/entry/syscalls/syscall_64.tbl @@ -343,6 +343,8 @@ 332 common statx __x64_sys_statx 333 common io_pgetevents __x64_sys_io_pgetevents 334 common rseq __x64_sys_rseq +# don't use numbers 387 through 423, add new calls after the last +# 'common' entry # # x32-specific system call numbers start at 512 to avoid cache impact diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h index 53831e4a4c86..acf9a07ab2ff 100644 --- a/include/uapi/asm-generic/unistd.h +++ b/include/uapi/asm-generic/unistd.h @@ -740,7 +740,7 @@ __SC_COMP_3264(__NR_io_pgetevents, sys_io_pgetevents_time32, sys_io_pgetevents, __SYSCALL(__NR_rseq, sys_rseq) #define __NR_kexec_file_load 294 __SYSCALL(__NR_kexec_file_load, sys_kexec_file_load) -/* 295 through 402 are unassigned to sync up with generic numbers */ +/* 295 through 402 are unassigned to sync up with generic numbers, don't use */ #if __BITS_PER_LONG == 32 #define __NR_clock_gettime64 403 __SYSCALL(__NR_clock_gettime64, sys_clock_gettime)