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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04EB1C433FE for ; Tue, 4 Oct 2022 13:38:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 09F3A6B0072; Tue, 4 Oct 2022 09:38:50 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 04E8B8E0001; Tue, 4 Oct 2022 09:38:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E594F6B0074; Tue, 4 Oct 2022 09:38:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id CEB726B0072 for ; Tue, 4 Oct 2022 09:38:49 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 9A685140959 for ; Tue, 4 Oct 2022 13:38:49 +0000 (UTC) X-FDA: 79983372378.05.FA15638 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by imf27.hostedemail.com (Postfix) with ESMTP id 55FBA40019 for ; Tue, 4 Oct 2022 13:38:47 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4Mhf1H1ksvz4xGR; Wed, 5 Oct 2022 00:38:43 +1100 (AEDT) From: Michael Ellerman To: linuxppc-dev@lists.ozlabs.org, "Aneesh Kumar K.V" , christophe.leroy@csgroup.eu, npiggin@gmail.com, mpe@ellerman.id.au Cc: linux-mm@kvack.org, akpm@linux-foundation.org In-Reply-To: <20220908072440.258301-1-aneesh.kumar@linux.ibm.com> References: <20220908072440.258301-1-aneesh.kumar@linux.ibm.com> Subject: Re: [PATCH] powerpc/mm: Fix UBSAN warning reported on hugetlb Message-Id: <166488997961.779920.6218703404881522542.b4-ty@ellerman.id.au> Date: Wed, 05 Oct 2022 00:26:19 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664890729; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XnEDuwoRxOuVs4Xss8qHGN9KmTgbRoQh5bwyG1inV6o=; b=sGVSWMp1cPpM0DBKhZ1n9NLzQLmPgIKINJh4D7i/Gwl8fWI2rmsmz/W9OGZ4OenGnkCvwX jLzIhb330THizRrXUAye2U6oE2x1qC4q1HFhzkG2RTMAq8q3rAap42Dy00qoCp+HBaDW02 13ws5GdK48/B1/l5rZAhDIS+evqTLJI= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of michael@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=michael@ellerman.id.au; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664890729; a=rsa-sha256; cv=none; b=CcTB3ha3TRETV2T0TkfJjQgQbzkFrfSDME9x3vm8Oevdmy35wd99hDoplvSOlabtHDp5mc HHze957GuGKqzGvYSwzhxVSGiubMEk4zrzTGEJymdr50nzPFqY2/c+1coWKVIwENVpgaKd +VU+iyIXvYMDz5Kp2gzaHlCt+ZPl1xU= X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of michael@ellerman.id.au designates 150.107.74.76 as permitted sender) smtp.mailfrom=michael@ellerman.id.au; dmarc=none X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 55FBA40019 X-Stat-Signature: im7kb3pnttis3juiazhzeho41xjc6qae X-HE-Tag: 1664890727-748998 X-Bogosity: Ham, tests=bogofilter, spamicity=0.002828, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 8 Sep 2022 12:54:40 +0530, Aneesh Kumar K.V wrote: > Powerpc architecture supports 16GB hugetlb pages with hash translation. For 4K > page size, this is implemented as a hugepage directory entry at PGD level and > for 64K it is implemented as a huge page pte at PUD level > > With 16GB hugetlb size, offset within a page is greater than 32 bits. Hence > switch to use unsigned long type when using hugepd_shift. > > [...] Applied to powerpc/next. [1/1] powerpc/mm: Fix UBSAN warning reported on hugetlb https://git.kernel.org/powerpc/c/7dd3a7b90bca2c12e2146a47d63cf69a2f5d7e89 cheers