From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mx.groups.io with SMTP id smtpd.web11.39809.1658232643333907367 for ; Tue, 19 Jul 2022 05:10:43 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HKl4zJJD; spf=pass (domain: gmail.com, ip: 209.85.208.171, mailfrom: savvamtr@gmail.com) Received: by mail-lj1-f171.google.com with SMTP id by8so13518848ljb.13 for ; Tue, 19 Jul 2022 05:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eRqXdJPAM03/p2ipF8vZsmEjJznfSXWDoK4xE05EaJ8=; b=HKl4zJJDMmxx5jTR0+VOCg0CyG/70JyFwlBDbLhRDQ14A/0xOraSq3FfPAUttFo4tc +qocgTpcPzMEu/f/jadrz1F7VB+Z62wUh5bKMvATQdkfCt9IEsFtiwwkNbjfsEsCr3E2 w1U4NBFwwrb0msVAjVDQENGNtf5xkkWHQSYhzwg6uJVVmlbJNEh2LSm0/EFXw5wdkmE6 ngnqGgTKmphHjg8+1C5uxuWGi+lNYQyickWPwlQbLBmPayrIctv8tcj0KUJ9vxKRlvhN Mptf89K7dEhvCVPOhZ4hGI0gmanchiGig0pk/1A0lqM8vr47/ysBboAErU+GUL+/a5e5 InuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eRqXdJPAM03/p2ipF8vZsmEjJznfSXWDoK4xE05EaJ8=; b=vArtImQaAUvtxdZEZqZS1yQy95myszc9kzHn8X/Wfft4xePTfcy63UqN3/hOEbEQ6L y88So0DoTRzX6DCDe0LRixqxUNv5teCchLJM7uMvL1dbRhDLIXpaMQJH50kS6nuIqFPj ++yCZjBOIszVo60/h3ulM0DEa2hdlEinlNnsCF3RvvahikOMSTS+yCEkt0nfpa4fMn2q PIs4mSM8Vep25KwyeBPTRP4FCfg6bqN59YKsDyFX0tjPliml7lBhagws0REp7TaOaPQj 4j/Zs8qHkBBJ30oFOTVL1E/FEIhneIZEYVqf3nlATVkRYEfBgWv0ljxiA79B58Og+ucO hXwA== X-Gm-Message-State: AJIora//BC/OyD36MStrGxp6yNqRbN1mzGI4RmOmsGlPc6I88p8Eiif1 8gx8UA94KRbw4ntVfNcImtNgjIvGf1c4UTFMFzw= X-Google-Smtp-Source: AGRyM1vVFkI6FQ6LU6kNnsKBkcM90Hw98m6Akv0ScldcMdAKWxsEgd2UvI9fn4sTVDwpv3bwrXCrnQ== X-Received: by 2002:a2e:a7cf:0:b0:25d:6b92:9c1a with SMTP id x15-20020a2ea7cf000000b0025d6b929c1amr13814596ljp.107.1658232641464; Tue, 19 Jul 2022 05:10:41 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([207.180.219.167]) by smtp.gmail.com with ESMTPSA id z20-20020a2eb534000000b0025d6ecbc897sm2668245ljm.46.2022.07.19.05.10.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2022 05:10:41 -0700 (PDT) From: "Savva Mitrofanov" To: devel@edk2.groups.io Cc: =?UTF-8?q?Marvin=20H=C3=A4user?= , Pedro Falcato , Vitaly Cheptsov Subject: [edk2-platforms][PATCH 06/10] Ext4Pkg: Drop dir entry name_len limit extra check Date: Tue, 19 Jul 2022 18:10:12 +0600 Message-Id: <20220719121016.29380-7-savvamtr@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220719121016.29380-1-savvamtr@gmail.com> References: <20220719121016.29380-1-savvamtr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Field name_len has type CHAR8, while filename limit is 255 (EXT4_NAME_MAX), so because structure EXT4_DIR_ENTRY would be unchangeable in future, we could drop this check without any assertions Cc: Marvin H=C3=A4user Cc: Pedro Falcato Cc: Vitaly Cheptsov Signed-off-by: Savva Mitrofanov --- Features/Ext4Pkg/Ext4Dxe/Directory.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Directory.c b/Features/Ext4Pkg/Ext4Dx= e/Directory.c index 682f66ad5525..96c84c24243e 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Directory.c +++ b/Features/Ext4Pkg/Ext4Dxe/Directory.c @@ -160,17 +160,6 @@ Ext4RetrieveDirent ( return EFI_VOLUME_CORRUPTED;=0D }=0D =0D - // Ignore names bigger than our limit.=0D -=0D - /* Note: I think having a limit is sane because:=0D - 1) It's nicer to work with.=0D - 2) Linux and a number of BSDs also have a filename limit of 255.=0D - */=0D - if (Entry->name_len > EXT4_NAME_MAX) {=0D - BlockOffset +=3D Entry->rec_len;=0D - continue;=0D - }=0D -=0D // Unused entry=0D if (Entry->inode =3D=3D 0) {=0D BlockOffset +=3D Entry->rec_len;=0D --=20 2.37.0