From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.173 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796073134; b=UB7JauwD0QBSqaTu1RgR9z/2tNCL6pLSD7QBUKB4iUohkmiAegNmf2CTdo+telWjiq4t PYZNWx3AvvTrx+4soN1AtVLSdbQblRpO26BwlqJ4wMRVFdX0xJrQ6Yde0ZyoJadKzlfBS eIsaJ+dxd6GE1uyAfnH4QqycysDOkuvg6mQ0W2gjfohkXadlL7hU7HWJuO08P1jtRBBVY A4nC7jaYKw1SkwF/O+nTaeSxxe3mO0KoK3Ivemgj7beFQZA7otx0R+OwZmi8DwVe2B3f3 hcVjg4TgPammAQ+xAdjziBl8pF8j5CCokuRjoZ3CGnsrbFPFTgdaRO7CcUimu+eSnYg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796073134; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:Autocrypt: Content-Type:Content-Transfer-Encoding:User-Agent:MIME-Version; bh=lgZRoRFHLx5L1Ux8eN9i7heZppLVWGGllEhLlvpAL9Y=; b=QjwtXzpfSXYacM0DBQu2tNAn8elhn8DGR9nCMiE3a0B9KSPbDYq2vyfGoeW9Gvtia9Vo DcnrPPuqjUDx0LvX0KiOgeJsDmQnzvZtSe3iLuS3WXAE2Qi946Z6sdqJLH5QSP8IeTXJq O0H7SHEWubeU/Rm7sLhRpeIJZcadltLgkLRmKi3o0MZVH4ggs8HhDthKPwEC7TthOyHBM Ym5etLGecsMVIjdeKPBywZjZKf5Qx2zUk4LPn+jody83jpf7sgetZB9bdLQbezJs8UsjT dq3nPi1sjMoEIzOU1YNahbmf8s7Vinix+LmYqufD320D7/vgHdtH/LFlAs9ACAMp8Rg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=dubeyko.com; spf=pass smtp.mailfrom=dubeyko.com; dkim=pass header.d=dubeyko-com.20260707.gappssmtp.com header.i=@dubeyko-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=gSMJRkQ7; arc=none smtp.remote-ip=209.85.128.173 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85D74606A320 for ; Mon, 30 Nov 2026 21:12:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 85D74606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=dubeyko.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=dubeyko.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=dubeyko-com.20260707.gappssmtp.com header.i=@dubeyko-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=gSMJRkQ7 Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-8b10d24345dso99369507b3.3 for ; Mon, 30 Nov 2026 13:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dubeyko-com.20260707.gappssmtp.com; s=20260707; t=1796073132; x=1796677932; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:content-type :autocrypt:references:in-reply-to:date:cc:to:from:subject:message-id :from:to:cc:subject:date:message-id:reply-to:content-type; bh=lgZRoRFHLx5L1Ux8eN9i7heZppLVWGGllEhLlvpAL9Y=; b=gSMJRkQ7SdJgYxoufh6L++kiZWD9QCClOqN2mPS9/wonXf5wrVI/V8+8mGcpnUwdOd sTOfTah6qAhTvJGtGGg5Vw0JyU8IQXfXzJ++G3KMvBkm8JsSuXH5AifEPBE/aGBy0YV9 uFImWz9Z38Gyi6VIgZgT6ezoqpNo2MKTJPFKG8SLq2zCdhO/WwYC9ra3qIyI0r2RSbY9 QECMl/JjY+zZ4+5XxmAqJEAuEMlSpQUq8RfwbtEy7OYGK/7m6a9Z/Hgbz+BXsspOtmxX KPL2blV1lxtiGIpfgspT7eg8a/FFpQc74NQQ09S1A7zlpXZ2YkJ4snD16EF9sRmnU/42 4fVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796073132; x=1796677932; h=mime-version:user-agent:content-transfer-encoding:content-type :autocrypt:references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=lgZRoRFHLx5L1Ux8eN9i7heZppLVWGGllEhLlvpAL9Y=; b=U81tpoGX9d4xSAHQriGYGZdyUS4SfmsWthUIu6k6f0eHp1/eoAqer/RadGUAjJozbL qUaUbPQU3lb9Oq3y3EErpj0EEDWna2p67LoAOBhxdK9HXW9xkQXLsQYBr/23Ft9ZIYRg QOHqsCsD44He7ZEsNccj4lxZxow1elJqC04qM7CVHfS1QBmhT7ccXMbAFoVTnfHNWkhT Eb2JH4jtmws5uvAdsPB/AnVy2Z9edRamV4FJbA/6FLNceV6pgtreQN1kXRZoU3BhAJwf c2t02JHGRIs1R+SBPJyuZxxNzdBTTXlTPNw5PYMG8gM+CCWP4eLevH0lUJWU6CgPudIk Gvqg== X-Forwarded-Encrypted: i=1; AL+hErFNXiMLx9jkTM3m0QJZ1mZL79u20+pjKgsomWtHIrfNAgDfTARuo4QNgTDjOVr5Q0fX1iiOMsgIfUcoMsc=@vger.kernel.org X-Gm-Message-State: APuU4Z801rRQepAzGivoxD8uEgMXQPxoxxGEqTU274TPh2QV0B57YLWu 4xacAAiR5IFnlQmk/ytgnoHgWwuzQCwB1c4/t3l4m2sGg0zWiPFJD5eoX8XCyazvb2Y7O25K9q6 h1/WIsKM= X-Gm-Gg: AZFdTZevIDiJI/w8smot8VdmXrW4HJhiBf3tVsFIT3c/zcEmR2GpvN87GWGfd1kL3i1 vq0m8LTPDW7+Zh8WPOuOEJBtSa2//bo3r8r2xEnzIwkr/o9xpoxM1Fda8BFYUF82v6zSti6iVbn iS2hXQjsUO3BgVA3/jT3WXaV3KmJ66txI5rj04b1hypwUdf72X/RVM1ocTnQHffNp7kUEUGGFct Tg/6AIhcx1LmK2rhCp4u+G1OHu+F5QlsRm14Rzbtmugsb7rJzm34ddykdE6aHY/pKLGsp5ykt5z nVFxS4YossUu0qhV1ImmYti4Ta6w2DoZVCdgAYwo80cXHY1aQFWoveMKXIgvdPWVtdZ6572Fk/h f4yhX7pWEgGSQzrmUBsUd9g7idRXxyFokC1dVKO3t3G6qc5b9shzVuycNsEhX3Mbck+075tYzGt lEfoecwOUiQhrBazvPR/YK7gA1InMKaLMmImur5tSzgPlFxpCyoWi/eazMjHis6qNKdQIHYkXrd rCNLryUsYQUQkajjoAvPMDqt2L/c2oO3pJXqoRnfMd/BQ8VU98R9Zb1DSi9t3nAV9XfJ96c1f3/ Q5tEeKopg5iH28WEqqOkKEvnn4Jq/cVoNdAMwKzsb+C66JXpsv/ToDI6Bc/MMw4d/Yh+PYJc5Pr u90UUBFqOPXICQ/Fxm5yPe9YxpBJLOguUe0irtmYs4E+/m3HZgdAF1oH5T61g+Q6Ds3jPfZM= X-Received: by 2002:a05:690c:6c8a:b0:8b3:76b4:6231 with SMTP id 00721157ae682-8b5201eb3f4mr150522587b3.0.1796073132289; Mon, 30 Nov 2026 13:12:12 -0800 (PST) Received: from system76-laptop.attlocal.net ([2600:1700:6476:1430:2180:2437:3f85:6ff6]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8b5202b085bsm136363207b3.16.2026.11.30.13.12.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 13:12:11 -0800 (PST) Message-ID: <16d041e4b01dc83a82168696742c731710f4db69.camel@dubeyko.com> Subject: Re: [PATCH v2] hfsplus: reorder complete combining runs for dentry keys From: Viacheslav Dubeyko To: Shawn Shao Cc: John Paul Adrian Glaubitz , Yangtao Li , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 30 Nov 2026 13:12:10 -0800 In-Reply-To: <20261130074816.2537284-1-shawnq1@163.com> References: <20261126160720.3007837-1-shawnq1@163.com> <0e5898598e12940f4b33aebccabb6bd3a42565f2.camel@dubeyko.com> <20261130074816.2537284-1-shawnq1@163.com> Autocrypt: addr=slava@dubeyko.com; prefer-encrypt=mutual; keydata=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 NFdvziOa4FgUBC4X71upsZIoZJeii2V/Jtc3B4g== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-9 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 On Mon, 2026-11-30 at 07:48 +0000, Shawn Shao wrote: > Hello, >=20 > Thanks for reviewing the patch and reporting the frame-size warnings. >=20 > The iterator still reorders a complete combining run. The refill > routine is > now kept out of the caller's stack frame, and the KUnit test > allocates its > two stored Unicode strings with KUnit-managed memory. >=20 > Two equivalent UTF-8 spellings with a 33-mark run could produce > different > dentry hashes and comparisons, although HFS+ stores them in the same > canonical order. The regression test checks hashes, comparison, and > stored > Unicode forms. >=20 > Tested on: > Tested source:=C2=A0 v7.3-23903-g7cd8495c0f162 > compiler:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gcc (Ubuntu 11.4.0-1ubuntu1= ~22.04.3) 11.4.0 > QEMU:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 QEMU em= ulator version 6.2.0 >=20 > The x86-64 bzImage build completed with CONFIG_FRAME_WARN=3D1280 and > KCFLAGS=3D-Wframe-larger-than=3D1280. GCC reports stack usage of 1136 > bytes in > hfsplus_compare_dentry(), 64 bytes in the refill routine, and 256 > bytes in > the KUnit test. The hfsplus_unicode suite passed all 35 tests. The > QEMU > reproducer found the alternate 33-mark spelling immediately after > creation > (POS_BAD_AFTER_CREATE=3D1); the 31-mark control also passed. The > unchanged > positive-only reproducer exits 1 on the fixed kernel after printing > ORACLE: NOT CONFIRMED. POS_BAD_AFTER_CREATE=3D1 confirms the alternate > spelling is found before remount, as expected for the fix. The > reproducer > and image inputs are unchanged from v1. >=20 > Fixes: bbe5ebcbc006 ("hfsplus: canonicalize decomposed catalog names > like fsck_hfs expects") > Signed-off-by: Shawn Shao > --- > Changes in v2: > - Keep the refill routine in a separate stack frame to reduce stack > usage. > - Allocate the full-size KUnit Unicode buffers dynamically. >=20 > =C2=A0fs/hfsplus/unicode.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 19 +++++------= - > =C2=A0fs/hfsplus/unicode_test.c | 73 > +++++++++++++++++++++++++++++++++++++++++++++++ > =C2=A02 files changed, 80 insertions(+), 12 deletions(-) >=20 > diff --git a/fs/hfsplus/unicode.c b/fs/hfsplus/unicode.c > index 59b8788a69a9e..840a115609aa0 100644 > --- a/fs/hfsplus/unicode.c > +++ b/fs/hfsplus/unicode.c > @@ -577,21 +577,15 @@ int hfsplus_asc2uni(struct super_block *sb, > =C2=A0EXPORT_SYMBOL_IF_KUNIT(hfsplus_asc2uni); > =C2=A0 > =C2=A0/* > - * Maximum length of a single maximal run of nonzero-combining-class > code > - * units that hfsplus_decompose_iter_next() below will canonically > - * reorder. Every code unit with combining class 0 starts a new run, > so > - * this only bounds how many *consecutive* combining marks between > two > - * base characters get sorted - real text, and even deliberately > - * adversarial "Zalgo" text, essentially never approaches this. > Keeping > - * it small means hfsplus_hash_dentry() and hfsplus_compare_dentry() > only > - * ever need a tiny amount of lookahead state, rather than buffering > an > - * entire (up to 255-unit) name. > + * A maximal combining run can contain every code unit in an HFS+ > catalog > + * name. Keep the iterator limit aligned with the name limit so it > can > + * reorder the complete run like hfsplus_decompose_str(). > =C2=A0 */ > -#define HFSPLUS_CCC_RUN_MAX 32 > +#define HFSPLUS_CCC_RUN_MAX HFSPLUS_MAX_STRLEN >=20 I don't quite follow to the explanation. Why should we change the constant on HFSPLUS_MAX_STRLEN? Could you please explain it more clearly and precise? > =C2=A0 > =C2=A0/* > =C2=A0 * Iterator that produces the canonically-ordered, decomposed code > units > - * of a Linux name one at a time, without materializing the whole > name. > + * of a Linux name one combining run at a time. > =C2=A0 * hfsplus_hash_dentry() and hfsplus_compare_dentry() use this so > that > =C2=A0 * hashing and comparison always agree with what hfsplus_asc2uni() > would > =C2=A0 * actually store, while still comparing lazily (stopping at the > first > @@ -630,7 +624,8 @@ static void hfsplus_decompose_iter_init(struct > hfsplus_decompose_iter *it, > =C2=A0 * we know the class of the first unit it produces, so decoding it > is > =C2=A0 * speculative until that's decided. > =C2=A0 */ > -static bool hfsplus_decompose_iter_refill(struct > hfsplus_decompose_iter *it) > +static noinline_for_stack bool > +hfsplus_decompose_iter_refill(struct hfsplus_decompose_iter *it) > =C2=A0{ > =C2=A0 it->run_pos =3D 0; > =C2=A0 it->run_len =3D 0; > diff --git a/fs/hfsplus/unicode_test.c b/fs/hfsplus/unicode_test.c Now the unicode_test.c file is named as hfsplus_unicode_test.c. Please, based the patch on for-next branch of HFS/HFS+ git tree. > index a683c6d5fc221..9a50e3fcb7764 100644 > --- a/fs/hfsplus/unicode_test.c > +++ b/fs/hfsplus/unicode_test.c > @@ -1479,6 +1479,78 @@ static void > hfsplus_hash_dentry_combining_reorder_test(struct kunit *test) > =C2=A0 free_mock_sb(mock_sb); > =C2=A0} > =C2=A0 > +static void hfsplus_dentry_combining_reorder_long_test(struct kunit > *test) Current explanation of the patch gives to me no clue why do we need this unit-test? Could you please explain it? Thanks, Slava. > +{ > + static const char acute[] =3D "\xcc\x81"; > + static const char dot_below[] =3D "\xcc\x96"; > + enum { NR_ACUTE =3D 32, NAME_LEN =3D 1 + (NR_ACUTE + 1) * 2 + 1 > }; > + char acute_first[NAME_LEN], dot_first[NAME_LEN]; > + struct hfsplus_unistr *stored1, *stored2; > + struct test_mock_sb *mock_sb; > + struct qstr str1, str2; > + char *p; > + int i, result; > + > + mock_sb =3D setup_mock_sb(); > + KUNIT_ASSERT_NOT_NULL(test, mock_sb); > + > + stored1 =3D kunit_kzalloc(test, sizeof(*stored1), GFP_KERNEL); > + KUNIT_ASSERT_NOT_NULL(test, stored1); > + stored2 =3D kunit_kzalloc(test, sizeof(*stored2), GFP_KERNEL); > + KUNIT_ASSERT_NOT_NULL(test, stored2); > + > + setup_mock_dentry(&mock_sb->sb); > + mock_sb->nls.char2uni =3D test_char2uni_utf8; > + > + p =3D acute_first; > + *p++ =3D 'e'; > + for (i =3D 0; i < NR_ACUTE; i++) { > + memcpy(p, acute, sizeof(acute) - 1); > + p +=3D sizeof(acute) - 1; > + } > + memcpy(p, dot_below, sizeof(dot_below) - 1); > + p +=3D sizeof(dot_below) - 1; > + *p =3D '\0'; > + > + p =3D dot_first; > + *p++ =3D 'e'; > + memcpy(p, dot_below, sizeof(dot_below) - 1); > + p +=3D sizeof(dot_below) - 1; > + for (i =3D 0; i < NR_ACUTE; i++) { > + memcpy(p, acute, sizeof(acute) - 1); > + p +=3D sizeof(acute) - 1; > + } > + *p =3D '\0'; > + > + create_qstr(&str1, acute_first); > + create_qstr(&str2, dot_first); > + result =3D hfsplus_hash_dentry(&test_dentry, &str1); > + KUNIT_ASSERT_EQ(test, 0, result); > + result =3D hfsplus_hash_dentry(&test_dentry, &str2); > + KUNIT_ASSERT_EQ(test, 0, result); > + KUNIT_EXPECT_EQ(test, str1.hash, str2.hash); > + > + KUNIT_EXPECT_EQ(test, 0, > + hfsplus_compare_dentry(&test_dentry, > str1.len, > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 str1.name, &str2)); > + > + result =3D hfsplus_asc2uni(&mock_sb->sb, stored1, > HFSPLUS_MAX_STRLEN, > + str1.name, str1.len, > HFS_REGULAR_NAME); > + KUNIT_ASSERT_EQ(test, 0, result); > + result =3D hfsplus_asc2uni(&mock_sb->sb, stored2, > HFSPLUS_MAX_STRLEN, > + str2.name, str2.len, > HFS_REGULAR_NAME); > + KUNIT_ASSERT_EQ(test, 0, result); > + KUNIT_EXPECT_EQ(test, be16_to_cpu(stored1->length), > + be16_to_cpu(stored2->length)); > + KUNIT_EXPECT_EQ(test, 34, be16_to_cpu(stored1->length)); > + KUNIT_EXPECT_EQ(test, > + memcmp(stored1->unicode, stored2->unicode, > + =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 be16_to_cpu(stored1->length) * > sizeof(stored1->unicode[0])), > + 0); > + > + free_mock_sb(mock_sb); > +} > + > =C2=A0/* Test hfsplus_compare_dentry basic functionality */ > =C2=A0static void hfsplus_compare_dentry_basic_test(struct kunit *test) > =C2=A0{ > @@ -1880,6 +1952,7 @@ static struct kunit_case > hfsplus_unicode_test_cases[] =3D { > =C2=A0 KUNIT_CASE(hfsplus_hash_dentry_consistency_test), > =C2=A0 KUNIT_CASE(hfsplus_hash_dentry_edge_cases_test), > =C2=A0 KUNIT_CASE(hfsplus_hash_dentry_combining_reorder_test), > + KUNIT_CASE(hfsplus_dentry_combining_reorder_long_test), > =C2=A0 KUNIT_CASE(hfsplus_compare_dentry_basic_test), > =C2=A0 KUNIT_CASE(hfsplus_compare_dentry_casefold_test), > =C2=A0 KUNIT_CASE(hfsplus_compare_dentry_special_chars_test),