Message ID | 20231012064048.433346-1-samasth.norway.ananda@oracle.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1026540vqb; Wed, 11 Oct 2023 23:41:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IECAr75j9Rzv667lf6OhH+FQTsexUl0VqshFTBBFxMxZQc1jvrd6ZvXruIZu1Ykrb2eWz6d X-Received: by 2002:a05:6871:4309:b0:1e9:adec:bf5e with SMTP id lu9-20020a056871430900b001e9adecbf5emr1724508oab.2.1697092877507; Wed, 11 Oct 2023 23:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697092877; cv=none; d=google.com; s=arc-20160816; b=a+g6q16K6bPg7qqVRqyJTMQNTk3/ZI+pp62STNihKiJWBb8n6/0+RBVEgOPjFn8jd2 6FcYmImyNsaa6BVt7ALBQsF3/NS3plsiP1AK9ndHvtBtTMUJN+HAv5PKVCIpEUmk0Skf qAPTehuFpFEiL66Jw37bwe3X+gCetxt95CDCQyD/XrMsGY9ofogHkkavld0ONSoFezZn h15QOCCFLlxq8HTZxsf65Oi1s9ZshcSHz6X5nEe6EZBOUV/M5TXSeCEKoDHmmYCs6waC G27cVeLb20re7NngmVyPbQ7vq5MH9SVbBGaLNY1iWMUdkffoASCxLs4t6X0rcPqz2sIh +w0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=n0TLwEL98fn7ookMRf7+1+Dad/ghQuV6H54GoWPDmHw=; fh=ZVLyAnsXSkzuxmOpH7RkG2kZD1e+q+bAVuWcYNW+kD8=; b=vEMn72YWQrrWsVLRfg5EInISpHDJnZJI2562YV6TJLK+t6JrkWzMV4y1hABeH1iUS6 9xesRRVidObR01r/1FNDxxO/9LxlGkBdN8zEIrHp1Un/+8Wl1zA+gMTy5mpWwfOdKi7X MLxT6CBHLcOd/zxs4MqsmH7otY0X73KCa+45daqEZ9m+0HY43Z5OB3GkxoOjmofYE5cc 9Fax5m6DIjXvvPvlgmYfjQecaBkD+jxnR3FhEorfeyhzFrB4KGvT9RaPRvXTJID+OyNM /yOMfq8eJLLLq7m4Qup/M2pUMOF1SDPVmuKafSoG8Z/LzPENUSeCyzr0tWU3wKs1RY9g lz1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Q9ADJqma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id r3-20020a63ce43000000b0056476f15584si1647286pgi.541.2023.10.11.23.41.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 23:41:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=Q9ADJqma; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 36FD18040D70; Wed, 11 Oct 2023 23:41:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377418AbjJLGlE (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Thu, 12 Oct 2023 02:41:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235305AbjJLGlB (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Oct 2023 02:41:01 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EACA8C9; Wed, 11 Oct 2023 23:41:00 -0700 (PDT) Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39BKSwtA012765; Thu, 12 Oct 2023 06:40:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=n0TLwEL98fn7ookMRf7+1+Dad/ghQuV6H54GoWPDmHw=; b=Q9ADJqmasrKLphCPFmBIbgQxPgj8o/G9ADjov7svxzodoknVO9QX8D1J2oS5T6U+tulm MqXasPKGkP9B5SrGqe7OojETVQbZh5Z0FcDW+domc6VNOUOBFe00sTsdrtZucoTE+HqQ /sl1kSU/F6Vl1NIbajkAU2wqny5zdu3DqVgo/H9+XTIRYoX4VrMVaabsReRuIcTRnVGo 2pYyzTadKzTUhdnQqisSNb8cAXYJaXtZJDxfI6CEdA5a28QyIdAVtu8dyvoyXKGLxTmK 1I9jXOe170fQS8sBHu2uudIvkVDfWiv0v/fCJXgkrNFzFpTI2C0fCyYUiuUTCkFK8d90 Kw== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3tjycdt0qq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Oct 2023 06:40:51 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 39C59TlQ019707; Thu, 12 Oct 2023 06:40:50 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3tjws9u9nv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Oct 2023 06:40:50 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39C6bT53011784; Thu, 12 Oct 2023 06:40:50 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3tjws9u9nd-1; Thu, 12 Oct 2023 06:40:50 +0000 From: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> To: akpm@linux-foundation.org, shuah@kernel.org, usama.anjum@collabora.com Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, samasth.norway.ananda@oracle.com Subject: [PATCH 1/1] selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier Date: Wed, 11 Oct 2023 23:40:48 -0700 Message-ID: <20231012064048.433346-1-samasth.norway.ananda@oracle.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-12_02,2023-10-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 spamscore=0 mlxlogscore=970 mlxscore=0 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310120056 X-Proofpoint-ORIG-GUID: Ag4CSe5MK_kypB543P9QNUQUHXh3srhH X-Proofpoint-GUID: Ag4CSe5MK_kypB543P9QNUQUHXh3srhH X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 11 Oct 2023 23:41:15 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779530861371885048 X-GMAIL-MSGID: 1779530861371885048 |
Series |
[1/1] selftests/mm: include mman header to access MREMAP_DONTUNMAP identifier
|
|
Commit Message
Samasth Norway Ananda
Oct. 12, 2023, 6:40 a.m. UTC
Definition for MREMAP_DONTUNMAP not present in the selftest for
mremap_dontunmap thus throwing an undeclared error when running make
on mm.
Fixes: 0183d777c29a ("selftests: mm: remove duplicate unneeded defines")
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/linux-mm/CA+G9fYvV-71XqpCr_jhdDfEtN701fBdG3q+=bafaZiGwUXy_aA@mail.gmail.com/
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
---
tools/testing/selftests/mm/mremap_dontunmap.c | 1 +
1 file changed, 1 insertion(+)
Comments
On 10/12/23 11:40 AM, Samasth Norway Ananda wrote: > Definition for MREMAP_DONTUNMAP not present in the selftest for > mremap_dontunmap thus throwing an undeclared error when running make > on mm. Thanks for sending the patch. You have mentioned in other email that MREMAP_DONTUNMAP isn't present in glibc older than 2.32. So including linux/mman.h solves the build error for people having older glibc. Please add this to the description of the patch to give the exact reason this patch should be accepted. > > Fixes: 0183d777c29a ("selftests: mm: remove duplicate unneeded defines") > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> > Closes: https://lore.kernel.org/linux-mm/CA+G9fYvV-71XqpCr_jhdDfEtN701fBdG3q+=bafaZiGwUXy_aA@mail.gmail.com/ > Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> > --- > tools/testing/selftests/mm/mremap_dontunmap.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/mm/mremap_dontunmap.c b/tools/testing/selftests/mm/mremap_dontunmap.c > index ca2359835e75..a06e73ec8568 100644 > --- a/tools/testing/selftests/mm/mremap_dontunmap.c > +++ b/tools/testing/selftests/mm/mremap_dontunmap.c > @@ -7,6 +7,7 @@ > */ > #define _GNU_SOURCE > #include <sys/mman.h> > +#include <linux/mman.h> > #include <errno.h> > #include <stdio.h> > #include <stdlib.h> Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
On 10/12/23 1:06 PM, Muhammad Usama Anjum wrote: > On 10/12/23 11:40 AM, Samasth Norway Ananda wrote: >> Definition for MREMAP_DONTUNMAP not present in the selftest for >> mremap_dontunmap thus throwing an undeclared error when running make >> on mm. > Thanks for sending the patch. > > You have mentioned in other email that MREMAP_DONTUNMAP isn't present in > glibc older than 2.32. So including linux/mman.h solves the build error for > people having older glibc. Please add this to the description of the patch > to give the exact reason this patch should be accepted. > >> >> Fixes: 0183d777c29a ("selftests: mm: remove duplicate unneeded defines") >> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org> >> Closes: https://lore.kernel.org/linux-mm/CA+G9fYvV-71XqpCr_jhdDfEtN701fBdG3q+=bafaZiGwUXy_aA@mail.gmail.com/ >> Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com> >> --- >> tools/testing/selftests/mm/mremap_dontunmap.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/tools/testing/selftests/mm/mremap_dontunmap.c b/tools/testing/selftests/mm/mremap_dontunmap.c >> index ca2359835e75..a06e73ec8568 100644 >> --- a/tools/testing/selftests/mm/mremap_dontunmap.c >> +++ b/tools/testing/selftests/mm/mremap_dontunmap.c >> @@ -7,6 +7,7 @@ >> */ >> #define _GNU_SOURCE >> #include <sys/mman.h> >> +#include <linux/mman.h> >> #include <errno.h> >> #include <stdio.h> >> #include <stdlib.h> > Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Just to add more context, the build error doesn't trigger on latest glibc. I've tested building this test with glic 2.31 and there is build error. This patch fixes the build error. >
On 10/12/23 1:06 AM, Muhammad Usama Anjum wrote: > You have mentioned in other email that MREMAP_DONTUNMAP isn't present in > glibc older than 2.32. So including linux/mman.h solves the build error for > people having older glibc. Please add this to the description of the patch > to give the exact reason this patch should be accepted. > Thanks Usama. I will send out a v2 patch with updated description as you suggested.
diff --git a/tools/testing/selftests/mm/mremap_dontunmap.c b/tools/testing/selftests/mm/mremap_dontunmap.c index ca2359835e75..a06e73ec8568 100644 --- a/tools/testing/selftests/mm/mremap_dontunmap.c +++ b/tools/testing/selftests/mm/mremap_dontunmap.c @@ -7,6 +7,7 @@ */ #define _GNU_SOURCE #include <sys/mman.h> +#include <linux/mman.h> #include <errno.h> #include <stdio.h> #include <stdlib.h>