From patchwork Sat Dec 25 12:06:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 12699222 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 7907CC433F5 for ; Sat, 25 Dec 2021 11:57:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E5B536B0075; Sat, 25 Dec 2021 06:57:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E0AD66B0078; Sat, 25 Dec 2021 06:57:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFA416B007B; Sat, 25 Dec 2021 06:57:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0193.hostedemail.com [216.40.44.193]) by kanga.kvack.org (Postfix) with ESMTP id C236F6B0075 for ; Sat, 25 Dec 2021 06:57:31 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6B70986E80 for ; Sat, 25 Dec 2021 11:57:31 +0000 (UTC) X-FDA: 78956166702.11.70F08AA Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf21.hostedemail.com (Postfix) with ESMTP id C61B61C004E for ; Sat, 25 Dec 2021 11:57:25 +0000 (UTC) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JLj834bjHzbjRx; Sat, 25 Dec 2021 19:56:35 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 25 Dec 2021 19:57:01 +0800 Received: from localhost.localdomain.localdomain (10.175.113.25) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Sat, 25 Dec 2021 19:57:00 +0800 From: Kefeng Wang To: Kees Cook , Laura Abbott , "Mark Rutland" , , Andrew Morton , , Michael Ellerman , Benjamin Herrenschmidt , "Paul Mackerras" , CC: Nicholas Piggin , Kefeng Wang Subject: [PATCH v2 0/2] mm: Fix kernel BUG in __check_heap_object() on PowerPC64 Date: Sat, 25 Dec 2021 20:06:19 +0800 Message-ID: <20211225120621.13908-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: C61B61C004E X-Stat-Signature: 65osxkdarb1a6chci8d4amhtbgmi1x31 Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf21.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com X-Rspamd-Server: rspam02 X-HE-Tag: 1640433445-12079 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: v2: - Fix powerpc virt_addr_valid() instead of workaround in check_heap_object(), suggested by Christophe and Nicholas - Add WARN_ON in check_heap_object() incase of virt_addr_valid is insufficient on some archs Kefeng Wang (2): powerpc: Fix virt_addr_valid() check mm: usercopy: Warn vmalloc/module address in check_heap_object() arch/powerpc/include/asm/page.h | 5 ++++- mm/usercopy.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-)