Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp703482rdb; Thu, 22 Feb 2024 17:56:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUKEkQBnTuxk+DF7ji+v2ykj0K6fEVGDZ/7ynV8JzSRZ61vRwFGnJUJpJUQTLQYCFVMeEYgEMe7duO6A6TcpCW0+/tsZyg2s9gnqKuC3A== X-Google-Smtp-Source: AGHT+IHX8tU7WrH8cqx8ehSf5H69l4LZArxniDBKIzh5ANHFI/OdhvDV/Or9/3e6QQu4wDsyY3rC X-Received: by 2002:a05:6a20:7289:b0:1a0:d25b:aa93 with SMTP id o9-20020a056a20728900b001a0d25baa93mr1081932pzk.20.1708653406137; Thu, 22 Feb 2024 17:56:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708653406; cv=pass; d=google.com; s=arc-20160816; b=wo1SLqaxOI8GzNtelGeF5yfTzyqZ+hmyJdT2pe1/6c1dbnzwsDhYlM72QMG8VS+1E7 g5ZyUFqb2rJ6Az0ncimWW+h8uz5UpXwezg8z+m5GO0yo+9u6SORIuw4YVCOMOYZbonlK Ta++mx1aInqE4OhbiDk9tqlDw20Qa9tclPR+M+mfE5RPD7HgUM+vcFRItiEr8CuA928L 8DuhRsrBxRHUyZCBk+G1stNH+rFFXDSh1q4s+muUxGMDPPcI8BncWGT8DMA5he9OWoK4 wz96bnKghkwy5/U5Ll/HZpBcXKr98aNj18fFuSDsnnVZ6oajKPdaui0RGZS2/y9H7KsE qFHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=iUdZVH+IyHyUk6BumjJJBqY/HP0jfnVa+1NxERJx/L0=; fh=yZoSq4vrUrIEwmuMOkrqzvyYvkSdzfChAfbMiS/D8cY=; b=ygIiCS3lJ/BvMnskcw0fNWTaBWhjKh++c97+1LHXorjUiojy8sbAysfbhnrOIcXo2H DKK4e1FizfjJUt1MLMk/tzyRtQjoMc3O4kykV7vXmwbMQr+b7IAVrNCp4WdqBnOMYNeT /q7Cdnp2NHGbl8TzxV9zsa0psbaEtCxF+pTlwSZcl5DB5BQA4x964qqe2dao5MOJxRfP fMHAvfdZz4ftZwuRoX+XShkDQXBFxrUw/iOjGw6ENGnRS/h1PklV7GvBxVM9LGJIoPyM pGZNetMDufyTPCQKZDlQ2iqQe8cN6lNK/TYUGsZd2eQkAjYsNqwkzsoh1mTieGEjRwhF U9jA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Pvk0VgYH; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77660-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b129-20020a636787000000b005cdf801a27dsi11002516pgc.198.2024.02.22.17.56.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 17:56:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77660-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Pvk0VgYH; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-77660-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77660-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D409C28607D for ; Fri, 23 Feb 2024 01:56:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8796EC2C6; Fri, 23 Feb 2024 01:56:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Pvk0VgYH" Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21CE68F51; Fri, 23 Feb 2024 01:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708653386; cv=none; b=crV3iK1PrGJDJHX247yYSSFSrgukWe0wCkP3HAigIlsb3K9XhqbMkpxKdIbk5XZ5OSIAys/isN2ZtzbpbfhF2Nj0fpeIfwu1EP6dLUk6/nMXoIk/D3QjHgyXZYxIJvyiiCUac/6rm+X9Ic2Gkzm89IqheI8vfTyVsdQFzClDWiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708653386; c=relaxed/simple; bh=OoAGUEey0v/HudJdEpxNwVcwRPbIB72SbkNiVuKIKN8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=isznrCzLLq8vZh0tFs0/nobVdCufPNxOHAt0GM2C54+W9zp3Q0DxOzwprCXWFG4+SWi4noAcRUl2ZNkb+CMZ5W1PqMx1XStuLiFpVE+R+xX8s3OFBL3oI6sDfLxuWTzTbu00NHFItyykL47+wBqJQIrlszXIqaLA1fS+jl/AG34= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Pvk0VgYH; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-33aeb088324so227504f8f.2; Thu, 22 Feb 2024 17:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708653383; x=1709258183; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iUdZVH+IyHyUk6BumjJJBqY/HP0jfnVa+1NxERJx/L0=; b=Pvk0VgYHTVFgO9OThv+zKEzYAnNEwietvfxXgVbzU8peYq3emgBVe15SLBljktXnD6 3RXafnK4Ba081FzVq2NzxRd0N2aW+RRsRLQVngnA37DYGgfK3S5y+ufUquOTrd/4GvVi dGk1oHnYYSu30oGhtQWoq/301kXyLsXlpYgS881FxwQc1WOJ2TaG8UHv+7pKy2rIiwJ6 XJxLBz6PGlrzhBgIX5aQossMey3a+X7jyZDOZjbScrY3/to1vLY8IgPexOjsYVexGpJ9 yUq0D1jnct6bfRvSI+Pt0ypbtU+4N/j1pv5rc4Wgmp4CfibNoU6ccWtpk0D2GyBAEfuy iOaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708653383; x=1709258183; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iUdZVH+IyHyUk6BumjJJBqY/HP0jfnVa+1NxERJx/L0=; b=fgfpLqfDV2gdMyjMta92ICanAScWamzIcIaKrJdL/kVX93M56QsHh5C7IOJrQfoTvY KBs+jFA+irYgyGMLLamFfChHI9ynRg01+S0K1frFwdqN16PbF4fNvvZkjAEaaSEdvr1G 8/+5K+7qr7q3OXQfQstPK5VmgXCHPYlMjdNtXGC5oNUzVcKCWVLYpIr63ETEB2G1gobV Ubg6xNcallC2CWpJPIatExNpXlCc2H+ovPXJJxZtpV5QZwpNKbnX8HG6kHEsaYbhFRb6 owkZz3KzXN4n+gNF/xKNsUpfP2rDLJ7Jh0lZXVCqWq2FQOvSw+P8YfZHsyEsA/4PrjVr 5CHg== X-Forwarded-Encrypted: i=1; AJvYcCW+BM7Xpkz02dPA6F/vtJZthxyJqAgvlXovQbgViieaGCuWUyMDJUOCwARf9Ij5TPU0mkT0y2txrpDot/yAeJOo7gfNFlQCGIrOxPPUavzDE9f1mymqOVBGPss29aO0zknSKix937TeGWHTUaPnMbrfch69HnbnTW8yJaxgzzNy6Ka1kX5JxPv+MlisDrexybxI23C3DtE+72um7Kliy65aZMc5ABzHdv2j+6QKwj2/y+uFRCRjpns+uIA= X-Gm-Message-State: AOJu0YxmYls0X8aIQ/+Fek5pk3dolTytqTSm/6MVZJuYRmwWiCo9sTav x35mHEkyZHywAo9OEokChUOh/kMKcIIGnlgGSC0wElv2aNSZOaukFjG+NgiB0n5rtJuFMRItX93 PHExWR2HryYLlx/y7mFlzeUGq91o= X-Received: by 2002:a5d:5045:0:b0:33d:26b1:c460 with SMTP id h5-20020a5d5045000000b0033d26b1c460mr432252wrt.39.1708653383258; Thu, 22 Feb 2024 17:56:23 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240221-hid-bpf-sleepable-v3-0-1fb378ca6301@kernel.org> <20240221-hid-bpf-sleepable-v3-2-1fb378ca6301@kernel.org> In-Reply-To: <20240221-hid-bpf-sleepable-v3-2-1fb378ca6301@kernel.org> From: Alexei Starovoitov Date: Thu, 22 Feb 2024 17:56:11 -0800 Message-ID: Subject: Re: [PATCH RFC bpf-next v3 02/16] bpf/verifier: introduce in_sleepable() helper To: Benjamin Tissoires 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" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Feb 21, 2024 at 8:25=E2=80=AFAM Benjamin Tissoires wrote: > @@ -18193,7 +18198,7 @@ static int resolve_pseudo_ldimm64(struct bpf_veri= fier_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.