From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-165.mta0.migadu.com [91.218.175.165]) (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 5C8753EFFB9 for ; Sun, 27 Sep 2026 14:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.165 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790517965; cv=none; b=oF4MLpNq8fFE5LU0O2qQQYhWJb/ptDNsV9VmcBUUFlEQKl3RzVOjMYH9kCW3IRXTof7EAYyb1S3F6g7Vh4KqmrQN9IKk9Iwot3q65SvuRshXaSHjLMYy6nUWNeZS1iVlBX6aZUr3dxJoO/DQg7ELJWB7RlyI3UpO6Sut2xLV/SA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790517965; c=relaxed/simple; bh=JE5rHMFVp1ASSitG2+LEzV8irkI3ba+nPxRmpmzRXKs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Esgb03OFk9iRaTjNsF+UbPjnG9BZK/QsyTCNmk6ffQZZgT5mSdWrMyhwn6uS/+TJ9mxk2+815qU2GwNtZ5WC48tTMri+DVwR65yWJK2hi7fNu1yC86n9M/3mX7HIg8PJ5r8J224WfReI1tdSaFa6/4v2L3OPVCHvAIhHZKrWyWA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=uzI0Cl/R; arc=none smtp.client-ip=91.218.175.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="uzI0Cl/R" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=JE5rHMFVp1ASSitG2+LEzV8irkI3ba+nPxRmpmzRXKs=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1790517961; v=1; x=1791122761; b=uzI0Cl/RyPSp9DtXGDQtJb0EsKwZiygL70woO0KClZPbNgzOd7KoYzXh90i5veAqBFlMsVac dKpybu3tc1uHncsMPfXrVsuHh6MtpvAT1G5sh8beLUAt+Pq9y769HnxORE/y2DAKzr3vWv7NX26 6TxKJ1XA9960gwu8uaPtFcDM= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 9e0e383a7683fddd; Sun, 27 Sep 2026 14:05:50 +0000 X-Mizu-Trace-ID: 9e0e383a7683fddd X-Migadu-Flow: FLOW_OUT Date: Sun, 27 Sep 2026 14:05:38 +0000 From: "Jose Fernandez (Anthropic)" To: Bill Wendling Cc: Steven Rostedt , Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Nathan Chancellor , Nicolas Schier , Nick Desaulniers , Justin Stitt , Catalin Marinas , Will Deacon , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Eduard Zingerman , Kumar Kartikeya Dwivedi , Martin KaFai Lau , Song Liu , Yonghong Song , Jiri Olsa , Emil Tsalapatis , Puranjay Mohan , Xu Kuohai , Ard Biesheuvel , Ilias Apalodimas , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?utf-8?B?w5Z6a2Fu?= , Sami Tolvanen , Kees Cook , Leon Hwang , Ihor Solodrai , Josh Poimboeuf , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, llvm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org, linux-efi@vger.kernel.org, rust-for-linux@vger.kernel.org, Ben Cressey , "Florent Revest (Anthropic)" Subject: Re: [PATCH v2 6/9] arm64: cfi: Use CONFIG_ARM64_FUNCTION_PREFIX_NOPS for the type hash offset Message-ID: References: <20260924-b4-arm64-callops-kcfi-v2-0-587865b6d991@linux.dev> <20260924-b4-arm64-callops-kcfi-v2-6-587865b6d991@linux.dev> 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: On Fri, Sep 25, 2026 at 12:17 PM Bill Wendling wrote: > > + return 4 + 4 * CONFIG_ARM64_FUNCTION_PREFIX_NOPS; > > *drive by review* Could you explain the two fours in this equation > with a comment? (Feel free to ignore this if it's obvious to > developers.) The first is the type hash and the second is the size of a NOP. For v3 I'll spell the second one out and add a comment for the first. /* The 4-byte type hash sits before the prefix NOPs. */ return 4 + CONFIG_ARM64_FUNCTION_PREFIX_NOPS * AARCH64_INSN_SIZE; - Jose