Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3041567pxb; Mon, 24 Jan 2022 00:44:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJyzWTsjpFJJiLMjznpD8FaKPMo3HeHjOFBnUcSXiqFV5hc1TEvK1Kq/0pscYGE8d11HfzSn X-Received: by 2002:a17:902:d486:b0:14b:5501:c6f6 with SMTP id c6-20020a170902d48600b0014b5501c6f6mr3215279plg.120.1643013885252; Mon, 24 Jan 2022 00:44:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643013885; cv=none; d=google.com; s=arc-20160816; b=0ssL8IvN8hvWQxVWaKMIIPvl827ro55GMf7cFNcxDdZKsDEyhRk66i0wFUFI53I/KV x0ptctsb5606RSmwp2z4e6kpIkpiOOTShkTjJ0jRvKNH/ocBy0zh7P9O5oOm6qWappSI yNqdffnQX8B9xEc2NdISIo2LyfY/j246bWQoC+jKTJfgOovN6WcS4fZGQ9WDGhPAhGHm w+Qn4TvxSNMe9g9q8+bY/pMKRExP5q+qxrIH3bIeIAwELsGm9c7KbF98gmZrVwOm59De oNTcGvNLDpQRAATWR8c+r9AnadnXtqnJ/icYS/PzGh6LFJ0xeqrFFZ5Nu6FWglPNafyt 92PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=3rUAYiijUnjOZbuDkQnCzdbKcNEzmyRYQqNf1fOF3BY=; b=OpTZH2n7fD2xdxEaCEE6PP85/8P+/4aw6XMyehtKVfzEVU4DodLNIkDTWuQpC/1lWn vo5muaM1j6aAl4DFFHzzx2t2cdc6NwsCWkmGlU68wGBqvF7rZIXMeGClOHUlt2Rci4Os KQNysykl5bPO0NA/6pEH+cngC0wtlSJLD5dBTiZFXAPAJUp8rWbIz4x0kAw5ZpUpi4zQ FyqVr/GMOO+30pFlnt7AlygEUzCyO20oHlMR2cQbFyH1odx8oBj13HK2sibEqFxduW4b cPycSDFZhKCGm053d4zr85nghv8yUrVtDiZdy0FMH8DQrrcvVvu9oWbCJ2w5EEyWgCpB yApQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si14867673pfc.8.2022.01.24.00.44.34; Mon, 24 Jan 2022 00:44:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236373AbiAWNbo convert rfc822-to-8bit (ORCPT + 99 others); Sun, 23 Jan 2022 08:31:44 -0500 Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]:36449 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbiAWNbn (ORCPT ); Sun, 23 Jan 2022 08:31:43 -0500 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-171-oJY6BDFaPVaZgS0BRz3a-Q-1; Sun, 23 Jan 2022 13:31:37 +0000 X-MC-Unique: oJY6BDFaPVaZgS0BRz3a-Q-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Sun, 23 Jan 2022 13:31:35 +0000 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.028; Sun, 23 Jan 2022 13:31:34 +0000 From: David Laight To: "'michael@michaelkloos.com'" , "paul.walmsley@sifive.com" , "palmer@dabbelt.com" , "aou@eecs.berkeley.edu" CC: "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v2] Fixed: Misaligned memory access. Fixed pointer comparison. Thread-Topic: [PATCH v2] Fixed: Misaligned memory access. Fixed pointer comparison. Thread-Index: AQHYEAxftwhRlaAJzU+hPBmorjaluqxwmqXg Date: Sun, 23 Jan 2022 13:31:34 +0000 Message-ID: References: <20220123034518.3717116-1-michael@michaelkloos.com> In-Reply-To: <20220123034518.3717116-1-michael@michaelkloos.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: michael@michaelkloos.com > Sent: 23 January 2022 03:45 > > Rewrote the riscv memmove() assembly implementation. The > previous implementation did not check memory alignment and it > compared 2 pointers with a signed comparison. The misaligned > memory access would cause the kernel to crash on systems that > did not emulate it in firmware and did not support it in hardware. > Firmware emulation is slow and may not exist. Additionally, > hardware support may not exist and would likely still run slower > than aligned accesses even if it did. The RISC-V spec does not > guarantee that support for misaligned memory accesses will exist. > It should not be depended on. ... From the way my email client display the patch I think it is using both tabs and spaces for indentation. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)