Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1040512rdb; Fri, 16 Feb 2024 03:42:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUWoQzHcUE3UmzJXnY2rrTMtFlgOovvr0NvPGa66JHpFyb4PBHRaaGavAniaSYf2r/iJJpVIkNbtRSEm5BiRfylXDtqjIW7ytLa80evig== X-Google-Smtp-Source: AGHT+IEA/wntjcB7kLYcRByARUDmHR1V4F+PtwCnJH7hMZzxEFIU1JGOUUivIlFVMS0WTfUuxErq X-Received: by 2002:a05:6214:4886:b0:68f:17d:45bf with SMTP id pc6-20020a056214488600b0068f017d45bfmr11958489qvb.26.1708083724851; Fri, 16 Feb 2024 03:42:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708083724; cv=pass; d=google.com; s=arc-20160816; b=sI2bbaA43+Z2aRB3+jYguNrJ+lfKOxvXrFqswQhgRmwqQdgqpcXNF2jhC05C01rFjP +wyX8H51A0HClGmf48PQD3nhmQkBZ1tV+UC0qxOYEvQGH3aE/NPmDYsL1jz6fQnjDDdB Eqe6+/Vw/mxK1oYt6kLF0aG0urFxi08JR0lAQqOSoB+JVJodywjrVPAA1ZMrCky/lib7 Meca05Fcoh6gFPAqOxVBJq5k4+bjvo8XrS/AhkuEBu5jl98A44IAxACb94enuwS1cL7S MIelBz/D68XxOQTwSKFfo4nERpzk3H7JPjuxEKuK4vz6DSh9sP696/yHyCJekosyJx8e RSNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport: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:dkim-signature; bh=ENkj9c3IlxXNoqACou83okSe3zXu5WBJkYNjVu8EpqM=; fh=xiPVYvBS7wwh6fE5FUBUNXvolxrcTaTOj4UY4nDmLIc=; b=Zv3NOUuQU36wWrYQT+Al/RDC///d7qr3Xvt2aAfwSOkjaCka417EXn9rPjWCZAvtuO J1rOuiCi2jrdMtRs0nTuZa+FOvWnzNogpfyRE964UUhmNTSO6YD5mIGmEnWfa4RO42/P G30VGPb74w5czhsVmc79nH6EToVR8psWF6TUe8AKGpLJs3HBdI2KqO/aGAomy85BwMak 8nbT8xsmUxR5ZPMCppzd7kvGGlukfa2jznfhGjLIrc7TlP49BXccunR4l47BYTB1ln7I hN+DsNODalhnk2OSzFchzGW1ZCxtYv9okjya7PVWkLpo2QfDO6eX7Xu1fDwNP8hJXXIS 2tBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=kvIS8qtb; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-68537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b12-20020ac8540c000000b0042dad235b9bsi3429522qtq.226.2024.02.16.03.42.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 03:42:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68537-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; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=kvIS8qtb; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-68537-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de 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 8B5C91C22D63 for ; Fri, 16 Feb 2024 11:42:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F7DE77F3B; Fri, 16 Feb 2024 11:41:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b="kvIS8qtb" Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) (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 7B1B459B5F; Fri, 16 Feb 2024 11:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708083709; cv=none; b=O+sPjowcUQEOT42PED3OfOjdLkML9LVPnSFhBlmUEmGtgF92KskDsFfKGNvFJJc3zJo79hgOsrkItKSdtVexMpD00GvQmIO04tSPOQPtVb0xRy/o9lLKGkza8AKOP0QqTR883A3auDRP5LbnThEADlZYkgwUVU8BgzNAomjHcxA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708083709; c=relaxed/simple; bh=ENkj9c3IlxXNoqACou83okSe3zXu5WBJkYNjVu8EpqM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gNFMdDsTcRb4PDO8iVyIWRDdG2YHJoIWvIN4mtjelwZCzDsOfyAz40CqrEkGngNiUBDJb5k95qKotBGXwiu1vW1G2zhSYIcFyiajAuoRAm0YsvMV5tK9zb5t9Edj7YeAIcOGI98tNWtASuEgGOmedcSZAWfIfv11RzgYlQPRJ38= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b=kvIS8qtb; arc=none smtp.client-ip=212.227.17.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1708083686; x=1708688486; i=deller@gmx.de; bh=ENkj9c3IlxXNoqACou83okSe3zXu5WBJkYNjVu8EpqM=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From: In-Reply-To; b=kvIS8qtbuadHs+uT7skkBZZK818kmErwrw6HwDJFsVcHlcBAOVUZTte9VNyrKsoK QWg8lTomgHOBthOqvumrvEU3JQXceBFOHwPDxOM4SEiEwVvwARQ+dO9ADGGbi0R1J EXqeykYxDj+LTKD3tEsifyKuDAKMq4Klb4qGbE9E+Y1Ezt5yhXYWJTdiEpIYj39OG hiQ2/MRwNuQtRTHp/z0gBVc5quMmpbNi/XSmpCZJSCTh2Xsd6moH+pZxGxOrnaoov /l7yqg9S2qvF/pKTeE3+Iq8EPsDZKFMLNO3tNd3M0kJucLM2MJDhvZSfBObafXDY5 O5wVrMTTkxfraU4LbA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.20.55] ([94.134.148.214]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MXp5Q-1rTDsA1RXQ-00Y8u8; Fri, 16 Feb 2024 12:41:26 +0100 Message-ID: <61cfc73e-e406-4e98-9057-d7843e7694e7@gmx.de> Date: Fri, 16 Feb 2024 13:05:20 +0100 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 v8 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests Content-Language: en-US To: Charlie Jenkins , Guenter Roeck Cc: David Laight , Palmer Dabbelt , Andrew Morton , Parisc List , Al Viro , linux-kernel@vger.kernel.org References: <20240214-fix_sparse_errors_checksum_tests-v8-0-36b60e673593@rivosinc.com> <20240214-fix_sparse_errors_checksum_tests-v8-2-36b60e673593@rivosinc.com> <2ec91b11-23c7-4beb-8cef-c68367c8f029@roeck-us.net> <25f108d1-827f-4a18-bee4-4105fbd45974@gmx.de> <6aaa4b89-a967-4b19-b4bf-a1ad5c8e9faa@roeck-us.net> From: Helge Deller Autocrypt: addr=deller@gmx.de; keydata= xsFNBF3Ia3MBEAD3nmWzMgQByYAWnb9cNqspnkb2GLVKzhoH2QD4eRpyDLA/3smlClbeKkWT HLnjgkbPFDmcmCz5V0Wv1mKYRClAHPCIBIJgyICqqUZo2qGmKstUx3pFAiztlXBANpRECgwJ r+8w6mkccOM9GhoPU0vMaD/UVJcJQzvrxVHO8EHS36aUkjKd6cOpdVbCt3qx8cEhCmaFEO6u CL+k5AZQoABbFQEBocZE1/lSYzaHkcHrjn4cQjc3CffXnUVYwlo8EYOtAHgMDC39s9a7S90L 69l6G73lYBD/Br5lnDPlG6dKfGFZZpQ1h8/x+Qz366Ojfq9MuuRJg7ZQpe6foiOtqwKym/zV dVvSdOOc5sHSpfwu5+BVAAyBd6hw4NddlAQUjHSRs3zJ9OfrEx2d3mIfXZ7+pMhZ7qX0Axlq Lq+B5cfLpzkPAgKn11tfXFxP+hcPHIts0bnDz4EEp+HraW+oRCH2m57Y9zhcJTOJaLw4YpTY GRUlF076vZ2Hz/xMEv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G+5jIIJhG46LUucQ28+VyEDNcGL3tarnkw8ngEhAbnvMJ2RTx8vGh7PssKaGzAUmNNZiG MB4mPKqvDZ02j1wp7vthQcOEg08z1+XHXb8ZZKST7yTVa5P89JymGE8CBGdQaAXnqYK3/yWf FwRDcGV6nxanxZGKEkSHHOm8jHwvQWvPP73pvuPBEPtKGLzbgd7OOcGZWtq2hNC6cRtsRdDx 4TAGMCz4j238m+2mdbdhRh3iBnWT5yPFfnv/2IjFAk+sdix1Mrr+LIDF++kiekeq0yUpDdc4 ExBy2xf6dd+tuFFBp3/VDN4U0UfG4QJ2fg19zE5Z8dS4jGIbLg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:YuF9PVuGcuEpBNoBnA5hjOnuz5Bspi64Grxz2iK2S3IkdxDOLtv GCIoagFe46RGCoS+efUsxNyzUihQQFvedTJW87N4RIkC12WFAxCF5Lir2xaisO1CZgCQm0G EoeXSRdQGBscBtRjN86vJD8iSIy+My5vVZ7bFM8y4+xlQG43uQLc2qLpjuzNkr1/lMHZAa6 PnwB1PeWf/kcK+PGdDkWQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:RTB83uO8wns=;hiZTewUlieqkNBMyVa449AXBYM6 HdzkyUSoDb/eBmsqzN7SLxRPM72sm3iZzyQbz6IxN0vaqImha6nuQnbR+S7V0++cPK9N/L/4K jtlkTPedTLsFBUD5ax/Wla9tKK343Ir8ApowLkMwdeGrzQXHG4AWAeKrkqngVU7fAfXVbTHI5 RABMhUxvWV6GLqeGNWak6iIGMOjseFrR0fCxAEywtRA02GC/Cs8nQ5YRkpE0xl1iz+iUA/aX8 oFnFcPRodeEWeT5ojaCMJRr0cweZoRrpZMVmznSDke6BUaD9kK4c9nHq/pwzsIPbZiyaw45BK EXXzjptR5csN4fNBjs+Bfcu/91t6MUQUO5jZ8SPkq8PRBozGEj92HNrtw6pNkJ6iIg8Kc6LL2 wPVwHEp7JN0D8J1JmhQpNl1eOZVAhr1JE75o8k1vLZt23QEQzBunKSCkPzuV6pEhGgR3vIDCT 59YCBjLvSISgG5qmBqHY/9lAbjrynkGozWPGqaYgGKIqrkG1RhXvwCVdTARyLU1Xv/gKpNVbE +Nagp2Y/Faurda1lhbkMzTQtUbXi51YLmuF0546r35sqXjkIOlcYuTX3vienWHsvssPG2ozO2 iNb/GK+0hF2eci49SHMtwYKVqjId6USEb1r4Vt1BBw4ur1VVwXagVzSyoq+P0FqSx6covzOO1 fpBL91YgifSzYQgf6yPqWIVRjB4C4iqvWANTkGrDpw3b9v9LeVAVszmpoHf5vlk2wIFYtmJel TjY3I86C7rjAEnvVrM8BxvUBtuC1v4UDV7CTsGW8L+ZG0/R+q8UexA/9WvH+wi3Gm411i+rAb rQBmcHCIVs5qAs9WnRhDCbwFfCUbJs9Q85udohi4ZUrPc= On 2/16/24 07:13, Charlie Jenkins wrote: > On Thu, Feb 15, 2024 at 10:09:42PM -0800, Guenter Roeck wrote: >> On 2/15/24 21:54, Helge Deller wrote: >> [ ... ] >>> >>> Can you please give a pointer to this test code? >>> I'm happy to try it on real hardware. >>> >> You should also see the problem if you use v7 of Charlie's checksum >> unit test fixes. >> >> I submitted the qemu fix (or at least what I think the fix should be) >> a couple of minutes ago. >> >> https://patchwork.kernel.org/project/qemu-devel/patch/20240216053415.21= 63286-1-linux@roeck-us.net/ >> >>>> It is quite easy to show that carry is always set after executing ldd >>>> on an unaligned address. That is also why I know for sure that the >>>> problem is not seen with ldw on unaligned addresses. >>> Interesting. >> >> Ultimately it wasn't surprising, with the unusual carry bit >> implementation on hppa. The upper 8 carry bits were not masked >> correctly when returning from a trap or interrupt. > > Tangential question, but why does Linux need to save and restore the PSW > if that is already handled by the hardware? I am missing something. e.g. for task switching. Helge