Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3118099lqo; Tue, 21 May 2024 07:25:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWBxA2Gd5lX8AWTLfqKKgK5HFVvYSHqpnSfoXaFXZQ+EZocs3oQMXYwmMgV40JkF5CMNMP8inVrhsaFNDRhoRev1fdpcrAF/BJzIeFTDA== X-Google-Smtp-Source: AGHT+IFuJpjIO+yjl2KeVSlbz6umrzldJ6xDG+i2RPE/K0ugsxZvk/82lO0IN5VtbtKMKhyePIHT X-Received: by 2002:a17:906:234b:b0:a59:cbcb:1cca with SMTP id a640c23a62f3a-a5d59cbf185mr821531066b.13.1716301505625; Tue, 21 May 2024 07:25:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716301505; cv=pass; d=google.com; s=arc-20160816; b=NKjZvJxkEgt4VxG/TX+1+SJrbPyttzuMovxw9Lf9CGetzEVDpRWzDbowGKit0KMol6 /qAMNjRfnYbkEIKw2UlWF3hF6rIA9PVsJrQ8rQvDZzdthCC7oyAdhsNKC+E8ccdrhLCJ F7Vd1VPnjqIsOEqdoeirNwyTA3SK6GpKIDAFV2MtX/zh7HODwnSZyFRki572Zpge0kLM GcE1hT8BV0hduPfOlOygCcbPJbGdiD01QzoTAQAzCpDR8R6rGx4vlRY8bcD1+pHLup7C oANGvNv758V/PiETZO5MZCbZ2D4MccXd4NvUmuVs0o8uRpxV6BdKQnQ6EsMbdXachTwt JjGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=tfhs4G1UxiGQsBmQ8SRV1xtzgUc9WBEgAUO1utJnNF0=; fh=kEepuZEV56yu1CII1sIC7TStQbX8twfdEPu+5MelbC8=; b=dZVTuWhMvr4Do/JSk7gg5rHmY/cFJeoaIC1LqJXGEpyUwlPTdWP6lQRJmkT4XiTtnp gpngR6ljQ1K0h7fEHFdOu/o8+Yeo4ThXuSDmy2+3SDIv1urEjtMNloV9Gng8uSwZIyw/ PIBSfsHVdvslCfusBHun5nETjdeG5HP6/a7K5Lx2EemQ5wKx9Bl8MPAXZp1sgwe2jg8J IWiY8gj29JN9m20gl7VvRH1E0+6E6Wk88jDffz//D43Pe4RkERjL7f8yhb3Qpab/46np SsxXpDeatqvq9nYYXODeDz/CUiBP7cyY+3ExhU+R9FHgejNsGGCRjX9IZozLyrbhhHZB vQdA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BcC+kn0q; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-185091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2c0cfsi1495005266b.958.2024.05.21.07.25.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 07:25:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BcC+kn0q; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-185091-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185091-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 5E53F1F232A8 for ; Tue, 21 May 2024 14:25:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48F2B130496; Tue, 21 May 2024 14:24:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="BcC+kn0q" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 11A7513048D for ; Tue, 21 May 2024 14:24:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301462; cv=none; b=Ht/jXcPHQdXnyz/VpWOHmXc9sk3MQg4Si+HE8LOkLtXiH3zWw06x5gOoy6PHmq89pg6QcLcJgaw1qhkSs1Wg8REVcPydcmatA9OkVBKBQwh4G6i/tpybFflbzJ/j1TQ21w0PY01gud2IrnZlIcCNcxDU13+a8xVNQKTHDxeJlAs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301462; c=relaxed/simple; bh=tfhs4G1UxiGQsBmQ8SRV1xtzgUc9WBEgAUO1utJnNF0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d0QYPZbXNKaq+blMzroJiE6TbOCDg02pey+1svVaANYwNNTgLv0Hnpyb4sJ/v++tfJ5Pct4NLBaP+N9Ai5IoDHSnc47TSLP5Yylt/JtqiSDIuFSuujEDEHzHPSWmD4QyvWGBwPRE/h+kQbS82YhqIZdnmyQeVlV5Y5Cej68ASmk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=BcC+kn0q; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716301460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=tfhs4G1UxiGQsBmQ8SRV1xtzgUc9WBEgAUO1utJnNF0=; b=BcC+kn0qLh+yFfZiRhtW95a5JJbuKaawHXcJqc0+z6sHe8JkTErFJ8XCjcaV3yWpmra1iG 3hPXFN7oTIbX20HoiVCQBljJNEda23Okv/xZ5wY2xK/+tG62P5zFqwgsqJhadUb0sz0ftt Pj07vfY7kfwkrNxFnQr7ss9eqgn42vU= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-nhnsxC0UO6SnsoRjeBDPPg-1; Tue, 21 May 2024 10:24:12 -0400 X-MC-Unique: nhnsxC0UO6SnsoRjeBDPPg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id C79A11C03150; Tue, 21 May 2024 14:23:53 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.64]) by smtp.corp.redhat.com (Postfix) with SMTP id CBF361C0948E; Tue, 21 May 2024 14:23:48 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Tue, 21 May 2024 16:22:27 +0200 (CEST) Date: Tue, 21 May 2024 16:22:21 +0200 From: Oleg Nesterov To: Jiri Olsa 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: <20240521142221.GA19434@redhat.com> References: <20240521104825.1060966-1-jolsa@kernel.org> <20240521104825.1060966-2-jolsa@kernel.org> 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: <20240521104825.1060966-2-jolsa@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 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? Oleg.