Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2101697rdb; Sun, 11 Feb 2024 11:18:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUflhoEums3E+spnYxacyROv9KBNzcaUsNsM3BofMwyqT3SSndtdUOz8cuBSH6JpZ+9qA/oJfPvl0KRjxvbo7vGRvtjuvZWtmfhYm3Yvw== X-Google-Smtp-Source: AGHT+IGoxJFmEm2XMVvFFL29/6tjNwSJTvFa1celL8N+eUwLQlEgJcLW9pQmkEApuUHqM3bt0+8J X-Received: by 2002:ac8:5fd2:0:b0:42c:40c6:fbfc with SMTP id k18-20020ac85fd2000000b0042c40c6fbfcmr5906006qta.47.1707679129013; Sun, 11 Feb 2024 11:18:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707679129; cv=pass; d=google.com; s=arc-20160816; b=yu2wQvX6j80PHvURnrXfApt+sE/E85iZGliBfilp2OtROgtWuDenr+C1gPUPOwy3YC UuCsPBp8EOAT0AH2590Q/hmCmlpuoXIKP+C+z65Q8uyNF4F7fFXqToMBIKzyPi7hfEO4 r2dmue46YN/6Dp8s6JfqoIAaRHV7qQ6oSOh7QdtM6nTF5LvDN3IepAYZ08IWWm2Gad+/ u8ZQHJ+8SXdAdPHtdVOCPUBnwgVrJM75bcdgj/aE1Z0oh1TM227G9XSweI/K+e9nDSGI x0eI3EXNqQ5ANOehO9S1TRPj1HG+wvNLH3OuWy+pAMYgGlHGc6y6abO2C/ImnmSIuqEq MS5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :sender:dkim-signature; bh=cRkVOjU7WU0Jq+yFh/n1COxy02/3/eY9g+NJ805i30A=; fh=lcBcyM4E4wG3p9cOtflCP6mbtdhpOM6DGl/YjnOE5wM=; b=QB+AjvkFiFnZ15z9VGiHcDdp4WcDR65RxX7I4BQAj9USQaN/qjIXBt4zI2xpbkjLjg /FJBmfwcrAhMM2HEYz6RjEGJmD8ZTgPR1HCx+/3Sne+ttIJtM9AGOGwmmHKacKOMbG9K aqG1S7wj8nlebNtofzJ8c4Wutfh3IFftbTpb7G+aUgFVTgm1YYlcj9edjtgZ4i39PSZ1 DapjEP6X3Vtp4WiFiYjfHxuQFuxqaDTQmzSu3exiLa63IS5LnkwqZF0/I1lfdzEMkviD zGUyHWisTk/b7Xfy/ES+D2jfZre/VZCNnStAP3OBbNqIbCnHbHrmryPNKrf8O/JCQYUw TQmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PCr2wFxp; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60925-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCUM3Q8cPN+0i97NmNg1YriiO0AC8PQqXdlpbLUwzA+f42BuuKPa/32uCCBaNi0OeeRshGB98IxatF1CPiGLq4tcrORaT9T1TyrF2UBEXg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i21-20020ac84895000000b0042c607e4798si4776161qtq.468.2024.02.11.11.18.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Feb 2024 11:18:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PCr2wFxp; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60925-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60925-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B3FEC1C22009 for ; Sun, 11 Feb 2024 19:18:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C28C5D73B; Sun, 11 Feb 2024 19:18:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PCr2wFxp" Received: from mail-ot1-f41.google.com (mail-ot1-f41.google.com [209.85.210.41]) (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 6BB52AD2D for ; Sun, 11 Feb 2024 19:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707679122; cv=none; b=rwZimYDWc218DmuFwuY32fdUXH5d+hbJ9xH9uefZgrM2mnZdVoNEH8HoA2136InCP/xG0/dCtBwu4rQUuznkODSISPmDzg+JNi7WAtNYZXwnz00amqdHfY6lqjd5nyyJA5D3+AIeiUWrxLj/iM/nUtjpjniTWsNeS2O9Re/kaGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707679122; c=relaxed/simple; bh=09l88D3wdDMStgGJN63G2XYzcoiJ/QSRvkyCaSfdbWw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Gu9znuMGhR5keDhGMq33zrzHdBz1Lj/mIsZvJZNeIPPJeFD5mlaYzD9O6inFxOS7nRE85SjO210oPax7yy4tOaNrOm3ra3iXkwGwsRnyBbEeaL2KfpEiqrKcUSLp46PNt7bVMjOF2DbFYPP4ogSz7j6zv5Mp3Sbci3D3Xju0SGA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=PCr2wFxp; arc=none smtp.client-ip=209.85.210.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-6e2e452c852so252224a34.3 for ; Sun, 11 Feb 2024 11:18:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707679119; x=1708283919; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=cRkVOjU7WU0Jq+yFh/n1COxy02/3/eY9g+NJ805i30A=; b=PCr2wFxpVGMKhlh8ingSTbdCE6wVfLQxiUwMDNliyxrbf17ufpn1IoUV3/vh1dxOWD p6SWDZJq0/gWrn8nSGQbx79p+AnjLNdyYq/9NTnCXUnndsGERr0tZ94PZu7RJO2ejwDI bc6jL1hx1EgEVaZaI9C5Gc0M5ZotKvziWSy6veiJnE9Uo6toWVnUd55qCa0FDau62roE S/1PzyxO4riAcB1fepV3oyjV5MIfzN41BiXgl82SbWqKKcVbzSioBtJSSg9Dqr4yi9j8 ibOsGy1A/1YNhCxeRAX0WoZbkh3UsNiPrFapa4IvTBNT7FijBcpmm6MhEiX+s1xbIYuC BJ7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707679119; x=1708283919; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cRkVOjU7WU0Jq+yFh/n1COxy02/3/eY9g+NJ805i30A=; b=kZDbFekOxqJtf0AlRTt7iItfXjJi8EOC3IIhqog29uTs+WA++bMcajASdmO7QL2JsO 8ivwYGBzwN4D5Pe4fvjhYoTcIZcEA85EgD61GnSHPDLHXHgLygz0xidpcmpb2ZLPLTdS wulNs89uyW0ZV2WCXZShrXIHywnrBF6oWO4cRHNKyRc26Ebf2DnLLInfakimY8FgHIx0 er1g8+s85kECUORe10ZsfmZRL6BqFHdqoGC3vLEshueMwUSsDUhU3w2jdhN5hXlOEZIQ 2D/WJgobWSS3ZsK2qpnqybUOgXrYr1mFbaOU1q6lsGYHfEgQpBm9seFxK3f2840yBhvq Ys8w== X-Gm-Message-State: AOJu0YwFUzwgSId3y5Aae8OXUsjMWpxsXiEc9x0qtEE4pfqKnNHqE0px VGOGoRSZgaHLQkwkdhVcECp2jRlezztNG3YbfGxU9Nrp8MmMIkwO X-Received: by 2002:a05:6358:4316:b0:178:72b5:cf49 with SMTP id r22-20020a056358431600b0017872b5cf49mr8046308rwc.8.1707679119223; Sun, 11 Feb 2024 11:18:39 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVOmkKCs02gGqbJGmXFVmp6XfzhRwjc5br7emI/oSSCJRkLIJdBC13YW2FS6R2CBK/rKqhPvNveKu9uGlEmWsHqX5y9HVrOkm49vwK5XvW945433X53bFp8rJBtb0lyNHmhpR8fAFXUhXZTuKZDk6RhhUCFN31PTWC6ghY82lkA6SKNmqzw Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id s65-20020a17090a69c700b00290f9e8b4f9sm5979544pjj.46.2024.02.11.11.18.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 11 Feb 2024 11:18:38 -0800 (PST) Sender: Guenter Roeck Message-ID: <8dedf370-47e1-405d-85cf-53f3acfa16a0@roeck-us.net> Date: Sun, 11 Feb 2024 11:18:36 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 0/2] lib: checksum: Fix issues with checksum tests Content-Language: en-US To: Charlie Jenkins , David Laight , Palmer Dabbelt , Andrew Morton Cc: linux-kernel@vger.kernel.org, kernel test robot References: <20240207-fix_sparse_errors_checksum_tests-v6-0-4caa9629705b@rivosinc.com> From: Guenter Roeck Autocrypt: addr=linux@roeck-us.net; keydata= xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7 nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl 7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0 VHGMNJ3MwXlrEFPXaYJgibcg6brM6wG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Jx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20240207-fix_sparse_errors_checksum_tests-v6-0-4caa9629705b@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, On 2/7/24 16:22, Charlie Jenkins wrote: > The ip_fast_csum and csum_ipv6_magic tests did not have the data > types properly casted, and improperly misaligned data. > > Signed-off-by: Charlie Jenkins I sorted out most of the problems with this version, but I still get: # test_csum_ipv6_magic: ASSERTION FAILED at lib/checksum_kunit.c:513 Expected ( u64)csum_result == ( u64)expected, but ( u64)csum_result == 16630 (0x40f6) ( u64)expected == 65535 (0xffff) not ok 5 test_csum_ipv6_magic on m68k:q800. This is suspicious because there is no 0xffff in expected_csum_ipv6_magic[]. With some debugging information: ####### num_tests=86 i=84 expect array size=84 ####### MAX_LEN=512 WORD_ALIGNMENT=4 magic data size=42 That means the loop for (int i = 0; i < num_tests; i++) { ... expected = (__force __sum16)expected_csum_ipv6_magic[i]; ... } will access data beyond the end of the expected_csum_ipv6_magic[] array, possibly because m68k doesn't pad struct csum_ipv6_magic_data to 44 bytes. In this context, is the comment about proto having to be 0 really true ? It seems to me that the calculated checksum must be identical on both little and big endian systems. After all, they need to be able to talk to each other. Thanks, Guenter