From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta1.migadu.com (out-1.mta1.migadu.com [95.215.58.1]) (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 570C93DEAC4 for ; Sun, 27 Sep 2026 14:05:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.1 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790517955; cv=none; b=pCtT92hp3DYkyCjf8g5EMU1NHpIfaogijr2Y2aTP8cSXWh3zMt36dOqHqrQLZKGsFmCHEqf+cvLf+3pTcLGxM/F11NtFYyrRLp1wqPOQVYauh25+giCESkrBNHJZJuKZsruCDuBHrKRiwloZrgEhNTY6CVt4a7fdPXNZJm8vtAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790517955; 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=nK29h+fPMS94UHzeghRv6bxGQ0MUQ3fv0/vwJ8HkRnAldgtuxxi5BCLtrsMd4fFRlQiKap7poLFZbMfPc+/a6Iv9tKxHk7cld0PGxwavrgZLz1KvKPRJ2wK3jJKksp2oF5sxJgT008bTUtJIcR4OpaijK+00IVeqoBsO+mUiOHU= 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=I+25hmf7; arc=none smtp.client-ip=95.215.58.1 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="I+25hmf7" X-Envelope-To: llvm@lists.linux.dev 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=1790517951; v=1; x=1791122751; b=I+25hmf7Jpd7fmPqfAQFwOEkFyDI7/b8FMmpHIvxAV9hIwJb5PKtxmb7OAe7aPrCjvQ3F3WA yWzz9S4rsdVvcU23pU37cwNopLGsaX3gbCF0GDQ1tzxiJ5FHmNe1X9AHcDREQ4UZ3hj6THwA893 ISmDZ24aVgzqJIUH8Srx7o0U= X-Envelope-To: llvm@lists.linux.dev 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: llvm@lists.linux.dev 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