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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5C86E7AD7A for ; Tue, 3 Oct 2023 17:19:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240580AbjJCRTy convert rfc822-to-8bit (ORCPT ); Tue, 3 Oct 2023 13:19:54 -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-Google-Smtp-Source: AGHT+IGqmgXkbkTaf+6EtgFJ/h0X0E+OPsMzs3fneex+WjZKmz+aewZPW0qOLo2vl5CreZHC7XbNxQ== 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 Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org 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