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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C1F0C433EF for ; Wed, 9 Feb 2022 18:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239761AbiBISgy (ORCPT ); Wed, 9 Feb 2022 13:36:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239697AbiBISgb (ORCPT ); Wed, 9 Feb 2022 13:36:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C7DFC05CB9D for ; Wed, 9 Feb 2022 10:36:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 11664B821BD for ; Wed, 9 Feb 2022 18:36:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 463ECC340E7; Wed, 9 Feb 2022 18:36:18 +0000 (UTC) Date: Wed, 9 Feb 2022 18:36:15 +0000 From: Catalin Marinas To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, nd@arm.com, broonie@kernel.org, shuah@kernel.org, skhan@linuxfoundation.org, will@kernel.org Subject: Re: [PATCH v3 1/6] kselftest/arm64: mte: user_mem: introduce tag_offset and tag_len Message-ID: References: <20220209152240.52788-1-joey.gouly@arm.com> <20220209152240.52788-2-joey.gouly@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220209152240.52788-2-joey.gouly@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Wed, Feb 09, 2022 at 03:22:35PM +0000, Joey Gouly wrote: > These can be used to place an MTE tag at an address that is not at a > page size boundary. > > The kernel prior to 295cf156231c ("arm64: Avoid premature usercopy failure"), > would infinite loop if an MTE tag was placed not at a PAGE_SIZE boundary. > This is because the kernel checked if the pages were readable by checking the > first byte of each page, but would then fault in the middle of the page due > to the MTE tag. > > Signed-off-by: Joey Gouly > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Mark Brown > Cc: Shuah Khan > Reviewed-by: Mark Brown > Tested-by: Mark Brown > Reviewed-by: Shuah Khan Reviewed-by: Catalin Marinas