Message ID | 20220707223546.4124919-4-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 A802DCCA479 for <linux-mm@archiver.kernel.org>; Thu, 7 Jul 2022 22:36:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 48F9C6B0075; Thu, 7 Jul 2022 18:36:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 43F186B0078; Thu, 7 Jul 2022 18:36:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 21C916B007B; Thu, 7 Jul 2022 18:36:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1503D6B0078 for <linux-mm@kvack.org>; Thu, 7 Jul 2022 18:36:29 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DB9C634E87 for <linux-mm@kvack.org>; Thu, 7 Jul 2022 22:36:28 +0000 (UTC) X-FDA: 79661764056.15.B4DB8F1 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by imf15.hostedemail.com (Postfix) with ESMTP id 70801A0056 for <linux-mm@kvack.org>; Thu, 7 Jul 2022 22:36:28 +0000 (UTC) Received: from pps.filterd (m0109332.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 267KPhSB030988 for <linux-mm@kvack.org>; Thu, 7 Jul 2022 15:36:27 -0700 Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3h5nw2f4te-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for <linux-mm@kvack.org>; Thu, 07 Jul 2022 15:36:27 -0700 Received: from twshared0725.22.frc3.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::f) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Thu, 7 Jul 2022 15:36:24 -0700 Received: by devbig932.frc1.facebook.com (Postfix, from userid 4523) id 8C1649D349C2; Thu, 7 Jul 2022 15:36:06 -0700 (PDT) From: Song Liu <song@kernel.org> To: <bpf@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-mm@kvack.org> CC: <daniel@iogearbox.net>, <kernel-team@fb.com>, <x86@kernel.org>, <dave.hansen@linux.intel.com>, <rick.p.edgecombe@intel.com>, <mcgrof@kernel.org>, Song Liu <song@kernel.org> Subject: [PATCH v6 bpf-next 3/5] vmalloc: WARN for set_vm_flush_reset_perms() on huge pages Date: Thu, 7 Jul 2022 15:35:44 -0700 Message-ID: <20220707223546.4124919-4-song@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220707223546.4124919-1-song@kernel.org> References: <20220707223546.4124919-1-song@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-GUID: WJvjTnquoat1m-feBYyqX0S8Gt6_JmtT X-Proofpoint-ORIG-GUID: WJvjTnquoat1m-feBYyqX0S8Gt6_JmtT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-07-07_17,2022-06-28_01,2022-06-22_01 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657233388; 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=7SpS0eTSk+dIwsOkOvbwE7M6VhiTubOfZqa+CZotE4k=; b=Pv4FyV9Y8ZvrCLetgaRqIRry1b7PRR3HT4bKMUwTDaJpq+XlM+svRAcPnN47G6J6ptXU2x EkjwBs6XuFEBWGZibIi3EHqV2Lv022BmdQqi+8hThD/AhpLuHWvuSt7fscs+yQzx2fAX65 N+0xikOR1kdelfvl7pu/oUJnWeY2zco= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657233388; a=rsa-sha256; cv=none; b=2DAiWRC3+WS0tH4QpC83QygstRJyrHGaTMUxPrK83pFRf8k5etiCbMNwD6I0zE4birWAgG WsIAWOByffsyuOKy9peu1ptGwZ/0AsXBnCxkfFXyXCbMfF4CkADYL19o/Syhwp/S1LPQ19 z6U+q6nduAFxvXaYboqjLRro3LseWxA= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=kernel.org (policy=none); spf=none (imf15.hostedemail.com: domain of "prvs=8187d1962c=songliubraving@fb.com" has no SPF policy when checking 67.231.153.30) smtp.mailfrom="prvs=8187d1962c=songliubraving@fb.com" Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=kernel.org (policy=none); spf=none (imf15.hostedemail.com: domain of "prvs=8187d1962c=songliubraving@fb.com" has no SPF policy when checking 67.231.153.30) smtp.mailfrom="prvs=8187d1962c=songliubraving@fb.com" X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 70801A0056 X-Stat-Signature: g9gbkxszfnb4rnemdxx5feq7ibu1wm7h X-Rspam-User: X-HE-Tag: 1657233388-446528 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 096d48aa3437..59d3e1f3e108 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -239,6 +239,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(+)