Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3214445lqo; Tue, 21 May 2024 09:54:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUE7PDa8LdBzlMorSzwM5fRcRugzoGfk3NDejZlbWdblwSEXMdjoCj9Uh1mz/1mZnetmh7j4Uxh1A/dkZFwUnU7OlxQdPLr0czHidh43g== X-Google-Smtp-Source: AGHT+IFtTUPwxcxPbniBj+0xrGATGPtaM6bdUfFo3PyUU6kxJpN6VCTibcKyvtNupTfehK0K2Oi9 X-Received: by 2002:a05:6512:2808:b0:524:4b11:cab4 with SMTP id 2adb3069b0e04-5244b11d3c2mr5056316e87.49.1716310471817; Tue, 21 May 2024 09:54:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716310471; cv=pass; d=google.com; s=arc-20160816; b=OFnVxDxrsK1aOJe9rAM4LebCxKxEz/6Z+G/KGovN62B7cQpIzBK9SQ8HI2+V1LqPwk uzWhRWY8BDTaF5oYl7WlR9QQ5JRSUrPjxzg7PF0Kl3Zqju3md6eDd7MZlKwH6Bk4mCdd XUdRAAoXnlHL3O6XtBgnt91qSag6KYkutGdaJ1zRGePByPzUiMnXgkvPzXTLru5Arafm q7C+XkEvd59nL1Dm/Yb4Zsj9y/MHVXujt3NniqTTU4hfdAMY1kyyVN9Ka2bLsReUORQS 2EMngRTZ9Mryy9CIOabjpGqb+4czXOTvpk16g93M9zp99n0q6vXRU9xjHcpO6hZ5vNGP QAbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from:dkim-signature; bh=iog+LV8+cUjTXWrVLrD8l3qRhz72G5h5/sZmX6riTd4=; fh=nksY2MCdFPQ2CjdSdRBoHqFHWZduU4DZhGcb99EIUYo=; b=NJpAjBkyl+i0nDxxRJaepyPNJhIR5LrpFSnjQL6KZASiMCQNfkoq5P1Hit88Jj0hwm eZzDIi1e7f8NYxON0Z+noYTBQ6DYgPuvQFxuz/uGu/aVjq1hYCxjNiBHaTuRISbJ/UaZ 1bSAEJ2O5jRhwY/WC/lhkAqjvX/y9O3224gSI1Ts3ybZCEMFRetMb5nohhy8s4ZUN4XF PPoO1hSjCgbEnRM3e6CzyhY84cL/MYrGKE2e5b2mEFZKlrQlsaYmKfWQODQr1dMUQKA6 TWNNIy3obxUA2e8KO3xPrfmTozZ/W5msm3JjaxZj1zvm0rdXks0OW/YMhGBoRH17r31Q rDJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lSKrLQqr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-185238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5735a4ad977si12365510a12.104.2024.05.21.09.54.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 09:54:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lSKrLQqr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-185238-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185238-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 574351F2195A for ; Tue, 21 May 2024 16:54:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00E9E147C73; Tue, 21 May 2024 16:54:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lSKrLQqr" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FE911799D; Tue, 21 May 2024 16:54:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716310460; cv=none; b=H/e0WhxmlEiMDi/hFTgeFxRDQzYp6vcgYwivCBVMsQaUuQzUtyoFUbjGnL47g8Qq0WjaChjF2IL9FSczqvJDu7rGY5AnGRKQen1HZYTlnCt00h+f1Hu/lhR1WdOMzdz42Iul7BS3H3/oo7m8X+JS8uarzWJ+8xG3PJp0pDOa6aE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716310460; c=relaxed/simple; bh=+vtfrcRqf77D03066rTOmGDjG3OT3H/KHdFfQBL6VIM=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kbiWBmWjcSQmW8Wi3vMkgQz8k59IoEavuILAyiPxd4tIoMqmBr3HmxViclwabe90ij+a7aqGH1VyEOewiJxsFefhoy9dtfXe0TooLR5/wTjV6qn0fQbw9xZMZPBZEYcfNEYX2vp/6iW79jeRGXWtby0Nvk8/0uNLOciWTzmB2f4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lSKrLQqr; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a621cb07d8fso19116266b.2; Tue, 21 May 2024 09:54:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716310457; x=1716915257; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=iog+LV8+cUjTXWrVLrD8l3qRhz72G5h5/sZmX6riTd4=; b=lSKrLQqrCrO0Aur6CBDOaFBxwcZIsz/2FgYWfsiqLPvnEXnX+cDkRpUhyJbvKN7C7m 37qmaqcIMF3aIsfQx7A1s5VGJMHjeqbS7eKVrsgxOhf9wJt3OhfOrGHXVzAMCSRBzwpi ZPHbl99qju08vyExwz0Fh1Vb/eawPrlKMizNZGznppmZPW6i3zBQs/kaB71EZ1jXjU+t gLE/4h0szmLaH+7xI56cgfJhgxDlogZzimVJw1Unzy9gU7p3/YCc0YMHyLoZt7OeW6jp rb6a7X1Sxn3a4fr/nXK1VCYffvsBPVoHdx9URNlimTDtcG6GImNEpRw0mGaEFHgNRGTt AZTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716310457; x=1716915257; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iog+LV8+cUjTXWrVLrD8l3qRhz72G5h5/sZmX6riTd4=; b=BVgp97lOOTJWq/Nvn6fUVqCVaEWymHmMSJnkZOkcfMi4cDSNXbXXMRXpSOU68j6pJD pMXONZkkMTdol6ynXpBGqLcOoWlmttb9oPvM4Ed8yLhcJ1r4doq97+qKuy0RHYOllZZ2 hU0NwG4DBXmECoxH0iK3dqYPYNx8S2PHGeW1qz2dhtRH2Zgr5306gMdmcElzZLkX3aSH qL1VEx0bla9nAVQZIKrYIp4/ESUIKzhtLjd5LNgbbj6RmBQxR6jvmC/+HlmdX6/lr0g5 9DdLxBLdJdnDRMtyRt1p7zu7VW0D+Ocz3uBENBeDQHJYJ45nEPzO++AnxmNiGUccnBqP cqmw== X-Forwarded-Encrypted: i=1; AJvYcCWpB/N72P5GElmuTSsCTMSkzz2WfCl/KKlEczh5faZbZ2C6n0/+rMIwJTuTorVUqCRfCtkPLSsfgsnB22v+cOuWNcM057Mkb6L0mw9So7FqaC9g/dvTX1CU9CknWjk+H+T4TJ5oQZskPjvZijPyawA6hJwRCfhwAXyzhnFcbBNxOKOj8ECEAUlmFe1wGuGiPu9xsoLs1jaItPqfo0mJKZDmjwYQQOFqsdSedutELQWMfW+HZsQUPrMU2fkT X-Gm-Message-State: AOJu0Yw+5Og7oyeQqzSAI070x8Yne8pIoLRCk7RQc0V4OYqIkylSQIVI zQ5N+tljMkc9hXhvIzCSggBDim+0y3S2OKAAn8WBH0EQMXMg1e4X X-Received: by 2002:a17:907:77cd:b0:a58:e71d:d74 with SMTP id a640c23a62f3a-a5a2d55a8c7mr2386588366b.13.1716310456605; Tue, 21 May 2024 09:54:16 -0700 (PDT) Received: from krava ([83.240.61.240]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a1781d342sm1645720066b.6.2024.05.21.09.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 09:54:16 -0700 (PDT) From: Jiri Olsa X-Google-Original-From: Jiri Olsa Date: Tue, 21 May 2024 18:54:13 +0200 To: Oleg Nesterov Cc: Steven Rostedt , Masami Hiramatsu , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-man@vger.kernel.org, x86@kernel.org, bpf@vger.kernel.org, Song Liu , Yonghong Song , John Fastabend , Peter Zijlstra , Thomas Gleixner , "Borislav Petkov (AMD)" , Ingo Molnar , Andy Lutomirski , "Edgecombe, Rick P" , Deepak Gupta Subject: Re: [PATCHv6 bpf-next 1/9] x86/shstk: Make return uprobe work with shadow stack Message-ID: References: <20240521104825.1060966-1-jolsa@kernel.org> <20240521104825.1060966-2-jolsa@kernel.org> <20240521142221.GA19434@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240521142221.GA19434@redhat.com> On Tue, May 21, 2024 at 04:22:21PM +0200, Oleg Nesterov wrote: > On 05/21, Jiri Olsa wrote: > > > > Currently the application with enabled shadow stack will crash > > if it sets up return uprobe. The reason is the uretprobe kernel > > code changes the user space task's stack, but does not update > > shadow stack accordingly. > > > > Adding new functions to update values on shadow stack and using > > them in uprobe code to keep shadow stack in sync with uretprobe > > changes to user stack. > > I don't think my ack has any value in this area but looks good to me. > > Reviewed-by: Oleg Nesterov > > > > Fixes: 8b1c23543436 ("x86/shstk: Add return uprobe support") > > Hmm... Was this commit ever applied? should have been: 488af8ea7131 x86/shstk: Wire in shadow stack interface will send new version thanks, jirka > > Oleg. >