Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp412228rdb; Tue, 5 Dec 2023 08:42:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzCbiH0Zb5PGo5OgmKCW3solRN7g0xTRUHxQvD/FqC6eL4JZOdbYj4ndnUMk5vViXnQHG4 X-Received: by 2002:a05:6a20:12d3:b0:154:b4cb:2e8c with SMTP id v19-20020a056a2012d300b00154b4cb2e8cmr3924187pzg.24.1701794560361; Tue, 05 Dec 2023 08:42:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701794560; cv=none; d=google.com; s=arc-20160816; b=JdvlSt6rrxPOpSYzK8jhcf9XcJ6cp8i5iS454LBMUa8Gsg+ZkslWdD549KZasXDYO2 aFsPvdmRykkO2ObsetL00j0EjU0EXvcb2QU0X676H733Jymvdq+SHTRBtbrjv/9W/wMq E/v2I3Nxj9ZzhlNWniZ7aHxolUFIBmWwPWmE0cpFEp7hXSiw/Ax/Ot9l09mmDAPO8w7x hTXyGmTLhO3CmTHdwpogXX77bNsqLt61RMuagOi+5P5TfrOoHNfL5j4ARfQcfDiJa8Ie XbMipbOX2CVy2xs15nQwiXT3hkBClAAGKs0tX17lYTQ/P8QihEDzImi+CgWiB0j+FcHp e7CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Pjdtv/qvcvmV2FJZ6UPMjLsxM4qKAp4v+YD1JDpGKIs=; fh=JBV+SmA05k12BmnkvNrYeJGQ5m3DPnyHstdyt9/6DB4=; b=IBbqLEFYNUrQ6UAotbQoDL6/7GU1/kAtBzCnJLguYXSIvQERkhGSwKkH0Mtd9aMenM wpR8Td6ix4FTShYccaE1yvStOzqcUtLzmPQ3hGruw/H8b6lQzQrA9Dk0yqx1GI05BvgQ tt/NuynuiYlEsITmikatJZneWTvxYutaBpzQV4hAScM8cDSlZKFZtMja2TDXXQHMcI+c NQL82s1bbutEpeM8ngecO70tbiNgX8NRNuesMnXpW//WqWNngu6VTJJtAmgAl8T7S8EP D3ySl2rq2XOFtXFnvyF9xNjNTrvd/IceASWbSxs8tDU/mrHsrr4A04dB9cHeZRkTkeo2 5D9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y2Qs3m+j; spf=pass (google.com: domain of linux-crypto+bounces-577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gt9-20020a17090af2c900b0028672a7b3casi5576314pjb.29.2023.12.05.08.42.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 08:42:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y2Qs3m+j; spf=pass (google.com: domain of linux-crypto+bounces-577-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-crypto+bounces-577-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2D6A4280E93 for ; Tue, 5 Dec 2023 16:42:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA4725E0D2 for ; Tue, 5 Dec 2023 16:42:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Y2Qs3m+j" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 454EF1A5 for ; Tue, 5 Dec 2023 06:43:22 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1b6b65923eso321342466b.3 for ; Tue, 05 Dec 2023 06:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701787401; x=1702392201; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Pjdtv/qvcvmV2FJZ6UPMjLsxM4qKAp4v+YD1JDpGKIs=; b=Y2Qs3m+jCk/6Xiqq1HmdzpsfbONVCvtgN70xwXKmjkw+7HKBpIfaxMwyI/XToN3aP6 IAkqjtBQtvG+ouJnWMbaYRhR/qK/9ARHqRk4D30ZeRwp16MZrGW9F+jRbmckCBCrF3t0 5mJaJjVWbhCVk2AbmwK4nn9I6pR6AWGFmoDclZxQyr2/EOiUXPkIlHhsy4RzJAcWdHwJ y22gcmwNAHG8waoGzOpnqIPnW1+c2XC+0xJSa5/NAlD33QQAh7cY83bxxyM39p+fWOsI F4rSp+s7U52BSnuHh/ZQu+DZj1hJT7nL9XUByv1mp1dfYGSl5jNmMbE+aS1RSZSwVBlj auSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701787401; x=1702392201; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Pjdtv/qvcvmV2FJZ6UPMjLsxM4qKAp4v+YD1JDpGKIs=; b=ZWmfQ27d9bTaDQJekwxsa3uuUsZcb+CARnvFz5bg/gqiF1eBGH/P+FX+s1PawSAovj e57TgHkM2v+3DXaAGZP4BZOxtfzKUnONraJAMgxhV2xTsz+7W+OLmWA3SbY1v2HYTWuE jnFeg9Og6iPTnjdmUMMnqutaGAZ+7koGtJ9cUNFSSSrD5p21yWlY4rTgM1YQpA62ZOST GgfHsp+DvSD+04LqaCWfO/3d7fpeV81VheNELXz13Hxtdb02iJbnzk4Xt8jsSQMVYxVG 15NdWW3RQBTrk4orTWV4pa7UOhT9IWBpoX1WpIRqcD72uHgfdM0ZBdZGVxfcUqo5rFhh zcBQ== X-Gm-Message-State: AOJu0YxVl8+Wm4BVcagPdZRk69HmgE5bKMibptmetIlKUF5N0JoSJMUX nFCY8GKMpidVzqZJ51pKTn6gyxuQoodjcwaA+N8= X-Received: by 2002:a17:906:3f4f:b0:a19:a19b:4264 with SMTP id f15-20020a1709063f4f00b00a19a19b4264mr306280ejj.207.1701787400500; Tue, 05 Dec 2023 06:43:20 -0800 (PST) Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <5a0e8b44-6feb-b489-cdea-e3be3811804a@linux.alibaba.com> <649a3bc4-58bb-1dc8-85fb-a56e47b3d5c9@linux.alibaba.com> <275f025d-e2f1-eaff-6af1-e909d370cee0@linux.alibaba.com> <8597c64c-d26a-8073-9d00-b629bbb0ee33@linux.alibaba.com> In-Reply-To: <8597c64c-d26a-8073-9d00-b629bbb0ee33@linux.alibaba.com> From: Juhyung Park Date: Tue, 5 Dec 2023 23:43:09 +0900 Message-ID: Subject: Re: Weird EROFS data corruption To: Gao Xiang Cc: Gao Xiang , linux-erofs@lists.ozlabs.org, linux-f2fs-devel@lists.sourceforge.net, linux-crypto@vger.kernel.org, Yann Collet Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 5, 2023 at 11:34=E2=80=AFPM Gao Xiang wrote: > > > > On 2023/12/5 22:23, Juhyung Park wrote: > > Hi Gao, > > > > On Tue, Dec 5, 2023 at 4:32=E2=80=AFPM Gao Xiang wrote: > >> > >> Hi Juhyung, > >> > >> On 2023/12/4 11:41, Juhyung Park wrote: > >> > >> ... > >>> > >>>> > >>>> - Could you share the full message about the output of `lscpu`? > >>> > >>> Sure: > >>> > >>> Architecture: x86_64 > >>> CPU op-mode(s): 32-bit, 64-bit > >>> Address sizes: 39 bits physical, 48 bits virtual > >>> Byte Order: Little Endian > >>> CPU(s): 8 > >>> On-line CPU(s) list: 0-7 > >>> Vendor ID: GenuineIntel > >>> BIOS Vendor ID: Intel(R) Corporation > >>> Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.0= 0GHz > >>> BIOS Model name: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.0= 0GHz None CPU > >>> @ 3.0GHz > >>> BIOS CPU family: 198 > >>> CPU family: 6 > >>> Model: 140 > >>> Thread(s) per core: 2 > >>> Core(s) per socket: 4 > >>> Socket(s): 1 > >>> Stepping: 1 > >>> CPU(s) scaling MHz: 60% > >>> CPU max MHz: 4800.0000 > >>> CPU min MHz: 400.0000 > >>> BogoMIPS: 5990.40 > >>> Flags: fpu vme de pse tsc msr pae mce cx8 apic se= p mtrr pge mc > >>> a cmov pat pse36 clflush dts acpi mmx fxsr= sse sse2 ss > >>> ht tm pbe syscall nx pdpe1gb rdtscp lm con= stant_tsc art > >>> arch_perfmon pebs bts rep_good nopl xtopo= logy nonstop_ > >>> tsc cpuid aperfmperf tsc_known_freq pni pc= lmulqdq dtes6 > >>> 4 monitor ds_cpl vmx smx est tm2 ssse3 sdb= g fma cx16 xt > >>> pr pdcm pcid sse4_1 sse4_2 x2apic movbe po= pcnt tsc_dead > >>> line_timer aes xsave avx f16c rdrand lahf_= lm abm 3dnowp > >>> refetch cpuid_fault epb cat_l2 cdp_l2 ssbd= ibrs ibpb st > >>> ibp ibrs_enhanced tpr_shadow flexpriority = ept vpid ept_ > >>> ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2= erms invpcid > >>> rdt_a avx512f avx512dq rdseed adx smap av= x512ifma clfl > >>> ushopt clwb intel_pt avx512cd sha_ni avx51= 2bw avx512vl > >>> xsaveopt xsavec xgetbv1 xsaves split_lock_= detect dtherm > >>> ida arat pln pts hwp hwp_notify hwp_act_w= indow hwp_epp > >>> hwp_pkg_req vnmi avx512vbmi umip pku ospk= e avx512_vbmi > >>> 2 gfni vaes vpclmulqdq avx512_vnni avx512_= bitalg tme av > >>> x512_vpopcntdq rdpid movdiri movdir64b fsr= m avx512_vp2i > >> > >> Sigh, I've been thinking. Here FSRM is the most significant differenc= e between > >> our environments, could you only try the following diff to see if ther= e's any > >> difference anymore? (without the previous disable patch.) > >> > >> diff --git a/arch/x86/lib/memmove_64.S b/arch/x86/lib/memmove_64.S > >> index 1b60ae81ecd8..1b52a913233c 100644 > >> --- a/arch/x86/lib/memmove_64.S > >> +++ b/arch/x86/lib/memmove_64.S > >> @@ -41,9 +41,7 @@ SYM_FUNC_START(__memmove) > >> #define CHECK_LEN cmp $0x20, %rdx; jb 1f > >> #define MEMMOVE_BYTES movq %rdx, %rcx; rep movsb; RET > >> .Lmemmove_begin_forward: > >> - ALTERNATIVE_2 __stringify(CHECK_LEN), \ > >> - __stringify(CHECK_LEN; MEMMOVE_BYTES), X86_FEATU= RE_ERMS, \ > >> - __stringify(MEMMOVE_BYTES), X86_FEATURE_FSRM > >> + CHECK_LEN > >> > >> /* > >> * movsq instruction have many startup latency > > > > Yup, that also seems to fix it. > > Are we looking at a potential memmove issue? > > I'm still analyzing this behavior as well as the root cause and > I will also try to get a recent cloud server with FSRM myself > to find more clues. Down the rabbit hole we go... Let me know if you have trouble getting an instance with FSRM. I'll see what I can do. > > Thanks, > Gao Xiang