Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp104016pxa; Fri, 21 Aug 2020 02:21:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR411+wJhoaNK6+bgbZEyc7pl/DBA44JRUaKGuk2wjYVyovFbOW+c/ckaQCLw688yq0uBQ X-Received: by 2002:a17:906:b2c3:: with SMTP id cf3mr1925167ejb.387.1598001662804; Fri, 21 Aug 2020 02:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598001662; cv=none; d=google.com; s=arc-20160816; b=BJk3x9URxwGd+eutE6zG5MoLj5vvA2C73lZ755ysZDuZBdChqHkJLpgfah42Es1FOf 09mCQOYRPxnX9uEk0MvJK6pqEgRN6/KWqrlxANH+CqOSSXSJWV61DPVmqHp2EnZac7gD FQU5hr1QP+9mqL9a80aSnK4joMMr3tE1HAkRywkQ8/F3J3P78YCr583XgVYn1/fAGMoD BnwACXmke3yiSP7X4tftkTUxkmUaPoQ9cCye6QI1oXOK1v5h/Oa7lKw6dzYyHR9eRhWy G0z/JsTGUJskjuPBiAMnOTlX0O2cZ0Nl+fx+0XHzUmcIg1ekRzRMZ9WIr+L8NpbJsTwq vtEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=I0VWH9FLgMo8M+VEmwonDSOhla7PG8UbJfYc4u9WOcc=; b=u0heLSdDV3foAHDf+w8LzKUvOA9zJwihFFu4d5135tPFSGiGsZVs9C4tVtAUY2cSRH iO1jsXhH/blWt76z4DepQT3EgnpdJbvpfY7c6OsDG0+jZnkssF2mPB90X/LS7bSWPCMF ahpLLzGm/lZTinJMbh4x2TcneebUqKyqCw8kXZUGOzrwuTfQ4g6a7jPPiYjw/IXJVKhf Q6BAmKTxJ+3MfflhjMZiVIm/WlynZUWVB2+i1nMGFSWGzjiTbPv+3D7xUPvx1Clc4uPb mOx0MTw99wO35lQH4ogLKagCsTu4uOfHMAxk2K13xJK0Zma/CcRq32h8m9Yffk7qW4Ne AWKA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si806368edz.280.2020.08.21.02.20.39; Fri, 21 Aug 2020 02:21:02 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728258AbgHUJT2 (ORCPT + 99 others); Fri, 21 Aug 2020 05:19:28 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:45315 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725806AbgHUJT2 (ORCPT ); Fri, 21 Aug 2020 05:19:28 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4BXwvK4SfGz1qs0H; Fri, 21 Aug 2020 11:19:25 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4BXwvK3qgKz1qy63; Fri, 21 Aug 2020 11:19:25 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id F0_dCBk9PgC1; Fri, 21 Aug 2020 11:19:24 +0200 (CEST) X-Auth-Info: xzm2TsjnGK9QJrldEjTYj5rRu9jtvPfdYQZy6A0x9whwb0PqbRObjNI3MuMTzqpI Received: from igel.home (ppp-46-244-185-194.dynamic.mnet-online.de [46.244.185.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 21 Aug 2020 11:19:24 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id EAD032C0765; Fri, 21 Aug 2020 11:19:23 +0200 (CEST) From: Andreas Schwab To: Christophe Leroy Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000 References: <09fc73fe9c7423c6b4cf93f93df9bb0ed8eefab5.1597994047.git.christophe.leroy@csgroup.eu> X-Yow: HERE!! Put THIS on!! I'm in CHARGE!! Date: Fri, 21 Aug 2020 11:19:23 +0200 In-Reply-To: <09fc73fe9c7423c6b4cf93f93df9bb0ed8eefab5.1597994047.git.christophe.leroy@csgroup.eu> (Christophe Leroy's message of "Fri, 21 Aug 2020 07:15:25 +0000 (UTC)") Message-ID: <874kowwe3o.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Aug 21 2020, Christophe Leroy wrote: > In is_module_segment(), when VMALLOC_END is over 0xf0000000, > ALIGN(VMALLOC_END, SZ_256M) has value 0. > > In that case, addr >= ALIGN(VMALLOC_END, SZ_256M) is always > true then is_module_segment() always returns false. > > Use (ALIGN(VMALLOC_END, SZ_256M) - 1) which will have > value 0xffffffff and will be suitable for the comparison. > > Reported-by: Andreas Schwab > Signed-off-by: Christophe Leroy > Fixes: c49643319715 ("powerpc/32s: Only leave NX unset on segments used for modules") Thanks, that fixes the crash. Tested-by: Andreas Schwab Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."