From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7208BC433DB for ; Mon, 18 Jan 2021 08:12:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEA3D2255F for ; Mon, 18 Jan 2021 08:12:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEA3D2255F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 04C1B6B02DC; Mon, 18 Jan 2021 03:12:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F3E316B02FD; Mon, 18 Jan 2021 03:12:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DDFB76B030A; Mon, 18 Jan 2021 03:12:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id C5F916B02DC for ; Mon, 18 Jan 2021 03:12:15 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 805A7181AF5C7 for ; Mon, 18 Jan 2021 08:12:15 +0000 (UTC) X-FDA: 77718178230.25.form58_2a07c8327547 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id 6121E1804E928 for ; Mon, 18 Jan 2021 08:12:15 +0000 (UTC) X-HE-Tag: form58_2a07c8327547 X-Filterd-Recvd-Size: 8213 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Mon, 18 Jan 2021 08:12:14 +0000 (UTC) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 10I821bR158092; Mon, 18 Jan 2021 03:12:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=gA33kknnvb+2xQbZdpY1UpRRsa/1QqPLwys19TZrPzg=; b=j8q3GgRji9sFtV80tZG/y8ipdxmNz9zcRxvXgJXNzTs0J5ZUgSXLpU+Oig98SRAfBxPu SUa80EHV5Tr03UTrkvE5vLr6JsKh0YF+vMfEH3TbIeJNhkgQeFJzpzEV9Sk38hYjp/8Z bHzJDveLWCZ9Bl6BjrQM4t+9/qdF2D4UDn61W9bNZWP0H+R7YqyYfcZFV1YAYFbmS9VE O8hy7g0gVBlYtwmqcugSBEY9RtwBx8qC7loroy3M9B65aWDV41E5oHMlQgAKp4u5jlaV vnhbLx0QNZzhSIjr4lUQEHQ2zug1MJ/o05bCdKTrU90VTqAt2FWaXrQdPypF5W40AMn2 Ag== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0b-001b2d01.pphosted.com with ESMTP id 3654ve2pt9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Jan 2021 03:12:11 -0500 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 10I87PwA019566; Mon, 18 Jan 2021 08:12:09 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03ams.nl.ibm.com with ESMTP id 363qs7htbt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 18 Jan 2021 08:12:09 +0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 10I8C70Q31457602 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 18 Jan 2021 08:12:07 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6AC1A40B1; Mon, 18 Jan 2021 08:12:06 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 245EEA40CF; Mon, 18 Jan 2021 08:12:05 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.59.198]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Mon, 18 Jan 2021 08:12:04 +0000 (GMT) Date: Mon, 18 Jan 2021 10:12:02 +0200 From: Mike Rapoport To: kernel test robot Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List , Andrew Morton Subject: Re: [linux-next:master 3945/3956] mm/secretmem.c:107:6: error: implicit declaration of function 'mlock_future_check' Message-ID: <20210118081202.GV832698@linux.ibm.com> References: <202101180834.8JuxblXK-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202101180834.8JuxblXK-lkp@intel.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2021-01-18_07:2021-01-15,2021-01-18 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 adultscore=0 spamscore=0 impostorscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 clxscore=1011 suspectscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101180044 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: On Mon, Jan 18, 2021 at 08:44:40AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: b3a3cbdec55b090d22a09f75efb7c7d34cb97f25 > commit: 5577d3803e8c46cfe63791e5fd0cb2c782d4db3b [3945/3956] mm: introduce memfd_secret system call to create "secret" memory areas > config: riscv-randconfig-r003-20210118 (attached as .config) > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project bfd75bdf3fd62d4f5e7028d4122f9ffa517f2a09) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install riscv cross compiling tool for clang build > # apt-get install binutils-riscv64-linux-gnu > # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5577d3803e8c46cfe63791e5fd0cb2c782d4db3b > git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git > git fetch --no-tags linux-next master > git checkout 5577d3803e8c46cfe63791e5fd0cb2c782d4db3b > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > ^ > In file included from mm/secretmem.c:14: > In file included from include/linux/pagemap.h:11: > In file included from include/linux/highmem.h:10: > In file included from include/linux/hardirq.h:10: > In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: > In file included from include/asm-generic/hardirq.h:17: > In file included from include/linux/irq.h:20: > In file included from include/linux/io.h:13: > In file included from arch/riscv/include/asm/io.h:149: > include/asm-generic/io.h:1005:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] > return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; > ~~~~~~~~~~ ^ > >> mm/secretmem.c:107:6: error: implicit declaration of function 'mlock_future_check' [-Werror,-Wimplicit-function-declaration] > if (mlock_future_check(vma->vm_mm, vma->vm_flags | VM_LOCKED, len)) > ^ > 7 warnings and 1 error generated. > > > vim +/mlock_future_check +107 mm/secretmem.c > > 99 > 100 static int secretmem_mmap(struct file *file, struct vm_area_struct *vma) > 101 { > 102 unsigned long len = vma->vm_end - vma->vm_start; > 103 > 104 if ((vma->vm_flags & (VM_SHARED | VM_MAYSHARE)) == 0) > 105 return -EINVAL; > 106 > > 107 if (mlock_future_check(vma->vm_mm, vma->vm_flags | VM_LOCKED, len)) > 108 return -EAGAIN; > 109 > 110 vma->vm_ops = &secretmem_vm_ops; > 111 vma->vm_flags |= VM_LOCKED; > 112 > 113 return 0; > 114 } > 115 > The patch vs v5.11-rc3-mmots-2021-01-12-02-00 below should fix this: >From 51b925943bcf65b82d2ba3b30082a0665681585c Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Mon, 18 Jan 2021 10:03:29 +0200 Subject: [PATCH] riscv/Kconfig: make direct map manipulation options depend on MMU ARCH_HAS_SET_DIRECT_MAP and ARCH_HAS_SET_MEMORY configuration options have no meaning when CONFIG_MMU is disabled and there is no point to enable them for the nommu case. Add an explicit dependency on MMU for these options. Reported-by: kernel test robot Signed-off-by: Mike Rapoport --- arch/riscv/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 2ef05ef921b5..dd295dba8a8d 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -25,8 +25,8 @@ config RISCV select ARCH_HAS_KCOV select ARCH_HAS_MMIOWB select ARCH_HAS_PTE_SPECIAL - select ARCH_HAS_SET_DIRECT_MAP - select ARCH_HAS_SET_MEMORY + select ARCH_HAS_SET_DIRECT_MAP if MMU + select ARCH_HAS_SET_MEMORY if MMU select ARCH_HAS_STRICT_KERNEL_RWX if MMU select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT -- 2.28.0 -- Sincerely yours, Mike.