Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp61822rbb; Fri, 23 Feb 2024 11:46:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUoCnRUJZNS54ntuhr9LV0ndBoIBQw+ZGc6XriJZF8UdodnKdjBky9DpryirBkssJyGPt2ACQTsByVg1Op3TfL33yHicFLu05mTjfDKpA== X-Google-Smtp-Source: AGHT+IG9kq/n3uuOjk1gCwHBJRAelnX7d9HISq/shkJxEEIbL/JXsquJwG7kJ0+NKGLxm6tPTmqZ X-Received: by 2002:a05:622a:1186:b0:42e:687c:e9c1 with SMTP id m6-20020a05622a118600b0042e687ce9c1mr169470qtk.19.1708717584615; Fri, 23 Feb 2024 11:46:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708717584; cv=pass; d=google.com; s=arc-20160816; b=G284wkl3l0MkZEFO/EWtX4G7CRMRRwjGQeLbuKuxVLqaicQkbft2pXhl/91uEriD/l xv8nAfudCJ0zNNupI+boW4l44b64gQ+MXiaL9yZzHpOdl3VFaoXUecumGuK0Qp45hHm9 Yv/BV9ZAgT4NCPk7qKQsM6uWKMKIkwwkNFm/jIyLTz86AR1wQJpN954yMznLrnvI5moP MgjOSVcDHsGs3G7L75rpoLuzq4TXxkpTmIyOG7QLM+kTK3hQDOUiTxuvGeFkORV+LWRU DguLzJ8diBrn7kzJRbdY5uMhG4yMpGnhAPGbWJgJ0An3c0u+EmsFZsp0ZXcrLt9npt9p NEUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=JsO1G2InL9NzHPacmQvq44OOQ6svIof5IQXb3OyW0QQ=; fh=tjWG4/l9cMi5PLixdG3Izk4F1ocn8vSHnFP8kZlS2O4=; b=R79tFsy8o4q6BeaPHn0lsthftxEJ3XgjLcETWssyCKfnjbfWVzCsMfgv0bsidxeprn WhLwQ6i3/vuBAcmwN2v87RuEfHAXXn7nU1NRxWWKGyDN11QMDbt1k4WRdsciF/aiMlFX jsiqgH6ebfWpDrk9zx+DdMgwGjEon2MLU0ysEIbX6x88JLxKN1kdAZrDsQ63STDYdOFf pHM3ftT2buSh9vcyQCWdVxDesnMJPTulPiPAsl1fyJ4rg3EcsMuxYdtHffA0xFK0z5k9 zROgzjStDHxKB66fo62wCn9BzySYtO22lT3Psp557nBDnxoP/jBtDciccFjO5i2XMaYs z0mQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rBY591L9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o1-20020ad45c81000000b0068fa310bfddsi6820160qvh.343.2024.02.23.11.46.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 11:46:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rBY591L9; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-79050-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79050-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5F5CD1C22EA8 for ; Fri, 23 Feb 2024 19:46:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D77714535B; Fri, 23 Feb 2024 19:46:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rBY591L9" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B456F140362; Fri, 23 Feb 2024 19:46:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717571; cv=none; b=pStvtSwAm80eKgo9MtFANMIJRCCGpveJJXBaigiIJ06kf9BrVW0kXx5GWAYtTHUUGOowGeQYT076f+IT6d9tMp1ozj1l4oOf6VpfSI8IVuToFu86gaPuyIUi1FgvwdzEK76DnuvVrDW5v4Sy6sNdiEPKKQ1pteVrLq0Boy3pZxk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708717571; c=relaxed/simple; bh=mqXIqQqf6lEU0XrKwLtMVJZ8Wp9+q4U3TbvXwfpGX1c=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GOcnjnfY8dQCj6RL/RCbyUn56r7W24lPqrEg/AL0xpj38QEvNxMRGNgl1hsUipU0UDfgXukQ72kVW7vq1J7Rho2W5erjsEMo473odCW7f1FCddRaP6UY9JAbae99rf56Kc4SZ0TmAiBUuRS0ARTpq23Z9Q+hShYp9Vt6yH2jOvA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rBY591L9; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30F75C433F1; Fri, 23 Feb 2024 19:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708717571; bh=mqXIqQqf6lEU0XrKwLtMVJZ8Wp9+q4U3TbvXwfpGX1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rBY591L9wR07ev+vEtAYAv/reBCABFbtOgNeMpRxjnciE3UA7huMzcdReYLjVz3gi KYhDSQVNFPE3o+Q00EqAC8c+XVTcVzFOtcdhpcP+EMvW8+8KoW0mJBYo5vulfCTnAy CIsSN/G1XgaDiPxmL4rSUyqgfNbN9D1m66e3o8UDpBchfTj/dMHKeadLDNNcmfzMwc r0s73vKccWUyjWcuy76K4kLrqJi7xJjMeDG9foZKLKdwCG+gNHzghar5lCllhLlld6 xC2S+NjQYOO38eNyEPgynt8iV5JzDyWkL3YiNF2HVApsc5ESZeFTfPdN8Fs4WoxxHa vH5uKuyqvtDiA== Date: Fri, 23 Feb 2024 20:46:04 +0100 From: Benjamin Tissoires To: Alexei Starovoitov Cc: Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Jiri Kosina , Benjamin Tissoires , Jonathan Corbet , Shuah Khan , bpf , LKML , "open list:HID CORE LAYER" , "open list:DOCUMENTATION" , "open list:KERNEL SELFTEST FRAMEWORK" Subject: Re: [PATCH RFC bpf-next v3 02/16] bpf/verifier: introduce in_sleepable() helper Message-ID: References: <20240221-hid-bpf-sleepable-v3-0-1fb378ca6301@kernel.org> <20240221-hid-bpf-sleepable-v3-2-1fb378ca6301@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Feb 22 2024, Alexei Starovoitov wrote: > On Wed, Feb 21, 2024 at 8:25 AM Benjamin Tissoires wrote: > > @@ -18193,7 +18198,7 @@ static int resolve_pseudo_ldimm64(struct bpf_verifier_env *env) > > return -E2BIG; > > } > > > > - if (env->prog->aux->sleepable) > > + if (in_sleepable(env)) > > atomic64_inc(&map->sleepable_refcnt); > > this one doesn't look correct. > The verifier didn't start its main loop when resolve_pseudo_ldimm64() > is called. > It also loses symmetry with other sleepable_refcnt operations > in syscall.c and core.c > > I reverted this hunk and applied patches 1,2,3 > with minor edits, like removing unnecessary parens in patch 3, > and patch subject rewords. Thanks a lot. I'll work on the rest of the series next week. Cheers, Benjamin