Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp46517rdb; Wed, 21 Feb 2024 16:43:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOv8IWVlVObaqCC/Fbs2aJVYpyv13k+xo+bxBqKcQ8fnoK0OeeYSLZyGFdpaTu5zZiOU+RFNMEjHPTUzgT9ahop6EHslftJscghUgQVQ== X-Google-Smtp-Source: AGHT+IH1I4rATpYrQS0xQjSA03677alYdR5oA9ItEneFoizhzmqI9hYO6LHwfzZHJP+JZOPKkRgk X-Received: by 2002:ac8:5787:0:b0:42d:ab95:a55e with SMTP id v7-20020ac85787000000b0042dab95a55emr27316926qta.49.1708562595740; Wed, 21 Feb 2024 16:43:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708562595; cv=pass; d=google.com; s=arc-20160816; b=frZFWGbFa0V+5hO1ZaEFv4jh8DSlpQXTANrrc1yyrhkdEIEi+oAaQZv0oIT3CuQmyb wNZv929B/74oDhhPILM1HUvnHflMGvpRhxpwyVnoYnGGMW/pQRKbrgJfeTXfGtTs+tZf VooYG+7OJNNiCZcDhqpjW304UCI6bpBFBRUL3Wc3RQOCS63Riizcf4520d9Ue3pZWmFd mu6q+5Laywt9ua4rXrBbzODhQnEu8D0RjRObWkHkMFMwpyS8YAAr1B7w5aY1XxdZ5e+j QOxIa2y7w/XmB3USu/uKgL5fMyWfNHzU1kAfTmDaw/T2tEUOHcf5Ht2UDGqUwDFLvrmu CMVw== 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:from:date:dkim-signature; bh=CR24aAbNKMU+aX5oJp3mmjRiDv2V+IvxS0ZLhqmyJiA=; fh=KWk9uHzO5RgtXZwRdrPVxBhcBEoOTqwgQm6U9IOzxgg=; b=tcd8OGEmnaJoT9Rcghy0y+op9GPsqH+PqK5Qy628/1+AZPf9ubBPFq7GI8gSs+Hmhn b7PAUaaoKg00Lf2Fe4chBs8I/x7FAhWZ7K4A9mVNG43VdIJ+b7hA56lJ3HHUNw04rk4S YKCdDJ6YOpYe+FeU+oTe0tUFyvUcaO/75D2D1fi8LLmdS1wPCDe90AH278toOXVI+mSt mFYdMtmzordCBnoflay6rW10a/MXN8RZutkqmQ7qLM74kxDu1waKw/8CGSlmw1Fv/2sU yYFxOX5L0hnXEtN0CbOFvFZ5en0ZY38yVaAGHZM08b5Noys9OGnov5Q1AEuwHcmM2Fqj 7RZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=1WFKZv0p; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-75740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75740-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o22-20020ac85556000000b0042ded3fdb64si11543005qtr.41.2024.02.21.16.43.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 16:43:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-75740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b=1WFKZv0p; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-75740-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-75740-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 7E68D1C21280 for ; Thu, 22 Feb 2024 00:43:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3A8210A1D; Thu, 22 Feb 2024 00:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="1WFKZv0p" Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 73A3D12B80 for ; Thu, 22 Feb 2024 00:43:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708562586; cv=none; b=DtjxOg2girA058awE9wLKYigjQO0aWWFyWd8WNAq2E08MsakiqFpLVU8aoxqF78xNyquFGLjSmJaUTh1dxm4OcS8MSNvgJF36yBD0WXpuy+TFTBfLZF3H4PeBW8pJQ2f79TPi/5u9rlBGbHsMrPYKKlcNLuifsExjFVwQRzmdTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708562586; c=relaxed/simple; bh=70s578QhfI8VfYwqTA58Ok69jNRS8MFE5JRxsyKVwPk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kLEkc9qV0BzSrjanzZGp9xVYwF4HSJxWckfEz//r2S8LFbXDIADZsGJH0xg772I3n+ZFYitjESKreUeEa2clg1XyNPqynr2Kdbov1O+NSAzGeBOOatYu6ow0Si1IYoD+im31nCrPvKgVbixuTytgJjOXRjZOaSUBA0DzKPpLYEE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=1WFKZv0p; arc=none smtp.client-ip=209.85.216.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-2909978624eso4421625a91.1 for ; Wed, 21 Feb 2024 16:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1708562584; x=1709167384; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CR24aAbNKMU+aX5oJp3mmjRiDv2V+IvxS0ZLhqmyJiA=; b=1WFKZv0pAJBZfWvLdsKJB6k92Da4ZkbHRhMmH6TNJ3nFMgzqUzSvKPNmtWBdrWlO4y TltR+v3HZ8wcnoCcHckct0296eRkpvkrEFZw8XbUmMbnT/qvwkonqAh3LvWQ5Q3+8o4l sslqqSQTeiaxJxmXlhUWfgMdsgsy443CCK8sin/7EZNx7tjlGzz2Nv2Sy+5HIXN3yuC7 ULVMK0KOb+TABB8I+oCuzeteXl9fDgWXwPw//jwgewZLEkC4/12DQfN7sfFILPAnfwZd eXeaXULuroei2yw5d0tPIHywO+liURlP0wX5GaT7ERWe3ZD+2Fto0itXynUtSWargjyB dFuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708562584; x=1709167384; h=in-reply-to: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=CR24aAbNKMU+aX5oJp3mmjRiDv2V+IvxS0ZLhqmyJiA=; b=pA3jEbSnmqR27QjRX5n8TBoFZHFHcNCoqS3cyAMnnzTwg1mMAJawGT97+LHMrEwyut tGP8drDTaRhSMCIC/5huK1465nusSMEPNYFxgJrzyFx9ec8XVmpZTLnJzsYbg4aZjcnd 5R5TUeuKJ8iugUHYjt1xK0kU2GG6rhKYmaz0WXTYmqDfQNSrzTX/rNDIg0eNxspnxlCG xTw3ud4kpchfL3mWFszvu3UdxzB2DCdXyXXidK/FbnNFC+qa5zIbyLoUe+U+T3W7Teye JDzWZzgKzlK0tLMXfVVae5X7u5m/EfCt/2bh+tjh7MVS//HPcqep7fq085lMR19FZcnn 3G8A== X-Forwarded-Encrypted: i=1; AJvYcCXx3T9U9Brq6QvSwkFEg5V8Su/bz8Ve9xgwE9iGkthEb+i8oKlWOPPfLnpH8KoLPU2O4Gr8EEPXcs9A0Hmbeo7V/Jp6qax85VRa17Pt X-Gm-Message-State: AOJu0YyGiNCuvokeV99z1ex2ogjaDbxdLRIyJuWJeaqKDb8zK2cf6e1F vBFwMv/nbUYdGKTXeLz/Xdx2S+CsIo8FcP6S9riYiL8cnh1nWSTvFKvkZuloXpc= X-Received: by 2002:a17:90b:606:b0:299:99f4:5911 with SMTP id gb6-20020a17090b060600b0029999f45911mr9465260pjb.29.1708562584637; Wed, 21 Feb 2024 16:43:04 -0800 (PST) Received: from debug.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id bx12-20020a17090af48c00b0029a4089fbf0sm390177pjb.16.2024.02.21.16.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 16:43:04 -0800 (PST) Date: Wed, 21 Feb 2024 16:42:59 -0800 From: Deepak Gupta To: Mark Brown Cc: rick.p.edgecombe@intel.com, Szabolcs.Nagy@arm.com, kito.cheng@sifive.com, keescook@chromium.org, ajones@ventanamicro.com, paul.walmsley@sifive.com, palmer@dabbelt.com, conor.dooley@microchip.com, cleger@rivosinc.com, atishp@atishpatra.org, alex@ghiti.fr, bjorn@rivosinc.com, alexghiti@rivosinc.com, corbet@lwn.net, aou@eecs.berkeley.edu, oleg@redhat.com, akpm@linux-foundation.org, arnd@arndb.de, ebiederm@xmission.com, shuah@kernel.org, brauner@kernel.org, guoren@kernel.org, samitolvanen@google.com, evan@rivosinc.com, xiao.w.wang@intel.com, apatel@ventanamicro.com, mchitale@ventanamicro.com, waylingii@gmail.com, greentime.hu@sifive.com, heiko@sntech.de, jszhang@kernel.org, shikemeng@huaweicloud.com, david@redhat.com, charlie@rivosinc.com, panqinglin2020@iscas.ac.cn, willy@infradead.org, vincent.chen@sifive.com, andy.chiu@sifive.com, gerg@kernel.org, jeeheng.sia@starfivetech.com, mason.huo@starfivetech.com, ancientmodern4@gmail.com, mathis.salmen@matsal.de, cuiyunhui@bytedance.com, bhe@redhat.com, chenjiahao16@huawei.com, ruscur@russell.cc, bgray@linux.ibm.com, alx@kernel.org, baruch@tkos.co.il, zhangqing@loongson.cn, catalin.marinas@arm.com, revest@chromium.org, josh@joshtriplett.org, joey.gouly@arm.com, shr@devkernel.io, omosnace@redhat.com, ojeda@kernel.org, jhubbard@nvidia.com, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [RFC PATCH v1 18/28] prctl: arch-agnostic prtcl for indirect branch tracking Message-ID: References: <20240125062739.1339782-1-debug@rivosinc.com> <20240125062739.1339782-19-debug@rivosinc.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; format=flowed Content-Disposition: inline In-Reply-To: On Tue, Feb 06, 2024 at 04:13:39PM +0000, Mark Brown wrote: >On Wed, Jan 24, 2024 at 10:21:43PM -0800, debug@rivosinc.com wrote: > >> To allow userspace to enable this feature for itself, following prtcls are >> defined: >> - PR_GET_INDIR_BR_LP_STATUS: Gets current configured status for indirect branch >> tracking. >> - PR_SET_INDIR_BR_LP_STATUS: Sets a configuration for indirect branch tracking >> Following status options are allowed >> - PR_INDIR_BR_LP_ENABLE: Enables indirect branch tracking on user >> thread. >> - PR_INDIR_BR_LP_DISABLE; Disables indirect branch tracking on user >> thread. >> - PR_LOCK_INDIR_BR_LP_STATUS: Locks configured status for indirect branch >> tracking for user thread. > >FWIW the arm64 BTI feature is enabled per page of executable memory >rather than in CPU state so it'd be hard for us to adopt this interface. >I don't think that's a blocker, just noting it. Got it, makes sense.