Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp249296pxa; Thu, 27 Aug 2020 00:48:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwg7QJTAQEGqPK1djppqGadzPxH5YA9WrHJWz7ZQ61tm72AUgTNYoOOSXGFQt3MAOQ8YQYY X-Received: by 2002:a17:906:5796:: with SMTP id k22mr20689541ejq.77.1598514480292; Thu, 27 Aug 2020 00:48:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598514480; cv=none; d=google.com; s=arc-20160816; b=eAQLXM7rn64Y/A3Jch/dBznscxgbc+N6k/enPY/QjmVuGdQlZAy0Mum516RPtf1J/J 9xNS5i5sejB235AZ7acYJQUkmOyX2Oc06EJjGPk25fE/V+rAdgJ8USZ5bMdZLJZndqN9 XcC6wVRHpd6Y9fGCHnf8mtnSPD4jE9/aoQyqzKyrU0G0ev9EUcziw3lJc8q806Rz15sL VdfkNKolRhGBgtYtPsFa+oyu0RHgpOt+v6tUBMdWFmQcq4c55ddrEb9/CNtdQOkYld/3 1ubCozRihp53TRUzHcLTK+/gCu54tRnYhEYXU+72wVC8RuMyND/sTXuV2OJt3JNdaEWI 81vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:references :in-reply-to:cc:to:from; bh=qR0Q+K4+iQ1yJ1oskapm4Ju7rIatITIUwrVu2L+WV8o=; b=fMeSNZpxC9rdehNFqV02zYkN5iZbAD4a6elukZDlJzwy+xw4ORsalQPXLCzX0FkIvZ M56ucG/bQHGFVPlwgGkylH9TdNIA3Q46Ihj9gSiGFLJaskpypaM0Z8ZZfM9Os8uUCKP4 hK9UQ940VtIEkwSVjmCPGKsKTIHDIz87pX3/ZnlTBuP3IPlIY6/y0QNcFT8U/nHA6jeo GH7/lOLSfcJ7tod//3MVhn7+TqqnjNM/HItXeOjJD+HDU94SYLdhBUDTkqEKWvBFqtD3 RIsg1L4GQMyD9K6PCJpx1Evk+8q+gejrMjrEp/EvZfWjD6XgdhZ9yRuwgOD22VViU500 7Nfg== 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 b1si847689ejb.647.2020.08.27.00.47.37; Thu, 27 Aug 2020 00:48:00 -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 S1728290AbgH0Hq4 (ORCPT + 99 others); Thu, 27 Aug 2020 03:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728238AbgH0Hq4 (ORCPT ); Thu, 27 Aug 2020 03:46:56 -0400 Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA2BFC061264 for ; Thu, 27 Aug 2020 00:46:55 -0700 (PDT) Received: by ozlabs.org (Postfix, from userid 1034) id 4BcZYk6tYqz9sTh; Thu, 27 Aug 2020 17:46:50 +1000 (AEST) From: Michael Ellerman To: Paul Mackerras , Michael Ellerman , schwab@linux-m68k.org, Christophe Leroy , Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org In-Reply-To: <09fc73fe9c7423c6b4cf93f93df9bb0ed8eefab5.1597994047.git.christophe.leroy@csgroup.eu> References: <09fc73fe9c7423c6b4cf93f93df9bb0ed8eefab5.1597994047.git.christophe.leroy@csgroup.eu> Subject: Re: [PATCH] powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000 Message-Id: <159851435980.52163.8321314974560450612.b4-ty@ellerman.id.au> Date: Thu, 27 Aug 2020 17:46:50 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Aug 2020 07:15:25 +0000 (UTC), 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. Applied to powerpc/fixes. [1/1] powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000 https://git.kernel.org/powerpc/c/541cebb51f3422d4f2c6cb95c1e5cc3dcc9e5021 cheers