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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AA6AC3ABDD for ; Thu, 15 May 2025 17:52:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC1106B00A5; Thu, 15 May 2025 13:52:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C495A6B00A6; Thu, 15 May 2025 13:52:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEB4B6B00A7; Thu, 15 May 2025 13:52:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 8B3BA6B00A5 for ; Thu, 15 May 2025 13:52:16 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id BE9581A043D for ; Thu, 15 May 2025 17:52:17 +0000 (UTC) X-FDA: 83445886314.06.4B6344B Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by imf26.hostedemail.com (Postfix) with ESMTP id 16C8914000B for ; Thu, 15 May 2025 17:52:14 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ONLsvCEs; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf26.hostedemail.com: domain of pawan.kumar.gupta@linux.intel.com has no SPF policy when checking 192.198.163.9) smtp.mailfrom=pawan.kumar.gupta@linux.intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747331535; a=rsa-sha256; cv=none; b=5TQRjET5C5sJ1BIPlt3mFKc17lyFVHUOo8aG3oOf2XCIZJoMi+nprsM5Xn54HAqWxMEHuu gjjQpkZjkKTmW5AZfy97ZlZX1AcILUq97LsXiP3tEfQ3xbLD8i+JwFWj0GlljVlJi2jcVO pxUUusbE7mZrYA+PMfLv9Y5hVW2cEDg= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=ONLsvCEs; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf26.hostedemail.com: domain of pawan.kumar.gupta@linux.intel.com has no SPF policy when checking 192.198.163.9) smtp.mailfrom=pawan.kumar.gupta@linux.intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747331535; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=swdgqewH/I4mPLJjWJi489CCc2/GpINwSFvpdBVSVgc=; b=TAbbh8KPtPQwt+2YwBuCIBuxkm2a4F76c8iiYmLyTBm7BeQZ+ICXSfDdJG4NiQAq8M3Mnb eyJ23yVZ0CaP8BtnOWrz8JZJmloni6+EkaxOdjOz48UHW+jb8QnSkgF5FD3pWDvDs5LsW8 3fehFcUsjc6CNTV9jE+XYSw5DVLYXhE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747331535; x=1778867535; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=m/TOlmyn+s2/Ige0FOwKesnagDQC/gXqCDf28q5+pLo=; b=ONLsvCEs5iAe5+dE+2plP275bG3s2gp12ER1fKNfefw0IywXid0BIEv8 Gy1dnfhlnbGvE0/9vP7C428Z12BCvDbYUNtgRIpm9VmrbCH+53il1aJ9H 4pAbJ1d2wuMnUphfrshghUhHnBq7b+nEOLez5s5rkKpLSxgp4vgQmHR9V rujhKJqfp1rwakvWE50p9Z21Hj3roy+YXcC+Y68bUx72beWzTVcBtXMch R/P5UpFVZLMUqZdRkoIoDCerTnTU/1acVDrZ7RYZjKaWcS24ivyJ9xI8R ip/nQqy4i6tTmBct/yIYM26ETMZe8FaLg63GEUVE4Sv+Yh2XYUSmcNrbX w==; X-CSE-ConnectionGUID: ng5W7MSPRE6S4dcH7MFV3Q== X-CSE-MsgGUID: gamRbGR0R12iqaLKSVickQ== X-IronPort-AV: E=McAfee;i="6700,10204,11434"; a="59941501" X-IronPort-AV: E=Sophos;i="6.15,291,1739865600"; d="scan'208";a="59941501" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 10:52:13 -0700 X-CSE-ConnectionGUID: Qruo5h3UT56HNd7t0fDJRw== X-CSE-MsgGUID: frud17EwTh2NliK0R4UTNQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,291,1739865600"; d="scan'208";a="143333504" Received: from gkhatri-mobl.amr.corp.intel.com (HELO desk) ([10.125.146.13]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 10:52:13 -0700 Date: Thu, 15 May 2025 10:52:05 -0700 From: Pawan Gupta To: Kees Cook Cc: Shung-Hsi Yu , bpf@vger.kernel.org, linux-mm@kvack.org, Andrii Nakryiko , Ihor Solodrai , Andrew Morton , Michal Hocko , Vlastimil Babka , Uladzislau Rezki , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, regressions@lists.linux.dev, Greg Kroah-Hartman , Alexei Starovoitov , Daniel Borkmann , Eduard Zingerman Subject: Re: [REGRESSION] bpf verifier slowdown due to vrealloc() change since 6.15-rc6 Message-ID: <20250515175205.th7pjvord6fum35a@desk> References: <20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg> <202505150911.1254C695D@keescook> <20250515171821.6je7a4uvmttcdiia@desk> <202505151039.DAA202A@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202505151039.DAA202A@keescook> X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 16C8914000B X-Rspam-User: X-Stat-Signature: 3og8epjz7wx3rxe38ryh33oiestfisgd X-HE-Tag: 1747331534-278535 X-HE-Meta: U2FsdGVkX18VKIg/FU0FFvfIKubYWBp18iFEADqkiKrOKuCOKvVME7AlCiSjzFQ6tpWSabv1jcpqLJ63pZ8hUQ7VsGTVXdgCvM2u3zUkKA2eIrIK0YyB/Kd2E3EtnXb1Wx7vUBBXGENhjG+4MSKq/zb9IfnWsBYVRJFy4DZ7HpVsZnNl/1lXg/AtTsLfq70NO/3boUcxXszQ3Oj5NK+SgS9RDN5TGior9VVlar3JzWIy5qHjwGfS8PizeDstTopp6276zfiHMoWz6acRexb6lYmAt4LbGHmhiKg7r1+0jUR25wvJofDL5RToINDRLhLySZqgC7UDMmuF135glTU9q2uJCtTiV3Y9ONdmgwLt1W7cxjZnbDpjVWz8rIDZblvnV/c8hXCXbt1pTG7jKBJbz3ws7TB1afwzeg/3clHIwVk2KOSZrFMSp1JpsVp3gOTJO5wU2zVAtuq6rZbgDibGN2L2htVT5UzREoAwoqCSeSvwio+6GKk0tALQVOMr+EPAlb5M1/J6jL9dhQxzOp23RdsZJFXstfBniykeokeEceB4F0HI0vUjylK2Uw/+oVIz/M/G1b5g/Fmx7AFVtJtuVeNYJjqrD6tz3Ta6eRdEmuc8u/gsbKV8Iy3WzQh2ufGkUXjXso987u9USo+YK/trYYjOYbMDtEfwzkE8h8TP5DWGW5ddH/eO5ylEIXBWZivBR7sguuOsa+pkrUAObUOQYqsIKqZi444PuykRCFfeGLEy+mouyz9yRwSvWCiwUII5/F3BHq8LW1kygCkp1IR8rmxo8Uk6IsdJiZ4xeRZ6O+sMhN/r+NlwTN/4/ZkdbrZ0aqJtwQWo0ZhLwvMduGhBaBmeaLTaO9Bhz2iR61w45ryH/Dyr35EZmwpbFwpQRuBI3mauQQ2Nd/2IaHU+zACCqU2f80huVq+EpxlSO8xHpuhd1Z5m7k5b0rG7HnNplhjavtDWWD2xkfAA1TpPBEk UotD9ABz 4iFhqitiSNIG+ihImLt5mT6claJmayt5MJ3TZB0ZNBONpXj5cw7dfirvB9qk20Un1IbDVk95KOkr1U/sIk1zQHRn24UE5G7gi/l5rMXXQ4SMJkK867mlK+jtswvK+XPS8wUkNJEP9ZqyvcqbELnoNfr77sAbHGlUFPNiiXZ5fT/oFPN0xDAQZffAvjSv5py5LnTCqz97EUzEZWnz1i1SokO5Bma9BjhO/+NZxI3LaPUepLEgX6k2yHg1Nm3WncczuicJ/2KrQx7OmKqOESCZ/ieOP71pBu6xn7xcL 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: List-Subscribe: List-Unsubscribe: On Thu, May 15, 2025 at 10:41:41AM -0700, Kees Cook wrote: > On Thu, May 15, 2025 at 10:18:21AM -0700, Pawan Gupta wrote: > > On Thu, May 15, 2025 at 09:51:15AM -0700, Kees Cook wrote: > > > On Thu, May 15, 2025 at 07:51:26AM -0700, Kees Cook wrote: > > > > On May 15, 2025 6:12:25 AM PDT, Shung-Hsi Yu wrote: > > > > >There is an observable slowdown when running BPF selftests on 6.15-rc6 > > > > >kernel[1] built with tools/testing/selftests/bpf/{config,config.x86_64}. > > > > [...] > > > > Where can I find the .config for the slow runs? > > > > > > Oops, I can read. :) Doing a build now... > > > > > > > And how do I run the test myself directly? > > > > > > I found: > > > https://docs.kernel.org/bpf/bpf_devel_QA.html > > > > > > But it doesn't seem to cover a bunch of stuff (no way to prebuild the > > > tests, no info on building the test modules). > > > > > > This seems to be needed: > > > > > > make O=regression-bug -C tools/testing/selftests/bpf/test_kmods > > > > > > But then the booted kernel doesn't load it (missing signatures?) > > > > > > Anyway, I'll keep digging... > > > > After struggling with this for a while, I figured vmtest.sh is the easiest > > way to test bpf: > > > > ./tools/testing/selftests/bpf/vmtest.sh -i ./test_progs > > I can't even build the test_progs. :( > > $ make test_progs > ... > CLNG-BPF [test_progs] bpf_iter_tasks.bpf.o > progs/bpf_iter_tasks.c:98:8: error: call to undeclared function 'bpf_copy_from_user_task_str'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > 98 | ret = bpf_copy_from_user_task_str((char *)task_str1, sizeof(task_str1), ptr, task, 0 > ); > | ^ > 1 error generated. I just tried on the latest upstream, and I am getting the same error. My earlier bisection was on a stable-rc for 6.14.y: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?h=linux-6.14.y ... where it was first reported: https://lore.kernel.org/stable/20250515041659.smhllyarxdwp7cav@desk/