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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EC3DC54E58 for ; Tue, 12 Mar 2024 09:06:19 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Tv76d6BGlz3dTG for ; Tue, 12 Mar 2024 20:06:17 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.218.51; helo=mail-ej1-f51.google.com; envelope-from=breno.debian@gmail.com; receiver=lists.ozlabs.org) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Tv7680VcFz3cGK for ; Tue, 12 Mar 2024 20:05:50 +1100 (AEDT) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a44f2d894b7so654735866b.1 for ; Tue, 12 Mar 2024 02:05:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710234346; x=1710839146; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PxCptN//ptR8Sr1UztZAVh/vRO6djkIgHSLUVEakk/k=; b=itsntHBL33Tcw3B1W1eT61T5nZhx3M3aMwITmgZrhoYHfJYZ2/c4yv6vLUseNf4vlp NuSOIY+BNtE+nVYZcfeq+BOEgPnQDF7/SwdffO8gmve6+H7hLRXem3PINXc5aIQWzyt2 4JrtqMIgaVpkeXdLcvglZ7CZU3zbi+inVtCZR5sn4G6hxl0twRRDVYZsIBqJvU7DZk9T jnatqbQpGTzT3005rRb6vQ8ox1RTP+FXr8RQnCOFx+l2itmwUdUFcL+b4/TCB4rA2+6B aadAauVvxI25PUtOXdHOjEDX+naMwXniTGkSb2R31qlKfx5rFoZqTeX3ue+xlN4aX+Nw XHYg== X-Gm-Message-State: AOJu0YybwzGTNzonG6eSg5cC+925Uhy8+kDeZc41pgirpwIgPL7A5Xsr HUVriZCPgNnWJfUpTHb/TyXuXptSrREYRt6TJllZ7lMZDwR+H3GV X-Google-Smtp-Source: AGHT+IEUwU7t75IJNLY3HEhm/B6dGWDT+c5HRRrbusUiLgdhzbItyC5TOjncjKw03gGl01+saeugDA== X-Received: by 2002:a17:906:3591:b0:a44:5927:3e67 with SMTP id o17-20020a170906359100b00a4459273e67mr2022454ejb.23.1710234346315; Tue, 12 Mar 2024 02:05:46 -0700 (PDT) Received: from gmail.com (fwdproxy-lla-001.fbsv.net. [2a03:2880:30ff:1::face:b00c]) by smtp.gmail.com with ESMTPSA id x10-20020a1709064a8a00b00a45c9ea48e3sm3633728eju.193.2024.03.12.02.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 02:05:45 -0700 (PDT) Date: Tue, 12 Mar 2024 02:05:43 -0700 From: Breno Leitao To: Christophe Leroy Subject: Re: [PATCH] powerpc/kernel: Fix potential spectre v1 in syscall Message-ID: References: <1534876926-21849-1-git-send-email-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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: Nathan Lynch , "linuxppc-dev@lists.ozlabs.org" Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, Mar 12, 2024 at 08:17:42AM +0000, Christophe Leroy wrote: > +Nathan as this is RTAS related. > > Le 21/08/2018 à 20:42, Breno Leitao a écrit : > > The rtas syscall reads a value from a user-provided structure and uses it > > to index an array, being a possible area for a potential spectre v1 attack. > > This is the code that exposes this problem. > > > > args.rets = &args.args[nargs]; > > > > The nargs is an user provided value, and the below code is an example where > > the 'nargs' value would be set to XX. > > > > struct rtas_args ra; > > ra.nargs = htobe32(XX); > > syscall(__NR_rtas, &ra); > > > This patch has been hanging around in patchwork since 2018 and doesn't > apply anymore. Is it still relevant ? If so, can you rebase et resubmit ? This seems to be important, since nargs is a user-provided value. I can submit it if the maintainers are willing to accept. I do not want to spend my time if no one is willing to review it. Thanks for revamping this one.