From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E30BC54798 for ; Wed, 28 Feb 2024 00:24:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=NxFa+ND6cxXAxW6b0brIU6/2yB0GXzBs21kkRR6vBfk=; b=n6SAwDTxyWRC43 h55uwRB8KAcpS3UsRi/FGj3a2AdVWSwb8UfmOQNAT6AIiEImRlOF938/pDh/Z+eTW6sYzH+6ou0fZ MQ6JQdXukIFw8i3y+5MnWv00rUaX31hqgbqQhmVpnpZz5o8Oe54IdnKT1vGN9okH51tAbki1XYRix YiNdVzv2fjVzPfQAYV/56fXy+/D/4sol7ijnazgvQYvKds0jR7Qqo1sR/lGQQWhQF/DIhIM3OHnLo X4yJybBeoQ16scv3jxx/WVaqfdrMKiyXTO6g0KIZo8ziNxkFB+/I8eoyMLKTi9heTAeFDxxhP5LNi 4iGxAAFOBfeN+LRWWdTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf7k3-00000007Nsp-20rc; Wed, 28 Feb 2024 00:24:11 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf7k1-00000007NsA-05ak for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2024 00:24:10 +0000 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1dc49b00bdbso43686575ad.3 for ; Tue, 27 Feb 2024 16:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1709079848; x=1709684648; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=w6iv04Dkt7tZFI9zaXahrycahhIwPU4ZPmiteAipA/o=; b=xLYNg0IEV2MWAc+Oqrh5Ioyc3kYlnlbp9+352ieK2zAaq9I4/y5PZv+lWSq11S0TpT Bd4T5ipXgSzn5BL1vGkZRnP3gyHgKMKqERICunZakoU/YYKYuLXV7hfdSVGWtPTf+1Iw GMbgEGid0elrbDAB0XI7DlM0JMh8LSCZzwM+51W057Ax+G+mXPZO8ysLSNTloz9yyG0L g/ggU4MmErc2++HZJjyGFiEF1/bNTkv7uZZJ/4PYDBmeMGGk8GTsLjp82MoGTxP11teL miCTiibGlfBMewKA8p9nf9dM8J8q/ypTtfvbJ3+VbBFwlJo6VlKaQik6dzTgSLB4SAND i+9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709079848; x=1709684648; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=w6iv04Dkt7tZFI9zaXahrycahhIwPU4ZPmiteAipA/o=; b=kpA6/SCUyEcwziC5HA6qcRSJQcDygNwhz59y8zxuF99p3spXXn9VL2qsiLHakVNsZg viTqCO5bGR4vuw6R4W3awICoBuf2IShRvw4QvHmhUR3ZrHT+oowPx7X3FcnO3sgoVhMV nfPmpn730ioynfKHIaZeWpJ0/RrvENTa/mpw7akm17VGkb6h0L3G4s4Ij/TOpOI7Z6D9 KtUa8irjLmvVAP16AU2c3jEa5S3Todg4K1kLCiJ+gEH12Ro7of+slZye7yHgoVFRYhMj Ecfuf29EytwgC4/ueTvLlRU70MeMlrj8yMmJVNYc2aKYs/fX+j5fk4gSvWu6MX6oZe+I DR7A== X-Forwarded-Encrypted: i=1; AJvYcCXF+WSfCFhNlXKPGRxg5b646HEyR4uImTu/EjDgWp1X5C+5QNUfJeFsixIpZF1B7orCs5pR1rnTcp2VjeidWoVd5eiVpfI+MFvQGCFQmbbhpeDlhJ8= X-Gm-Message-State: AOJu0YxdgNWQr+jlmOHxmn59g3y5mT/TneXIfhvD+osd301vV+ktVXUq BDQitqSXTGSZjEqhKPcGmJKzB4kIYkOf06Q9gyNfS5lSXAJTt6+9wC6hDgoZcqw= X-Google-Smtp-Source: AGHT+IGLMc9uRF3ZVwoUIS1lRxMHgDIj4ey00zVGV9uFOoNEBv0/G2IIu30jCPmEe06WY5C3nNKZ5g== X-Received: by 2002:a17:903:2310:b0:1dc:418f:890b with SMTP id d16-20020a170903231000b001dc418f890bmr13941783plh.40.1709079847965; Tue, 27 Feb 2024 16:24:07 -0800 (PST) Received: from ghost ([50.213.54.97]) by smtp.gmail.com with ESMTPSA id mh13-20020a17090309cd00b001dc9893b03bsm2105835plb.272.2024.02.27.16.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 16:24:07 -0800 (PST) Date: Tue, 27 Feb 2024 16:24:05 -0800 From: Charlie Jenkins To: Guenter Roeck Cc: Christophe Leroy , "Russell King (Oracle)" , David Laight , Palmer Dabbelt , Andrew Morton , Helge Deller , "James E.J. Bottomley" , Parisc List , Arnd Bergmann , "linux-kernel@vger.kernel.org" , Palmer Dabbelt , Linux ARM Subject: Re: [PATCH v10] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Message-ID: References: <9b4ce664-3ddb-4789-9d5d-8824f9089c48@csgroup.eu> <4d5ce145-22be-4683-b3a9-4de77da87b76@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4d5ce145-22be-4683-b3a9-4de77da87b76@roeck-us.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_162409_098397_77BCD83D X-CRM114-Status: GOOD ( 30.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 27, 2024 at 11:31:01AM -0800, Guenter Roeck wrote: > On 2/27/24 09:54, Charlie Jenkins wrote: > > > > It's been suggested during the discussion that alignment tests should be > > > added later in a follow-up patch. So for the time being I'm trying to > > > find a compromise and get the existing tests working on all platforms > > > but with a smaller alignment than the 16-bytes alignment brought by > > > Charlie's v10 patch. And a 4 bytes alignment seemed to me to be a good > > > compromise for this fix. The idea is also to make the fix as minimal as > > > possible, unlike Charlie's patch that is churning up the tests quite > > > heavily. > > > > Do you have a list of platforms this is failing on? I haven't seen any > > reports that haven't been fixed. > > > > This is what I carry locally on top of v6.8-rc6: > > 097b149e4acb parisc: More csum_ipv6_magic fixes > 15bf67a115eb kunit: Fix again checksum tests on big endian CPUs > bebe776d36ea parisc: Fix csum_ipv6_magic on 64-bit systems > 523208f03063 parisc: Fix csum_ipv6_magic on 32-bit systems > a9dda1971c72 parisc: Fix ip_fast_csum > 2ad0a6850b64 Revert "sh: Handle calling csum_partial with misaligned data" > 7113cc414860 lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests > > I also have > 0dd01a364cb7 lib: checksum: Add some corner cases to IPv6 checksum tests > e767cce6598b lib: checksum: Add tests for unaligned IPv6 addresses > > which I may submit or not depending on the outcome of this discussion. > > In other words, parisc and sh4 are currently known to be broken in the > upstream kernel, with fixes pending. On top of that, arm:mps2-an385 > (probably all arm:nommu systems) crashes hard if csum_ipv6_magic() > is called with an unaligned address. > > This is the "known" list of failures. I don't currently run kunit tests > on nios2 or riscv32, for example, nor on any architectures with no qemu > support. > > On a side note, most architectures don't handle "len + proto" overflows. > While 'len' is a 32-bit parameter, IPv6 only allows for a 16-bit length > field. Many implementations of csum_ipv6_magic() specifically do > not handle such overflows because that would be pointless and require > extra code for no good reason. The current test code doesn't generate > such overflows, but its 'len' parameter is almost always larger than > 16 bit and thus not realistic. Maybe it would make sense to limit > the range of 'len' to 16 bit when calling csum_ipv6_magic(). Thank you for the suggestion, I can limit len to 16-bit. - Charlie > > Thanks, > Guenter > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel