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 E4CF23E4110 for ; Sun, 27 Sep 2026 14:05:53 +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=1790517956; cv=none; b=I0/IPAufKnxJatzfin+uZE7kWuFXepZlKqfPJJfWIbG8H7/tlQOxbHR4soOLE5Dh8+6U+G4wBqOFk7OhrvSediR+1o8uEYb1FYGoAjzPcdJMJsSEQ3XSw4PsB5Nv/Ff32vvQRUR7KnwPx2J5QdcFlcRnhXNnKizMNfOM7CSjYjM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790517956; 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=J9HUKEMibU2LP5HPyN0hfaS+6kAMW5NZMMsFWj51K8yddQHtEuoBNugXueTpIBoBGTYP8Itr+Idg6BgnL6ImxjIvekffr4cazdV63hJEN8Of8u9jvctwBCS4YlUDBqCGlJ7kPnoDI7vpT12ildUKp1biMNa/7vBggEugHGIXA0s= 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=A9nYE5lN; 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="A9nYE5lN" X-Envelope-To: bpf@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=1790517952; v=1; x=1791122752; b=A9nYE5lNnyMo+Usgv0+SQwNCMeCW2uG+TelmxP1TF563w+m2i0Qml/jlyDhEwr+OyUbi/PWZ +Un5zQqzldDYeU8IQFLkKSJQiyWgQN0XuWvwx7/SkKr4QSHXwHN4srCuqHw+bnvwJdBdf6odEB/ eCTE3R/lwWKbsMjmQ/LwsMHw= X-Envelope-To: bpf@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: bpf@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