From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 9FCE829A326 for ; Tue, 30 Sep 2025 09:20:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759224060; cv=none; b=XAG84P/5vemmxAMf/OVc+JT23aJgpyoYIybxzkEd2cdINLxxfpHiB0bZSSfIxy/fMfEosuXO/WAR7IHeLX7oxBZFyo+TBOT99J1uFsoSqocVnw+sb9lDOkAQH9+I8J49aRsEfqSZOlNd5fIgJCDFcbhrkqbQwLs8InkQN4FdPtE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759224060; c=relaxed/simple; bh=9lQSfvfcTNySF441awH7y9u1KuhzkH5FEbQXswdQdkk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=p/qlTq4GadhMFv7hKFc9uORlHEFfHv5oTpKF0whHbMilbFMhTCDHTKs0EL6pHvNeFM6iD4cWqNESMDns4SQi50qdLfkx6DehTcgON8tXpXzx+f1tdClqgQbKHR2sUK6K/wgiLsFB90LAtdBG0dW3n8IRluP4xBKI8OlT5FxH8KM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=Q2cKba2a; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q2cKba2a" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759224057; 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=9lQSfvfcTNySF441awH7y9u1KuhzkH5FEbQXswdQdkk=; b=Q2cKba2aUiNkGEnG1OFv+AGAxRUMQGgNxyTHvOhC7HrjjpFlPMBjRRP85oFpyH9I6IDAPZ GNu1NPzDTYXyn/ZnDw6te4h+JVggHcyl7ZE/tO+F7J5njwlkm0vi2x25LhjR0RGyIu9JSp aPR0DSIeiu35/tvVWBEBvP8jvsOVFKE= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-njD2j-MWOdSpapmyRlXfEg-1; Tue, 30 Sep 2025 05:20:53 -0400 X-MC-Unique: njD2j-MWOdSpapmyRlXfEg-1 X-Mimecast-MFC-AGG-ID: njD2j-MWOdSpapmyRlXfEg_1759224052 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0C2A919560B8; Tue, 30 Sep 2025 09:20:52 +0000 (UTC) Received: from fweimer-oldenburg.csb.redhat.com (unknown [10.44.33.56]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 051C1180035E; Tue, 30 Sep 2025 09:20:34 +0000 (UTC) From: Florian Weimer To: Deepak Gupta Cc: Charles Mirabile , pjw@kernel.org, Liam.Howlett@oracle.com, a.hindborg@kernel.org, akpm@linux-foundation.org, alex.gaynor@gmail.com, alexghiti@rivosinc.com, aliceryhl@google.com, alistair.francis@wdc.com, andybnac@gmail.com, aou@eecs.berkeley.edu, arnd@arndb.de, atishp@rivosinc.com, bjorn3_gh@protonmail.com, boqun.feng@gmail.com, bp@alien8.de, brauner@kernel.org, broonie@kernel.org, charlie@rivosinc.com, cleger@rivosinc.com, conor+dt@kernel.org, conor@kernel.org, corbet@lwn.net, dave.hansen@linux.intel.com, david@redhat.com, devicetree@vger.kernel.org, ebiederm@xmission.com, evan@rivosinc.com, gary@garyguo.net, hpa@zytor.com, jannh@google.com, jim.shu@sifive.com, kees@kernel.org, kito.cheng@sifive.com, krzk+dt@kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, lorenzo.stoakes@oracle.com, lossin@kernel.org, mingo@redhat.com, ojeda@kernel.org, oleg@redhat.com, palmer@dabbelt.com, paul.walmsley@sifive.com, peterz@infradead.org, richard.henderson@linaro.org, rick.p.edgecombe@intel.com, robh@kernel.org, rust-for-linux@vger.kernel.org, samitolvanen@google.com, shuah@kernel.org, tglx@linutronix.de, tmgross@umich.edu, vbabka@suse.cz, x86@kernel.org, zong.li@sifive.com Subject: Re: [PATCH v19 00/27] riscv control-flow integrity for usermode In-Reply-To: (Deepak Gupta's message of "Fri, 26 Sep 2025 14:07:06 -0700") References: <20250926192919.349578-1-cmirabil@redhat.com> Date: Tue, 30 Sep 2025 11:20:32 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 * Deepak Gupta: > In case of shadow stack, it similar situation. If enabled compiler > decides to insert sspush and sspopchk. They necessarily won't be > prologue or epilogue but somewhere in function body as deemed fit by > compiler, thus increasing the complexity of runtime patching. > > More so, here are wishing for kernel to do this patching for usermode > vDSO when there is no guarantee of such of rest of usermode (which if > was compiled with shadow stack would have faulted before vDSO's > sspush/sspopchk if ran on pre-zimop hardware) I think this capability is desirable so that you can use a distribution kernel during CFI userspace bringup. Thanks, Florian