Message ID | 20220520235758.1858153-7-song@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 5FF36C433F5 for <linux-mm@archiver.kernel.org>; Sat, 21 May 2022 00:00:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EFEB06B0072; Fri, 20 May 2022 20:00:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EB8006B0073; Fri, 20 May 2022 20:00:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D27986B0074; Fri, 20 May 2022 20:00:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id C4B8A6B0072 for <linux-mm@kvack.org>; Fri, 20 May 2022 20:00:35 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A011A32EBC for <linux-mm@kvack.org>; Sat, 21 May 2022 00:00:35 +0000 (UTC) X-FDA: 79487793630.04.1A0BF3D Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by imf20.hostedemail.com (Postfix) with ESMTP id BA4E01C0018 for <linux-mm@kvack.org>; Sat, 21 May 2022 00:00:21 +0000 (UTC) Received: from pps.filterd (m0001303.ppops.net [127.0.0.1]) by m0001303.ppops.net (8.17.1.5/8.17.1.5) with ESMTP id 24KMsAm5021874 for <linux-mm@kvack.org>; Fri, 20 May 2022 17:00:34 -0700 Received: from mail.thefacebook.com ([163.114.132.120]) by m0001303.ppops.net (PPS) with ESMTPS id 3g5wkrg2ru-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for <linux-mm@kvack.org>; Fri, 20 May 2022 17:00:34 -0700 Received: from twshared10560.18.frc3.facebook.com (2620:10d:c085:108::8) by mail.thefacebook.com (2620:10d:c085:21d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 20 May 2022 17:00:32 -0700 Received: by devbig932.frc1.facebook.com (Postfix, from userid 4523) id 0B1EE7E22204; Fri, 20 May 2022 16:58:21 -0700 (PDT) From: Song Liu <song@kernel.org> To: <linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org>, <linux-mm@kvack.org> CC: <ast@kernel.org>, <daniel@iogearbox.net>, <peterz@infradead.org>, <mcgrof@kernel.org>, <torvalds@linux-foundation.org>, <rick.p.edgecombe@intel.com>, <kernel-team@fb.com>, Song Liu <song@kernel.org> Subject: [PATCH v4 bpf-next 6/8] vmalloc: WARN for set_vm_flush_reset_perms() on huge pages Date: Fri, 20 May 2022 16:57:56 -0700 Message-ID: <20220520235758.1858153-7-song@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220520235758.1858153-1-song@kernel.org> References: <20220520235758.1858153-1-song@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: hoFza5jLnX94KWey5tNtha5fDmRDy_M7 X-Proofpoint-ORIG-GUID: hoFza5jLnX94KWey5tNtha5fDmRDy_M7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-20_08,2022-05-20_02,2022-02-23_01 X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: BA4E01C0018 X-Stat-Signature: tu85516cc5epd37awbbdpahnsijdma7n X-Rspam-User: Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=kernel.org (policy=none); spf=none (imf20.hostedemail.com: domain of "prvs=6140678c23=songliubraving@fb.com" has no SPF policy when checking 67.231.153.30) smtp.mailfrom="prvs=6140678c23=songliubraving@fb.com" X-HE-Tag: 1653091221-72371 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: <linux-mm.kvack.org> |
Series |
bpf_prog_pack followup
|
expand
|
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index b159c2789961..5e0d0a60d9d5 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -238,6 +238,7 @@ static inline void set_vm_flush_reset_perms(void *addr) { struct vm_struct *vm = find_vm_area(addr); + WARN_ON_ONCE(is_vm_area_hugepages(addr)); if (vm) vm->flags |= VM_FLUSH_RESET_PERMS; }
VM_FLUSH_RESET_PERMS is not yet ready for huge pages, add a WARN to catch misuse soon. Suggested-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Signed-off-by: Song Liu <song@kernel.org> --- include/linux/vmalloc.h | 1 + 1 file changed, 1 insertion(+)