From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from canpmsgout04.his.huawei.com (canpmsgout04.his.huawei.com [113.46.200.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E19941D11F for ; Tue, 25 Aug 2026 12:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=113.46.200.219 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787660500; cv=none; b=E2hQqvsRd15mcEgZOtVhK4XF8IeMoDvAZDHDYbwqZA7+exNiPlyp3MGZxD7TSMlmVBKaP2sCzl+KBXxjxd6baJmfoKOfVAOFLdgZ2MryJjBiAzxyg3M2HXQm6zXa3xAr6DgKnsInAcKf+k8F1/0+1dAJy4LPXAfrzRb1eGlYYS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787660500; c=relaxed/simple; bh=FyoWIQToxSMAIdDt+qH4KY76CLny70u7fh7SF1Jki4E=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=NtE1YGCRty7Wis+O9PLEjsW+LQyYQgwi6qyh1GZDU7iJsyJQ4vnEtKYLdHqae6YSSL2YmRaMmV9gO765NdhHIGdQLkwZIVB9ht4tScW3Z/rGTJElwAdYyrYZEO2wWpckH+Nj9wR1PkwtxpXgw/6GczwwvluNxSFtKifsjfdRwHg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=Sz8uslrC; arc=none smtp.client-ip=113.46.200.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="Sz8uslrC" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=kU+A+Wt7hykq+6fByqXAGIrE2CqDx8Nal+lBckyJZAs=; b=Sz8uslrCljAOIqTjgzHB1V2b+lqiPf+sWFXli26StxyGbJvXoJVSoZwJoQ0gJIroKn0xGI2eH 5Oa3u96QVTs2tRz2kOo2VoGgk9RfFV0y1mvKSoK572Bt6wHDGZoTMjLBSLZVZhXcdIXo9uruH0Z 7D42Hzt3FBddtToAPawmAYc= Received: from mail.maildlp.com (unknown [172.19.162.140]) by canpmsgout04.his.huawei.com (SkyGuard) with ESMTPS id 4hTmnp0Bhgz1prKd; Tue, 25 Aug 2026 20:10:38 +0800 (CST) Received: from kwepemo200010.china.huawei.com (unknown [7.202.195.178]) by mail.maildlp.com (Postfix) with ESMTPS id 08BA0202E6; Tue, 25 Aug 2026 20:21:25 +0800 (CST) Received: from huawei.com (10.44.142.85) by kwepemo200010.china.huawei.com (7.202.195.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.45; Tue, 25 Aug 2026 20:21:24 +0800 From: Qi Xi To: Andrew Morton , Vlastimil Babka CC: Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , , , , , Subject: [PATCH v3 0/2] mm/page_isolation: fix UBSAN shift-out-of-bounds in isolate_single_pageblock Date: Tue, 25 Aug 2026 20:05:47 +0800 Message-ID: <20260825120549.966271-1-xiqi2@huawei.com> X-Mailer: git-send-email 2.33.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To kwepemo200010.china.huawei.com (7.202.195.178) Patch 1 fixes a UBSAN shift-out-of-bounds warning in the PageBuddy branch of isolate_single_pageblock() triggered by concurrent buddy allocation. Patch 2 addresses the same class of issue in the PageCompound branch, where racy compound_order() and compound_head() reads could lead to out-of-range shifts or incorrect page skipping. Changes since v2: - Patch 1: add a comment clarifying pageblock_isolate_and_move_free_pages() splits cross-boundary PageBuddy. No code change. Changes since v1: - Patch 1: drop VM_WARN_ON_ONCE, bail out with -EBUSY instead - Patch 2: new patch addressing PageCompound branch race Qi Xi (2): mm/page_isolation: fix UBSAN shift-out-of-bounds warning mm/page_isolation: guard compound_order() against racing mm/page_isolation.c | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) -- 2.33.0