Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp2117298rdh; Sat, 25 Nov 2023 14:27:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9tQ2HvuEx+p50srClm0f65VdSg9n3Fx0uG0YHn4XBLvmo1WgbNFIek2Iwr02evDWVuVhz X-Received: by 2002:a05:6808:1813:b0:3b8:402d:6dcd with SMTP id bh19-20020a056808181300b003b8402d6dcdmr10399144oib.8.1700951248562; Sat, 25 Nov 2023 14:27:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700951248; cv=none; d=google.com; s=arc-20160816; b=lFuaWC5VkxHEw39iutPcCmgM2f4j65+YT3ot6Rfd9NssT04gNkjrTapB8elycpSxrR L7OjQ5LHEr3eZnctcXbDVt78Y+B+cm2sShxixzuf1yVUdoZJipiqhT1Xdt5QEuhQVdrM jK07Ijsu/q6cEG1wCt5InP3h+VspS5tvSPasZvGwJYuPSgavxQwed4tk7lGZfKE2njfr 6f91JPovS3nWNvGUcttzPUHih0eTRpQdEQ/CdxNYsX3THaRDISKxZBYWABnWfB68I5+A cUWDeeVHEEnG2/l7+qjOuXNMkcTit9q08kzS23ga7xHx4g3L+jCQwHW6eV3jiy8P3ZL3 73tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fKa16reHfl305YFqc6i9Xxdo0uDVDkZskHm92kPeg1c=; fh=pGIup0sSOAwsqvH5wS0veiVBU4ebxUgCz9YTDEcWD9U=; b=U0sbx0ju36GDUVFeiBwXQtujVgIY9jztRFwZsr/lcVBkd3478zjlIOQ3cF8gJ1Ps2m 1Q5wOhzlW2SIWmjK1CK32+fl/+BSWwTvwUOjZ79cZOuCtnFMiIJ/mBdO24yVRI1PCf58 u0Ha8PDSW/r+tdvPcrWCh2Hyds90SRCG6v6Q3IyRKT2cUKO+a88Wi5OtJDXPYXBubHJz sk7N3S3Owt40PxlxPAMRRY4os9gdqWwtelUt1++sajGQFKeCD/uzt4yJtZNLQu1Wjorv zVFTuFLMq410GYS+5LnlB3bKjlRm9tPvIeZMnI3+UhkcRdvNFV2UaG5fnNEKM51ifRHL s7vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nD2pWN5l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id d11-20020a631d4b000000b0055be9543340si6177652pgm.872.2023.11.25.14.27.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 14:27:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nD2pWN5l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E6853808A350; Sat, 25 Nov 2023 14:27:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbjKYW0p (ORCPT + 99 others); Sat, 25 Nov 2023 17:26:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230270AbjKYW0n (ORCPT ); Sat, 25 Nov 2023 17:26:43 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AF11189 for ; Sat, 25 Nov 2023 14:26:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700951209; x=1732487209; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=z2qF1yxkjQxwNjJSlS7e6s6wsk55BfzArxL0w4u/DX8=; b=nD2pWN5ljH9dt+zDf40ZG7gsZx8sNZDfergEga2hitUyziebaWl4MASx Tr/ZWJy2l54eIdOiXm3TdFs326nUtWQtQxGZqDBdZ8PgAgisWqqIA3xlq ir9OizmKwUspKjOVPfh22thUxkBzwYa3DJVqGtm4eD3yQCWJY3P0JOob9 nygrtSc8QnX0BpIFp9YJinu91zenE+tA2QKoR23iw5+EIaUwiVs0HqtTo mPeWZJkxpISeezWMpEB0LCVG8Ydst7xnqxfzNaIr+psB4fwpKDMGTJkeq 241o6FhzCBPm8+zCn52KSfRWCbSny6VFsoyz0ekECfeWPTJTUh7OsWHLy w==; X-IronPort-AV: E=McAfee;i="6600,9927,10905"; a="389691516" X-IronPort-AV: E=Sophos;i="6.04,227,1695711600"; d="scan'208";a="389691516" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Nov 2023 14:26:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10905"; a="767781166" X-IronPort-AV: E=Sophos;i="6.04,227,1695711600"; d="scan'208";a="767781166" Received: from lkp-server01.sh.intel.com (HELO d584ee6ebdcc) ([10.239.97.150]) by orsmga002.jf.intel.com with ESMTP; 25 Nov 2023 14:26:44 -0800 Received: from kbuild by d584ee6ebdcc with local (Exim 4.96) (envelope-from ) id 1r716o-0004Tg-1P; Sat, 25 Nov 2023 22:26:42 +0000 Date: Sun, 26 Nov 2023 06:26:08 +0800 From: kernel test robot To: Rong Tao , Andrew Morton , Catalin Marinas , Florent Revest , Kees Cook , David Hildenbrand , Stefan Roesch , Andy Chiu , Josh Triplett , Joey Gouly , Oleg Nesterov , Miguel Ojeda , Ondrej Mosnacek , linux-kernel@vger.kernel.org Cc: oe-kbuild-all@lists.linux.dev, Linux Memory Management List , rtoax@foxmail.com, rongtao@cestc.cn Subject: Re: [PATCH] prctl: Get private anonymous memory region name Message-ID: <202311260535.WXAlmfsl-lkp@intel.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 25 Nov 2023 14:27:15 -0800 (PST) Hi Rong, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on linus/master v6.7-rc2 next-20231124] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Rong-Tao/prctl-Get-private-anonymous-memory-region-name/20231125-220925 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/tencent_977CBF8E8CA6234A1B740A35655D5D7EAA0A%40qq.com patch subject: [PATCH] prctl: Get private anonymous memory region name config: x86_64-randconfig-122-20231126 (https://download.01.org/0day-ci/archive/20231126/202311260535.WXAlmfsl-lkp@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231126/202311260535.WXAlmfsl-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202311260535.WXAlmfsl-lkp@intel.com/ All errors (new ones prefixed by >>): kernel/sys.c: In function 'prctl_get_vma': >> kernel/sys.c:2371:3: error: a label can only be part of a statement and a declaration is not a statement 2371 | const struct anon_vma_name *anon_name = NULL; | ^~~~~ kernel/sys.c:2389:21: warning: passing argument 1 of 'anon_vma_name_put' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 2389 | anon_vma_name_put(anon_name); | ^~~~~~~~~ In file included from kernel/sys.c:10: include/linux/mm_inline.h:363:60: note: expected 'struct anon_vma_name *' but argument is of type 'const struct anon_vma_name *' 363 | static inline void anon_vma_name_put(struct anon_vma_name *anon_name) | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ vim +2371 kernel/sys.c 2361 2362 static int prctl_get_vma(unsigned long opt, unsigned long addr, 2363 unsigned long buf, unsigned long arg) 2364 { 2365 struct mm_struct *mm = current->mm; 2366 const char __user *u_buf; 2367 int error; 2368 2369 switch (opt) { 2370 case PR_GET_VMA_ANON_NAME: > 2371 const struct anon_vma_name *anon_name = NULL; 2372 2373 u_buf = (const char __user *)buf; 2374 error = 0; 2375 2376 mmap_read_lock(mm); 2377 anon_name = madvise_get_anon_name(mm, addr); 2378 if (!anon_name) { 2379 mmap_read_unlock(mm); 2380 error = -EFAULT; 2381 break; 2382 } 2383 2384 if (copy_to_user((char __user *)u_buf, anon_name->name, 2385 strlen(anon_name->name) + 1)) 2386 error = -EFAULT; 2387 2388 mmap_read_unlock(mm); 2389 anon_vma_name_put(anon_name); 2390 break; 2391 default: 2392 error = -EINVAL; 2393 } 2394 return error; 2395 } 2396 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki