From patchwork Wed Jan 7 23:44:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1336 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829639; bh=oahrnRJlqxfesqUOJgy5BbtYweVKEdunDYEsZuWIrIM=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=pn0PEIRb9bMCaQRaVWznfP4TNLyjSwD6dKgHqvL4r4zSU6jJwjfiUfILTXgli0tue 3mysxvfPQ03tSHfk8tLifxFes7KyeksDQM8+QHal4r+8Pumd2S8srV884OoNt156Pg yux+ya5p+rZieiFRmjh5TDy+QwQwpqCcgudiPYWsCYPTpJLBtxx7a7SAHsTb8pMDGH aB1NIyTLsPiJkJg6Ql8s9kl7rhO59jEZVc2aoG7k6mAqd9CIBMZtLeoSIW+55Rfy7U 6oMT3Z9ksD2fdUBB/HcP/lLPkt27JCHuBLh28HB3RURNrISQ3ZveMfD9Snk6oT1EZM fGedIgr9PIbzw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F331569146 for ; Wed, 7 Jan 2026 16:47:19 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id DKFiBlKm-llC for ; Wed, 7 Jan 2026 16:47:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829639; bh=oahrnRJlqxfesqUOJgy5BbtYweVKEdunDYEsZuWIrIM=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=pn0PEIRb9bMCaQRaVWznfP4TNLyjSwD6dKgHqvL4r4zSU6jJwjfiUfILTXgli0tue 3mysxvfPQ03tSHfk8tLifxFes7KyeksDQM8+QHal4r+8Pumd2S8srV884OoNt156Pg yux+ya5p+rZieiFRmjh5TDy+QwQwpqCcgudiPYWsCYPTpJLBtxx7a7SAHsTb8pMDGH aB1NIyTLsPiJkJg6Ql8s9kl7rhO59jEZVc2aoG7k6mAqd9CIBMZtLeoSIW+55Rfy7U 6oMT3Z9ksD2fdUBB/HcP/lLPkt27JCHuBLh28HB3RURNrISQ3ZveMfD9Snk6oT1EZM fGedIgr9PIbzw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CAE0669195 for ; Wed, 7 Jan 2026 16:47:19 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829636; bh=7eQSse8H333ibdJoA38/XWiXaY4UFkULeVnPN9/Jmw8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aemztDIr/FNr+eYxdCkKNCorVFGUjpvAT3GS6T4o01vUO3krXlZtrjAvFgJJMMblU aL/yhLTJvR4k4tO83PpU1bEXCFOPdY+6ZNAR5kGHvpJ7UPSjcHrQ9AeTvOAWVtax7n HQVJArNVbSwI+nJhVsSCTRlTSZbm6ruMk1HHGBkc3sx4k60KOw1z4dh2KiGTsO0pmy RYoYyUfSTA9vk7YKWKXPdoA8UJs5TrNPeyyoSehp65kaARqgO5NsBtf4scDbp2i8bU 31Y9QNJGUr6D4nBIm3scYOQEiFCLf7eO0RBPUIVQNK/zt2CTePsV8FL6urohYEbLnJ h+LIerfgf1a9g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D1DE569146; Wed, 7 Jan 2026 16:47:16 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id X2A133TltXi0; Wed, 7 Jan 2026 16:47:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829636; bh=DNwkD92NIcQrfz8SybUJEJHIeUDa2n1kwGQwltHijDw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wqvEuTrxw6UiyRPwaio6Xe0NNy2ZLv7bPYkposcQIFarvvCkHrVuzpUFjE8gFstyZ eUW0cZsXDMga4VnEcleFuL0vs3JqWinxbYzL+k8M30eYobvF/HNqGvd+MtWier+eCh bMs8dzpujMPxEmdLLRIQVqwk57FFdYdYYCDqX4Jq4DDYHq4Vu3vPZ+4iF0+zYBuoAg gi0fyooIeZFfFgI20NwiBNRUY7pShIJo2tXvNDiaPetrg1+5NrnDTlYOoxm2ft9O3R lZgGX60lYqMzPPhSB/XpWKMkM4dVbT97od7Cdwlopq9HvJZd4Z0UWA7Jegzt5NiNWk UkArVzs7WpgoQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D9DE369187; Wed, 7 Jan 2026 16:47:15 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 7 Jan 2026 16:44:15 -0700 Message-ID: <20260107234426.3508161-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260107234426.3508161-1-sjg@u-boot.org> References: <20260107234426.3508161-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: OS4XJEJADQRS3U4BV7622XCPFKFRUBPG X-Message-ID-Hash: OS4XJEJADQRS3U4BV7622XCPFKFRUBPG X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 5/9] fs: ext4l: Align verity.c, symlink.c and hash.c with Linux List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass verity.c: - Use EXT4_LBLK_TO_B() macro instead of inline shift symlink.c: - Change ext4_free_link() parameter from const void* to void* to match Linux kernel signature and remove unnecessary cast hash.c: - Return -EINVAL instead of -1 for error consistency Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/hash.c | 2 +- fs/ext4l/verity.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/hash.c b/fs/ext4l/hash.c index 1ce0c2bcc84..58063a872d3 100644 --- a/fs/ext4l/hash.c +++ b/fs/ext4l/hash.c @@ -267,7 +267,7 @@ static int __ext4fs_dirhash(const struct inode *dir, const char *name, int len, combined_hash = fscrypt_fname_siphash(dir, &qname); } else { ext4_warning_inode(dir, "Siphash requires key"); - return -1; + return -EINVAL; } hash = (__u32)(combined_hash >> 32); diff --git a/fs/ext4l/verity.c b/fs/ext4l/verity.c index b0acb0c5031..415d9c4d8a3 100644 --- a/fs/ext4l/verity.c +++ b/fs/ext4l/verity.c @@ -302,7 +302,7 @@ static int ext4_get_verity_descriptor_location(struct inode *inode, end_lblk = le32_to_cpu(last_extent->ee_block) + ext4_ext_get_actual_len(last_extent); - desc_size_pos = (u64)end_lblk << inode->i_blkbits; + desc_size_pos = EXT4_LBLK_TO_B(inode, end_lblk); ext4_free_ext_path(path); if (desc_size_pos < sizeof(desc_size_disk))