From patchwork Wed Jul 12 14:38:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13310445 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 3B943EB64D9 for ; Wed, 12 Jul 2023 14:25:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C76846B007B; Wed, 12 Jul 2023 10:25:24 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BC18E6B0081; Wed, 12 Jul 2023 10:25:24 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 99DBB6B007D; Wed, 12 Jul 2023 10:25:24 -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 746946B007B for ; Wed, 12 Jul 2023 10:25:24 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E5665A00B8 for ; Wed, 12 Jul 2023 14:25:23 +0000 (UTC) X-FDA: 81003182526.04.5A0330A Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf28.hostedemail.com (Postfix) with ESMTP id 99178C001D for ; Wed, 12 Jul 2023 14:25:20 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689171922; a=rsa-sha256; cv=none; b=GunJuYn2Mp9Cnz6y+ZvzoYtjYM+OtWWJPAFCN4uMX9OIUEV4pSMMiNax5OLkGQTOyQDG3d xQKoilCP1t1Ich0sR2f4i5xxIv2lkFh0ku4H8BmV2rkwYtyd+AtPrlojOV/PadAp533mUt YTi0XaLnhNJG1K8ydkTELgmD1MyVODo= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf28.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689171922; 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: references; bh=N0CB1ZUiC+bYIEPvy9jvRnuRpNNJxbQaj5Qabaz6tf4=; b=p58lqRhLsqGLnn/R6bmtJmxA91WGw2En9rRo2PY9D0peAVrFnAkwYqi2qY8GwC2H3dln1h W6+YAT9kxlnwqzn1rp62bBi8YO12gyzjttoTtICi5irt0ALUdFAb5UqK36D/GUhoGMzXLd +zl0AlprWsEDa8yAJwCzcpYYMZl2rmc= Received: from dggpemm500001.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4R1KgR32ywzMqVk; Wed, 12 Jul 2023 22:21:55 +0800 (CST) 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.2507.27; Wed, 12 Jul 2023 22:25:11 +0800 From: Kefeng Wang To: Andrew Morton CC: , , , , , , , Kefeng Wang Subject: [PATCH 0/5] mm: convert to vma_is_heap/stack() Date: Wed, 12 Jul 2023 22:38:26 +0800 Message-ID: <20230712143831.120701-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 99178C001D X-Stat-Signature: 3rnac4i63ctnxd8nkt3bqaiydhrigxbf X-Rspam-User: X-HE-Tag: 1689171920-480373 X-HE-Meta: U2FsdGVkX19fg6gyuMmAbBX7AwuytKXFdgt/MGjdF8A8idt/nGnKo/EW+37HUCxZJII4hrXhCq6gl58wmrd/Msh3cVytgBN3tIfxzf95DWMoQ++ftwCTI6eTQCWSTXE/KsspA8gP2HRPw0Xf418/V+qVJFXeEp/xg6XxeLlvb23YkH6WEXGKAO6X/JH2iCg7udrmkv4lYVYQrfygdtFzHFUlVMIvPSjpM7oZkkbjPuZSw5s8EPCQKXtr3AQartbV+fj6yCz3PM2KmmUCa3J6XeDBB1ZzJJYRDgHVZmIQa1wU6IHGZZqzdbNVHYj7H4YCjmssePLBlsBZlkw99q823NI9Pk/TRVmqE9FYMFf3io8twXQP+DfWqpp6v5CbA3RoQgaBa3w/sYIegLWnCgsts4LyDPhXL36ylWd+EG8Nvco3KvbaunW8RVXFlC/ghG3C+Z9kCZBbwUjyYPzm7mItzlwmrbyF1ajvdVKCocu9Wbm2xJU8WrSzIMPuJrXFO6ZyBBKG1y8YdZqcNY2ftYofIW6fQ+FQrYoQ5fNfjBDN6GoGFWuX3Ob4ii5RiiiW17XU6qdyfUCzYYvzYpGHex37nTGc4Ce9Tq4aJJMKP5Y7BLSlasWsEgrPS2cDZrhM7eSzNB04EhUjSnHaXl/PAcK5hcEEyyZS/b8wtXOZXbKCuTitvXtZ2+zokuwoKYMrfsNreuucpz8yqWU/tFnfbh8RoCYiVu3ovc9pzPzRzD5CJBmoYUihVihzVf8EInJ/U57LX+v7FIEqUTGedCxX7MGwhMRfiDb8zXcBCpQCo51gsZxfeN9gYjjVPDwja35aDHE3qDhafsisYhPyft5GmsKtfM3h2Ntbqx5/2zonyuL2jj+4GML4vbv5KNlsMhxss1/cREwpWXTINZMczqkS2fl/tENyKvSjoL3t98J1bUcAZFa44hUHOUiSA5Lzba9EJKYY8OyqlcUENPReYSkpp7f mkojrhHu NUsWi5AbX0cy5eO21HjBjeobeVizekRBZEnx9GAq+OxL9SRLQFqQOT3D2UF3Uz1169NUP8gxrIRYkxTyrWCovRJ6hWcuEKIurTIxial/1lEhvY9GvP+1iwj0Q8XUYzD6EjeK3cPLdokRxFjUqCHN3i8dw3Q27EtPzUq42lOE0h/kcTJtIwg008t+big47+rmFFcpr 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: Add vma_is_stack() and vma_is_heap() helper and use them to simplify code. Kefeng Wang (5): mm: introduce vma_is_stack() and vma_is_heap() mm: use vma_is_stack() and vma_is_heap() drm/amdkfd: use vma_is_stack() and vma_is_heap() selinux: use vma_is_stack() and vma_is_heap() perf/core: use vma_is_stack() and vma_is_heap() drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 5 +---- fs/proc/task_mmu.c | 24 ++++-------------------- fs/proc/task_nommu.c | 15 +-------------- include/linux/mm.h | 12 ++++++++++++ kernel/events/core.c | 22 +++++++--------------- security/selinux/hooks.c | 7 ++----- 6 files changed, 27 insertions(+), 58 deletions(-)