Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2106879rdb; Tue, 3 Oct 2023 10:19:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLjV2BSdLfIbEhc9QsIDDBDZHKRzyB0OhgazcqAQWvNbP0fYOBpu6YTqo31Q1rRkp9SURS X-Received: by 2002:a05:6871:5cc:b0:1c8:bbd0:2fd1 with SMTP id v12-20020a05687105cc00b001c8bbd02fd1mr253354oan.41.1696353597719; Tue, 03 Oct 2023 10:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696353597; cv=none; d=google.com; s=arc-20160816; b=Nb3KzISJyROgAD7i7crQvoqtfQqKECExdDYGfzH8nAkBy4dmw9gdSfHJik7hlrfV5C wpjUqELP3hP6dSTBWzKbGa65aJ5K2HYbmDH1I8FFy89/uV+L+3siwWVZpZ+lKeMupzy5 wgMP/O4e/PQAopikss65Ss7BU2GrTi8wapnRcDxfH84mN5qGZ9HuSgi7XIyobS0U9K9u oqu9xbSwKh1kQ4qeb6duae1W4vqBuxh6jMdV+3b3tvTTCjJGYg/XPnFrrm7byk3qHYuZ NjxUd/nwZHVV2TdUQfg1ycWqddQJDvQUi0tGZAG5+laHg9d2i//ES2eAfJoBELs1JuL0 DdVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=9kJRRG6MbQ+VO3F7wFYXcnmY1pZ8pivM5iwAtfQXIQg=; fh=cgXHRaXE2abp86WIXZrprKihsKc4LTmNwZmaMKhhW8c=; b=Wed8GMn5e6/WZi25fabffHEbfnNNleg1EF6O2iPt5hxSauU33rBa5Hy8Tt8uGlGYko ZQd4ghqqHQlfafzRxSPYmdc4xhC40OtJ2QXt1Slw5Ai2/xl7nrCkt6fGYIZWUpjd+kyD whOv/skfUGkrBgVe9+FQzyXxqnCaUaNr/Hz7DdtdCv1nuYXD53bg/jwzRXl1WFyDx9g4 OVwSkeDsoE/RR1Y1PlAPro1UBoXBwd58TsSAcy3sM9adzKe1cR1ysJNz3V30wn5ndOGF 079G42E7wMX18OY3egxNV4nH+bvCYxDUjPuga16ygsCJtcmHP9fC0TPIqiQVSjZW2tIr RGqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id k185-20020a6384c2000000b005774aba519dsi1828061pgd.298.2023.10.03.10.19.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 10:19:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9E72C81A7AE7; Tue, 3 Oct 2023 10:19:56 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240651AbjJCRTz convert rfc822-to-8bit (ORCPT + 99 others); Tue, 3 Oct 2023 13:19:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231368AbjJCRTy (ORCPT ); Tue, 3 Oct 2023 13:19:54 -0400 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7B51A3; Tue, 3 Oct 2023 10:19:50 -0700 (PDT) Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-d84f18e908aso1245292276.1; Tue, 03 Oct 2023 10:19:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696353590; x=1696958390; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gDlx4Wu9l39McbXAmxr/aQafR9CqgRAFRsdqHoaziys=; b=u3TzJQVHs2TyvUbttO8WzzrdBlie/xcE1zaSK5/+w7CWrluwn4sTXLpeNJ2uaxsPV2 s4F8CxAC4LvhidYIZwOmZHgyFbVFi1PY+UMa28XdQbQEmrLLdU4ymN0raz72rKgMxCoS AyDMWlEqrZ2pDUhObtqykTQND70Npumrx/vw0P0NRZ6uHCL3dukLOM0PQQeZIAgaBJ3X sMU0dBY6WaOXetVWq6lUuFECgKsQeqxOxnwS75upyCUDRMK6VOJa+qzQWhY38DiVZwL2 aVp01VzxydtYck3vrjIqOi0kqjbqy8T5kchgGgAG7QE5K5Mt/+1S6V/0GNjcuGll5XD3 PEYw== X-Gm-Message-State: AOJu0Yws6aDGR6Q6DJkGzmuDu0kV3ujCyFxEiM3yug5UNKZWbhplMu3V 7njiSLUhvbcMaBDGpjJByBn3rqEndnBqwA== X-Received: by 2002:a25:3042:0:b0:d81:7041:9520 with SMTP id w63-20020a253042000000b00d8170419520mr12551329ybw.56.1696353589811; Tue, 03 Oct 2023 10:19:49 -0700 (PDT) Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com. [209.85.128.173]) by smtp.gmail.com with ESMTPSA id x62-20020a254a41000000b00bcd91bb300esm520301yba.54.2023.10.03.10.19.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Oct 2023 10:19:49 -0700 (PDT) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-5a24b03e22eso14897427b3.0; Tue, 03 Oct 2023 10:19:49 -0700 (PDT) X-Received: by 2002:a81:a14b:0:b0:583:6db3:a007 with SMTP id y72-20020a81a14b000000b005836db3a007mr272837ywg.17.1696353588829; Tue, 03 Oct 2023 10:19:48 -0700 (PDT) MIME-Version: 1.0 References: <20230914185804.2000497-1-sohil.mehta@intel.com> In-Reply-To: <20230914185804.2000497-1-sohil.mehta@intel.com> From: Geert Uytterhoeven Date: Tue, 3 Oct 2023 19:19:36 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] arch: Reserve map_shadow_stack() syscall number for all architectures To: Sohil Mehta Cc: linux-api@vger.kernel.org, linux-arch@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Russell King , Catalin Marinas , Will Deacon , Michal Simek , Thomas Bogendoerfer , "James E . J . Bottomley" , Helge Deller , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , "David S . Miller" , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Chris Zankel , Max Filippov , Arnd Bergmann , Peter Zijlstra , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Lukas Bulwahn , Sergei Trofimovich , Andrew Morton , Rohan McLure , Andreas Schwab , "Eric W . Biederman" , Brian Gerst , Randy Dunlap , Rick Edgecombe , Mark Brown , Deepak Gupta , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 03 Oct 2023 10:19:56 -0700 (PDT) On Thu, Sep 14, 2023 at 8:59 PM Sohil Mehta wrote: > commit c35559f94ebc ("x86/shstk: Introduce map_shadow_stack syscall") > recently added support for map_shadow_stack() but it is limited to x86 > only for now. There is a possibility that other architectures (namely, > arm64 and RISC-V), that are implementing equivalent support for shadow > stacks, might need to add support for it. > > Independent of that, reserving arch-specific syscall numbers in the > syscall tables of all architectures is good practice and would help > avoid future conflicts. map_shadow_stack() is marked as a conditional > syscall in sys_ni.c. Adding it to the syscall tables of other > architectures is harmless and would return ENOSYS when exercised. > > Note, map_shadow_stack() was assigned #453 during the merge process > since #452 was taken by fchmodat2(). > > For Powerpc, map it to sys_ni_syscall() as is the norm for Powerpc > syscall tables. > > For Alpha, map_shadow_stack() takes up #563 as Alpha still diverges from > the common syscall numbering system in the other architectures. > > Link: https://lore.kernel.org/lkml/20230515212255.GA562920@debug.ba.rivosinc.com/ > Link: https://lore.kernel.org/lkml/b402b80b-a7c6-4ef0-b977-c0f5f582b78a@sirena.org.uk/ > > Signed-off-by: Sohil Mehta > arch/m68k/kernel/syscalls/syscall.tbl | 1 + Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds