Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2252741rbb; Tue, 27 Feb 2024 16:24:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+dxnEjasXhnoCgGolBJaytOZf33bq+C5Q8B/hS/Z1px9OEMWfwwufW0l1tsBfAIdyIjeJFyfrLO5LUnRdMNURW8r0MiFIWvQ41k7i6g== X-Google-Smtp-Source: AGHT+IE3VkpRVQcGtTKx0ULuqjleHtcmseoleqZ/mNosHIEbsyl3S8OEZcR4Egv1rWQNv/vZBnUC X-Received: by 2002:a05:6830:3b0d:b0:6e4:8a4e:6d6 with SMTP id dk13-20020a0568303b0d00b006e48a4e06d6mr11563529otb.21.1709079857207; Tue, 27 Feb 2024 16:24:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709079857; cv=pass; d=google.com; s=arc-20160816; b=LvRsP9qimnbAgPfuVenrTJaak5p14e+mj+0bQlOLOqPNRWdRm8GlHUAs8y8Fycm1Ka Wm9pfczFoud9lGeyG2pCiA0US0T/WrEL40Nh5JsB3z6HpPWoFANDUOMYIRiyYvVOpy+M +D/VZG2pRYAM6c44g3+AXus40au3ekiF/U4etIJn4lhCvo7W2GNxKwp1vuMBR1/THTP6 4Bt5nfUsc9RoTe1YoshsXjqQ5iI0tpoBpurOcggSetT0SWRv+Ed3mrhe3y95Dxfjk/JM MTQiOcB2I2KBbApGDNlxoFVRUXTFOrsBn3YC50mZOinpq1xB3ZYgiXx4drkYkc62BT9d 7ZXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w6iv04Dkt7tZFI9zaXahrycahhIwPU4ZPmiteAipA/o=; fh=lV2llsrrTDyPZCY2X6VzwwciLShWSh5hj0V4eenC5qE=; b=q0XtCeiEPIEZylre//LdPDDHvU+371oZDJGfmPCNi8dPYhPGOez8HU4+B1IEh8cFU3 BujE4e42cdFMaH8suRvEYH72/LOV9+ugza3wRYNMd+5LNdeVH6lenXllP8kPxa4b5y1R ef3Vpv9K7U+wc7Zj+VxhOYGPwg4y4uB1n3W8sHgJRrJtKrA4lc6uSM71f9+WaxYr7Ea5 sNoayEcnhlai6yY0RNKy3tduu0y4ebrVftDJY3q0GHwAVrwCkwjbppwc5FeODuBArGzd r+wFP4tvp6DNgiVlYFL5UolyqfPJ0rvxmsRbq3XwgdpJR9c7e0K9n29B136Y/J4kZ6Ba 2STA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="G0olBR/7"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-84268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84268-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i64-20020a639d43000000b005d5d32bf0cbsi6294618pgd.463.2024.02.27.16.24.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 16:24:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84268-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=@rivosinc-com.20230601.gappssmtp.com header.s=20230601 header.b="G0olBR/7"; arc=pass (i=1 spf=pass spfdomain=rivosinc.com dkim=pass dkdomain=rivosinc-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-84268-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84268-linux.lists.archive=gmail.com@vger.kernel.org" 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 D92432817C0 for ; Wed, 28 Feb 2024 00:24:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB5027E8; Wed, 28 Feb 2024 00:24:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="G0olBR/7" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B825184 for ; Wed, 28 Feb 2024 00:24:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709079850; cv=none; b=lY9MeW3XQ23ekhV5N++qJ2Qj/2BHPpLz/KkF0eUqaLcL/itFEnDTwCCBtJY1Aa2yhfrSK7wyOSPVRUNVbr6yMkre+VTxESuSzMBCMWdD+8BaDjtEEqrqDwCFr4pRgUNVTSwHOwi670m3ekFW/2wx0qAXY8O88wZ0kmT0CrhAp28= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709079850; c=relaxed/simple; bh=3SsDuWj0X+1CAlviyNiAM5PZ4YHxEQBBVSH2FuLqqgM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eI0eOdObAxBwrhX6ERWTTAYmk0Opd9vvJY4ZMP3fA/67f6I0l3KdEdrERohH6yoG9w6rowXMDzI7jP7nHNDBqv9HgCB69zvkfSNfOE/ux8WKiFsxzxiNZKvMpwn9HcDojJbk5qquCm4nujepvUCQ5pHo3lrgZ3E37OkKAAvLNqM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=G0olBR/7; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1dc49b00bdbso43686565ad.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=vger.kernel.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=G0olBR/7e36rt2d8DBvM6QRXSoQaLq38eXjELJZGkd5cr0SAmBB6yQyZp3b5Dpvk2e a+rmpjaEnPI6GocBmy21Dhyw2iAvQVwrr69oRHehj8ZzooPCv9PJVYMWGk9ZZRjEe57U J8VqQWlwc7U0cADNm+uvsF/UaXxBk/ZB6Is0x7fOFwSc8T8vn29QcDWdjYYmV15MAOiu ht22KMcc5X5Svkmy2HDDx2FFchqQitCVDu9KFjJnBoGtb4pH6p205LocyyYR7jEK5x/0 S7/W4oV1q920wOto+n0fNExRNP+nNV+psvyNPH5SQOnfEOD1Hra6rm6s2/OXh/3cxY9w 2/kQ== 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=Gc2Mh9U6u+OhKhq9j+bJ5m48YUbB4Ey9GeGObkl+/N/507/tut2JalPGtS8qLBI7h+ MwyS5Z42NJ8OiTfy6P6pBY0DyvYUh5pHYqgiPAyVvaVQTHaBaLzgS6kttNiC+WWpVDw2 WrjKZd+kpzjypkynuH9WvU4PpAeicWGW2KLoakYYSdbBU8c/HvelmGznuEq5aI+H1ejw efDD8BoG3bg13ndOadYJhKzqxW7KpuNJW+1vy5p2OQTECOIGk2cO7EnV1ok4T6BPa7jL czb6se366s+uI6ZwlbyELGaNnnYeY3FhBefSq3EYhGe8hpnXsyVlQBXMnDbZl+dFqwcl WQ4g== X-Forwarded-Encrypted: i=1; AJvYcCWlJ3zsUVA0AlLZqnZGMSPHFuxNDMymLsr2rWl4V5FNI8EINH19nE5j3vs2MBC5IYWbZBAMyLB5/eiHSAM/WytDofBc3m5iD+hpONL8 X-Gm-Message-State: AOJu0Yy1KVI/NbrVQlzyx74RFhc6dIyRR6bVAircvOVSti0+PvbZPeGu 4iOAwUW5yUKE9ft/Blk8UDZONCmF5btwr+3jAxw9xzeVKLzpuBoPYyMBaRIuyns= 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d5ce145-22be-4683-b3a9-4de77da87b76@roeck-us.net> 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 >