Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp470426rdb; Mon, 22 Jan 2024 09:39:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhM5MVm0cs2LO+LjiXIhqR/pdEourohp6IQXz0Ij7ex1YS72TLrL9nYhdrnqXj3qRitePL X-Received: by 2002:ac8:588a:0:b0:429:912e:b5ad with SMTP id t10-20020ac8588a000000b00429912eb5admr7702190qta.122.1705945148708; Mon, 22 Jan 2024 09:39:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705945148; cv=pass; d=google.com; s=arc-20160816; b=lZ1jHRKc7CxmXcvS+KL6UK7a+f8eXZM3uJ9i61wJq29er2kOWX1QwQ7NeJlMtH6idF Xg2KgeP615CczuIqX0NOKnO8vKsDt8sLekixjPDuDID0rdMu15SBXs6dQvULLXR1cHtB govxNDl8wjXa4mt6JxcEOHIcoC9KStODGTDy1W6kasWe5NDAGvJDCOW+foNpuWga/eg4 QGS9T+84Tr9ZQlpjQZFaFe66xaHGhYVb2Jk4qEnwVb/OxVfGNWKDep7+q3djxvFtyTN7 6VRjn6vXH+MmFMpHJJp7+i7zO6ylId2HIrSuTGyBD11K8SSP/N78tcc6/1kM/zXvxi3S iuRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=Rq8pJCuYlllgrzK0bNR37+PauwhC06AJkVrgDVrkzdM=; fh=t4I9oafW+1e3Kk5KDClk+yRxqZ/RM4+abdv/QjJGMjA=; b=lbsKd98cOkciK4nrP2QknLCij9781aKhR7rcAfcd0ZLJvmt7iaWc5Qx9AUIj+SYETv 2pGQqVWUmDYcCGtQ6Njobs83nq8vdw+S3NBaUMA0/dZksgqYISp0bjkR+iWaAv2zrbFi DIl7ANP26+Vzfaxhf6E6hbJssl/Cwsy3k10kJ722ejiDlBnmWZ62yu4GmNmL7KC7XbtM dCKVXIXl2Bj9JQIDJjCFrEWyNNchl2cX7kw1f/ZSgsf3xeQxgSVN1zSQwR8zy8omeILd C8RdOyN5zFfKabp79DT8ZZoaynXrP8iQPVofNjRK5eeXjhBa8/ixRuUTmksP4ho5TuPL +lvg== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-33728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g4-20020ac85d44000000b00429cc8cda03si6175951qtx.420.2024.01.22.09.39.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 09:39:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-33728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 783041C22EEB for ; Mon, 22 Jan 2024 17:39:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA35B41771; Mon, 22 Jan 2024 16:53:14 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45BD63FB39 for ; Mon, 22 Jan 2024 16:53:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.85.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705942394; cv=none; b=YN9TysQm4NQsb8Yc9irj/GXOQXUD4VFEGktUmETV9fusS9/E4rGWkj4AiBb4JAeUip0Rjh3jAnma2ptSkoADrYfGLq8CtINyPYzbtpx+q/g0wdAgWKVkgCwfIrYE50rKkGEg0I7qkcY3C9O04qVk/76bIA0uPVEIyFl4n4FVFTY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705942394; c=relaxed/simple; bh=yB3S6jwurrEU9VAq2uFfd3p+Gn+5Y72CDpba3esPKqE=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=MO9JCiHk+12kkKtJ0ie+JNZPF7wydX7Enlr1haQgGB/b3dT++JLQReqtG09xgJwLs5n5EgSUtPSJvPtV3OQlUQYEE7YtCqcuwpwGNdHpv4w5niOKYIqN5yC72RCPz6QXyRm5oNipuf02QOPnlu4FYw3Yr6TTxq6Z4tm+eZnxvh8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.85.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-258-veqgJaI3Peyfp47kXADBow-1; Mon, 22 Jan 2024 16:53:09 +0000 X-MC-Unique: veqgJaI3Peyfp47kXADBow-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 22 Jan 2024 16:52:42 +0000 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Mon, 22 Jan 2024 16:52:42 +0000 From: David Laight To: 'Guenter Roeck' , Charlie Jenkins CC: Palmer Dabbelt , Conor Dooley , Samuel Holland , Xiao Wang , Evan Green , Guo Ren , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "linux-arch@vger.kernel.org" , Paul Walmsley , Albert Ou , Arnd Bergmann Subject: RE: [PATCH v15 5/5] kunit: Add tests for csum_ipv6_magic and ip_fast_csum Thread-Topic: [PATCH v15 5/5] kunit: Add tests for csum_ipv6_magic and ip_fast_csum Thread-Index: AQHaTVGn8AUolzpWZEe7KQadoytUPLDmCvsQ Date: Mon, 22 Jan 2024 16:52:42 +0000 Message-ID: <6b0dc20f392c488a9080651a2a2cd4bd@AcuMS.aculab.com> References: <20240108-optimize_checksum-v15-0-1c50de5f2167@rivosinc.com> <20240108-optimize_checksum-v15-5-1c50de5f2167@rivosinc.com> <2c8e98b6-336e-4bc7-81ba-5a4d35ac868a@roeck-us.net> In-Reply-To: <2c8e98b6-336e-4bc7-81ba-5a4d35ac868a@roeck-us.net> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Guenter Roeck > Sent: 22 January 2024 16:40 >=20 > Hi, >=20 > On Mon, Jan 08, 2024 at 03:57:06PM -0800, Charlie Jenkins wrote: > > Supplement existing checksum tests with tests for csum_ipv6_magic and > > ip_fast_csum. > > > > Signed-off-by: Charlie Jenkins > > --- >=20 > With this patch in the tree, the arm:mps2-an385 qemu emulation gets a bad= hiccup. >=20 > [ 1.839556] Unhandled exception: IPSR =3D 00000006 LR =3D fffffff1 > [ 1.839804] CPU: 0 PID: 164 Comm: kunit_try_catch Tainted: G = N 6.8.0-rc1 #1 > [ 1.839948] Hardware name: Generic DT based system > [ 1.840062] PC is at __csum_ipv6_magic+0x8/0xb4 > [ 1.840408] LR is at test_csum_ipv6_magic+0x3d/0xa4 > [ 1.840493] pc : [<21212f34>] lr : [<21117fd5>] psr: 0100020b > [ 1.840586] sp : 2180bebc ip : 46c7f0d2 fp : 21275b38 > [ 1.840664] r10: 21276b60 r9 : 21275b28 r8 : 21465cfc > [ 1.840751] r7 : 00003085 r6 : 21275b4e r5 : 2138702c r4 : 00000001 > [ 1.840847] r3 : 2c000000 r2 : 1ac7f0d2 r1 : 21275b39 r0 : 21275b29 > [ 1.840942] xPSR: 0100020b >=20 > This translates to: >=20 > PC is at __csum_ipv6_magic (arch/arm/lib/csumipv6.S:15) > LR is at test_csum_ipv6_magic (./arch/arm/include/asm/checksum.h:60 > ./arch/arm/include/asm/checksum.h:163 lib/checksum_kunit.c:617) >=20 > Obviously I can not say if this is a problem with qemu or a problem with > the Linux kernel. Given that, and the presumably low interest in > running mps2-an385 with Linux, I'll simply disable that test. Just take > it as a heads up that there _may_ be a problem with this on arm > nommu systems. Can you drop in a disassembly of __csum_ipv6_magic ? Actually I think it is: ENTRY(__csum_ipv6_magic) =09=09str=09lr, [sp, #-4]! =09=09adds=09ip, r2, r3 =09=09ldmia=09r1, {r1 - r3, lr} So the fault is (probably) a misaligned ldmia ? Are they ever supported? =09David =09=09adcs=09ip, ip, r1 =09=09adcs=09ip, ip, r2 =09=09adcs=09ip, ip, r3 =09=09adcs=09ip, ip, lr =09=09ldmia=09r0, {r0 - r3} =09=09adcs=09r0, ip, r0 =09=09adcs=09r0, r0, r1 =09=09adcs=09r0, r0, r2 =09=09ldr=09r2, [sp, #4] =09=09adcs=09r0, r0, r3 =09=09adcs=09r0, r0, r2 =09=09adcs=09r0, r0, #0 =09=09ldmfd=09sp!, {pc} ENDPROC(__csum_ipv6_magic) - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)