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 978F2C2D0CD for ; Thu, 15 May 2025 20:26:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 00A956B000A; Thu, 15 May 2025 16:26:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F03FD6B0095; Thu, 15 May 2025 16:26:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D4BDD6B0096; Thu, 15 May 2025 16:26:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B03FC6B000A for ; Thu, 15 May 2025 16:26:15 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6C8B5E0D55 for ; Thu, 15 May 2025 20:26:16 +0000 (UTC) X-FDA: 83446274352.03.F4A827C Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by imf06.hostedemail.com (Postfix) with ESMTP id AD3FB180011 for ; Thu, 15 May 2025 20:26:13 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=FjN77kU+; spf=none (imf06.hostedemail.com: domain of pawan.kumar.gupta@linux.intel.com has no SPF policy when checking 192.198.163.11) smtp.mailfrom=pawan.kumar.gupta@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747340774; a=rsa-sha256; cv=none; b=D24Sl/9m8gzogaFrLEyOICtEF9ic9oJ7f58e/K2Mtbg//ohBWtu3h++qS9Xd5a6OqmUVfV LL3FIiLHolZdrZ/oG6TpLwYgr+vyzfPeA/Hmf9/64WyrI6a0yyosTMCZ06wniluqVXxU/l wMRtMrAtyGWc/DY5xO80hGW5dHaXGh4= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=FjN77kU+; spf=none (imf06.hostedemail.com: domain of pawan.kumar.gupta@linux.intel.com has no SPF policy when checking 192.198.163.11) smtp.mailfrom=pawan.kumar.gupta@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747340774; 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=jskzeiItkDp5/0FeReBNRJxU/Y8JlxGwQKNw8paxoa8=; b=QVnIA9y9hNkbxbCpfO72NQIV6qB2Kfn/FqDXd94aSJThyrCCZ89tf4jk0qBb0oKRWcd45D URyiJmTcjUX9MzUVK/ob63GfUWpaY46iep0bIa4RGDzwTNssIZJSC2yDDhTqvRCU8z1spz JzE9N3r/JJALoN0HvEYRQ4sB6bmmqFM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1747340773; x=1778876773; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=TxY7a/noT4+XphSwUtR0Qw3R/xm0x/v1iIZu5905ch8=; b=FjN77kU+T7nUwQ5s/k/Lpvs5nlC6icVNvkmA099ORvK3C6kvuVCtsbxe kofVlt9MDLxCj1qPVFd5zT2jM3KNDzECQb6xWmnoK2mqinUI2uZ3bsB74 bS9kO3/5+0IXTZ8FiR567A+NmMF5RrLNH+kVadE4V07s5d02fPlyVyHlT O7JmVPqM3R9vV/eUwnZ8R3SA27YEwfpNJ81SJ5taEyMkQn9cgFIc5HLAK 3IK7Wg0k9XvLw1aaFcV6U019QySVBCjXusA2+cRDnVrI2KUnEXTUtenv4 wQOeuYT6u+M3alWzsUjFWeec1Uc5ClLdElW3wqiGxOldMbE/zMGC5urcu w==; X-CSE-ConnectionGUID: 5HwwyfUVSKGsXF7UWkug4A== X-CSE-MsgGUID: jLYDmnAjQOKL9WmlLxW3rQ== X-IronPort-AV: E=McAfee;i="6700,10204,11434"; a="59938536" X-IronPort-AV: E=Sophos;i="6.15,292,1739865600"; d="scan'208";a="59938536" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 13:26:11 -0700 X-CSE-ConnectionGUID: vUztFMGqQJi1FIgG+GTGMA== X-CSE-MsgGUID: iraNBp1BRJCATn9l8/pqmg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,292,1739865600"; d="scan'208";a="138977709" Received: from gkhatri-mobl.amr.corp.intel.com (HELO desk) ([10.125.146.13]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2025 13:26:11 -0700 Date: Thu, 15 May 2025 13:26:03 -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: <20250515202552.znxvzcnhpdjqmlbm@desk> References: <20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg> <202505150911.1254C695D@keescook> <20250515171821.6je7a4uvmttcdiia@desk> <202505151039.DAA202A@keescook> <20250515175205.th7pjvord6fum35a@desk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250515175205.th7pjvord6fum35a@desk> X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AD3FB180011 X-Stat-Signature: q8stpbtue8u4x8wkqmbfpxmphh7mijeg X-HE-Tag: 1747340773-334736 X-HE-Meta: U2FsdGVkX18S/tK9qhY+o1gafaaV7GuHgoFyJAfs8tsynQWU1pmfrq93ElHTUf++f68YKW4nlmMOAuMP3/L9Gv742wsJLQbICcfNSP8rtKgTHOjK3K39pdeEhQ9RuH7p9Zp2WXrOKG/Qct112Kk46yp081Egvx0zf1F32ZILum+t5cIZscEwUFDgoAlZU8bYnmdbK4n7TyvxtY6hPq+7fOOzY7O+ZzFGJW+n/PUwpyp21NREjkp7e398A0QdPi3H+RBeEetvebnEbLXTZ9FpcL0eDoo5HQGnMbwuP2/SQ95jttLeTca1ff08c1RdlA3gA1lZWsBV2UUsVzDTmM/5Eh474h2a733ZZHzX/yMcKu9vAfOdFMxZUAzGf/PPDTzujNEH3C08+bD2R5rGnBB3sHRFxzA+NKrYsOwfhqFzI+qJ5N8fqGGOdQfklm2ZwQpvs7U9gEcdgCHIvXo3LQENlEweGBvvmct/COGAyIauqAyoCHBIYEOAzIr8W12I3gLv1Vxoh6fs1QoEwm+s2aBq1pbph93c9Kh55dkKfVMHXAVakjdkhW2ROw4t6XPgOjZjyCfk0CBdRJQKrky82b+yTDwtRSim/xasdbfk6Tj9yGXHqrWbFnoD9Z6Bts6BvCDmWOkp/bZOgCjw0o4cNlhHAYEOFrH9ktSD0T+pQQKclURMQZXuSBl0XBOxaoiHj3AlEPVJijMGSg3m3whGqRXsievJcx8GRoQ8J9UBatJ+5+XPIkasy2Yf2Ygj1wmnDs3CZm5roEuItQ8CqPDEnkw/+6jZZqYnt+SnnPZVUCkKXhUD1wSDod4x+TIV9bjF0fG96cnLG7nJ4CW3adkSRgWvEj4Enqv90UzgvC6L57G0p3tsTrJcEiL+cqvlF2A1406KPgXOPj7x7sYcPCqdq5gxZplFyuTZy8ZC9Rigiwl95jDisQdKIEi5IJc85SQQX3e9EnV96/YAYxzRSE8/mFV HgS1+NDd G1JS7Sf9xQ/hWBX/VNSsbK0JdOsLZT7KS00I09trgahqg21dV4UcUfJPF2lbokvfGSOacsA/VPRm2voUigQGJJOmRswPAZRzFT4xQw657TJwfFRCnzaW3CTVFOcmbuUK+h0CsbjZAjGtaEg+Uz05AunFLjSw9A/2QFa8zTERZ8BiPm7kVZE2CdfK8uf/w2AwxbWzFe/GENw+kN0BrHGtCp2l78wZhoGPPVDGCv8Ljv9x9mmyyQvraH1H1w5WT/cF5ng3zA+apC+TIz3VuCv4sr1CfqmPFY6wzS1ip 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:52:13AM -0700, Pawan Gupta wrote: > 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/ I can confirm on v6.14.7-rc2 the test verif_scale_loop3_fail is now passing(in <10 secs) after applying your first patch (mm: vmalloc: Actually use the in-place vrealloc region). The the test passes after applying your second patch also. For some reason I am unable to build the bpf selftests on latest upstream. I may be missing something that is required on latest upstream :-(