Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp122804pxm; Tue, 22 Feb 2022 18:29:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyoYiX6yHFVPhG28NgKlPzLIi9c63vSeQAbnB1edjfTBTI/1fjit926FX1SJ3p3gCQFmDvW X-Received: by 2002:a17:906:4ad6:b0:6b8:33e5:c3a1 with SMTP id u22-20020a1709064ad600b006b833e5c3a1mr21610014ejt.472.1645583340092; Tue, 22 Feb 2022 18:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645583340; cv=none; d=google.com; s=arc-20160816; b=eIQp0MZyFE3VZjKq+u/BAjZ9/kfnMd+dJSK1+fVXyy61GaOJELQiqb+IiDSsJU6zMv 2L9+v1rNjkpaO8nsc65GcJXAJS0T8NfdZOe1BFYV9/LxjKRhHZDaL0DmpORNTthq+2TW 2BdLQ+XUy5Apor0T1QQJ15zKrgEhqDiCzFDZC5w61rpPGOS3paxJ5m2vO7vq/ab1VbOm roJbFXp0msholXkKZ+nGsRLuKPWYiDA+e8uOPhTTj+KbX6Y3eSCLIeT+FvianvTCh7rM 2XSry9QPBoY9XrI0IIjNLEZRpH9/n213gA/YuVJguc0kF6PhQe3xPT9EOir3Jr9PMRN0 eEwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dwFsfNehbtbWbkQFLg4P4GXHJo86L655uFZ/M6rBang=; b=QMjUSH3fMtzv/quvtdZdS0HyAeZO3kzJZ7NMZ6RTwfKQSXwkZBvpSQJkav5hO5/Ni3 uZbUCdUOHxWFedFhGFs38pKh8WfP5asnn1qHTDHFcp1Xz7XGlZzxjG0pWJis0224Xxhz 5jUgP506/XEZj3D7xvsJ4ofGZ6D+Uo2TsgA5ceu+yKJxpNMD9izTAkfddDZToFum5yyd qS6DbHnJXNHw6MpHZMYK35SFhEj+QTjWho1itO1byqxWkUbt7gs4jpDzOq2BpznKvI6O iQtv0ocr/EG18JSXNkXi+nteBOyvKgozgKc/2/FGCmNnU+FErVKGcp604heOqQSFlKFG O5pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZHs+AO/B"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p12si11604206ejy.969.2022.02.22.18.28.37; Tue, 22 Feb 2022 18:29:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ZHs+AO/B"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235850AbiBVVnI (ORCPT + 99 others); Tue, 22 Feb 2022 16:43:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232357AbiBVVnG (ORCPT ); Tue, 22 Feb 2022 16:43:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C10D760078; Tue, 22 Feb 2022 13:42:40 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 5BB8D61728; Tue, 22 Feb 2022 21:42:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C51E0C340EF; Tue, 22 Feb 2022 21:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645566159; bh=PLvJIjwxcItttFn5g3yYR3EOOKh3FdanRC1f86KA47E=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ZHs+AO/Bo7V4Qvp2xXjliLl6RvjLC+/5WAW8DfSRpnqbMxbxqq+9c4RjUzY+x9wPI E8wBTJc/jRtPGWx1b7H61XfyxL6Da7ilbgL8QydO6x8BV6PnqNG4SyZY2vIguPV6fJ 40WoondIT+dZa+wvr5qH/aiqc4d0F4tvsjaOtp/6x1CxweJtt48LbIS4SdqIUL6iZ+ 6G8U4xkSG7Z4NMm9f2kVNSzjQJwrRePXGajAxhHEb7+tcmNFqpxgUh8rYlzkoW9Ofg RtjVbJ2qViKuuB7IHXSYZoXi4U+LttpWdp/HDHtEHMOb/I3zGG9W+7NVkExtQWkCbi ap0DB5LgWpHiw== Received: by mail-wr1-f49.google.com with SMTP id o24so35999765wro.3; Tue, 22 Feb 2022 13:42:39 -0800 (PST) X-Gm-Message-State: AOAM530WJXiWSzDntKxVJXKRK6iHORNVtBFyQCPHx/KZJ8DPbX49tMWj F2sNm8Fw4IMLEeUXrgQVwLSaLsqjOe9MuGEqVL0= X-Received: by 2002:adf:90c1:0:b0:1e4:ad27:22b9 with SMTP id i59-20020adf90c1000000b001e4ad2722b9mr21257685wri.219.1645566158039; Tue, 22 Feb 2022 13:42:38 -0800 (PST) MIME-Version: 1.0 References: <20220222155345.138861-1-tsbogend@alpha.franken.de> <20220222195806.GA17107@alpha.franken.de> In-Reply-To: <20220222195806.GA17107@alpha.franken.de> From: Arnd Bergmann Date: Tue, 22 Feb 2022 22:42:22 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] MIPS: Handle address errors for accesses above CPU max virtual user address To: Thomas Bogendoerfer Cc: linux-mips , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 22, 2022 at 8:58 PM Thomas Bogendoerfer wrote: > > On Tue, Feb 22, 2022 at 06:04:07PM +0100, Arnd Bergmann wrote: > > On Tue, Feb 22, 2022 at 4:53 PM Thomas Bogendoerfer > > wrote: > > > > > > Address errors have always been treated as unaliged accesses and handled > > > as such. But address errors are also issued for illegal accesses like > > > user to kernel space or accesses outside of implemented spaces. This > > > change implements Linux exception handling for accesses to the illegal > > > space above the CPU implemented maximum virtual user address and the > > > MIPS 64bit architecture maximum. With this we can now use a fixed value > > > for the maximum task size on every MIPS CPU and get a more optimized > > > access_ok(). > > > > > > Signed-off-by: Thomas Bogendoerfer > > > > Thank you for addressing this. Should I add this patch to my series > > ahead of "mips: use simpler access_ok()"? That way I can keep it all > > in my asm-generic tree as a series for 5.18. > > yes please add it to your series. Done now. > > > > It might be clearer to use TASK_SIZE_MAX here instead of XKSSEG, > > to match the check in access_ok(). If you like, I can change that while > > applying. > > I had TASK_SIZE_MAX in an intermediate version, but decided to go with XKSSEG, > because it's what this check is about. It's about checking what the MIPS > architecture defined. Right, makes sense. Thanks, Arnd