Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1193828lqe; Mon, 8 Apr 2024 01:12:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPyXokKA+YVnxrhx08Is21WvVOh2KBvF2BJ3F5k4QgOihWeuQaEMB8DRiaGahX5h46VHUzY0KHzvep6oC/JMICP0rbIJUSDDMC8M5y2g== X-Google-Smtp-Source: AGHT+IGs4G8Z/ZMjbJ+D3NDtuy2fOLbx0RuIv78dmc08Yk5tUHmweMiwayTLoBSJcoMRzEkElc79 X-Received: by 2002:a17:906:1c07:b0:a4e:6223:2507 with SMTP id k7-20020a1709061c0700b00a4e62232507mr4721759ejg.5.1712563937843; Mon, 08 Apr 2024 01:12:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712563937; cv=pass; d=google.com; s=arc-20160816; b=OMuN9IwzOemH5RMNNg0dImmfleWni8cSg0VdGT1FSo3VQB9x849xOyfBsXc2Ch+xEj eZwXobe7+6CsiYlz4zvHVSIF4rcsdHcdooVno8pNUqwXhLX6XC9kJafUz6xqPN9YQ9/C PRQ3fdcBXRFK0D0nFEGMBqFySPnXejZEXHVvGzcVK5D194S3gCNd9O8cPQh/O/G/v9nt e8IR0DrghChuT0Vdi4pSTGrDkAv6n9ILnvO8f/Paq9IipgJQxa1GaLYLs7sXa9U+Wl7E 54vGdlfSzSUwoMVH9/zCuvf1AJA4ZROKpCmr2VbVlw6XEdqB5viWhDxRxDoQUWOrjhgJ ePhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=8k0RlDQIA5TfCXNKPYsKZbIeqpsZaZSbSB/oN4MoExg=; fh=L3UFV6no5Bg+ONjucac5Whrd1OR3maQPkF8kTmP37SU=; b=EmXbu4XG9kVXr8qjFw1kEKUxvkl6ZZLITyDAHUoZipS/15Od4z8F6zhULIYkOY0p+Y fgzj2NsaG9/Jy4xvVBHn3yC9DXpwoiX+fyBE9LKmqb+1Dw92gDYUfvocTYT+1cDWygzb ZFMVs6lFS7VTJSTUq4pGDwpfybw0GoJEdfvCXyfuAXLP7tcvVjprqjJSsx5OQ2sfwyp4 D3NYie8FU7HAguFWsEk+DMTnrZ2sddygKxs/AxqC5EjotioCdEmboCRn4q/fbwnElBCE 5Oby1JN5lLWnnaHbbyqWywLHDUn45JNGoazOHYc0lNziNVmvaIoos5F4u1ZKyNarHSUu SG/A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rcmzYzSC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lf12-20020a170907174c00b00a4e8044231fsi3466687ejc.932.2024.04.08.01.12.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 01:12:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rcmzYzSC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-135007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135007-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7F83A1F2129E for ; Mon, 8 Apr 2024 08:12:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B073B4D9F4; Mon, 8 Apr 2024 08:10:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rcmzYzSC" 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 ACA524AEC4; Mon, 8 Apr 2024 08:10:10 +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=1712563810; cv=none; b=D2GUs9qhYj+ZOpE0j6CAfD6XbnYSysb4QlRf1g0m9+1hWiBnN3C2gGux9zkFrTm1cC7rv38IHHpB13OTxbchnAMbJZJs9ZCSCsO1HGfm8W+IW7h6xG9PhwNi1WZJ1RsTgue1ILJqJunt4ALKRpvLEJuwJGL6OEFpVFnfSrMTNaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712563810; c=relaxed/simple; bh=635XJV7/rS2AZSR2TOFYFdxkBgPz6B2TWBzQ/ySmu9M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KMTaaaou7wTuv84Gt4ICP75aDRXPCyWyN6lbn1FocfcX+tOPwgUEohOc5zCdbrDdnx6kd4lxW+93E0uGbJzn8HiiWuyu9JUeeI6Rkw1TVPDsNYeiZTmu28rD2f6bmuztmgtCcoqFdbBWo0kbOHFywJzVh78RHtSbv/t4XsdM0jQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rcmzYzSC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 080A2C43399; Mon, 8 Apr 2024 08:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712563810; bh=635XJV7/rS2AZSR2TOFYFdxkBgPz6B2TWBzQ/ySmu9M=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=rcmzYzSCS2UQ2yznV+tN4pM6lfJYvCiY03U13zRxlWbiIotEWFvWdSs/qgVhMI1yd rNTsHKNniThyXgmiB+e4VlzhPaZ7b8T4KfJfINbTfnBj8JVTMhcMURbifUt4tzQZNL mzbt8W+LRY18yOXl580XOf6PByqx8Pz4uTY/dcdHFX3iXBA5xmKEkvzKedKX3Firl1 mLH5KPeB3HwIsqCZwoRdO1K/cvKCHvV5KjgLnElda611Oh9ONye5pDAwWV4VaLMJZN JTjEicFtMXx/Bt3JdGpYzyPfRiuEWWuqKVFwkRvVt3z4OjSoFPZoBq9RLkiBzjP4tF 0PbWKFnIQcuwA== From: Benjamin Tissoires Date: Mon, 08 Apr 2024 10:09:30 +0200 Subject: [PATCH RFC bpf-next v6 5/6] tools: sync include/uapi/linux/bpf.h 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-Transfer-Encoding: 7bit Message-Id: <20240408-hid-bpf-sleepable-v6-5-0499ddd91b94@kernel.org> References: <20240408-hid-bpf-sleepable-v6-0-0499ddd91b94@kernel.org> In-Reply-To: <20240408-hid-bpf-sleepable-v6-0-0499ddd91b94@kernel.org> To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan Cc: Benjamin Tissoires , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712563787; l=1530; i=bentiss@kernel.org; s=20230215; h=from:subject:message-id; bh=635XJV7/rS2AZSR2TOFYFdxkBgPz6B2TWBzQ/ySmu9M=; b=3a7SZ7xD0328vUxDQYvfQWMfPdppH06CJBZk9RnsI5LibRtnAfsK7nV4ruTCSR80t86Vx78ab Yp4jph6hShYCpu03ot6opzyxC/9gplP3l9T/T0NKywzNn+3k3Ew5yFH X-Developer-Key: i=bentiss@kernel.org; a=ed25519; pk=7D1DyAVh6ajCkuUTudt/chMuXWIJHlv2qCsRkIizvFw= cp include/uapi/linux/bpf.h tools/include/uapi/linux/bpf.h Signed-off-by: Benjamin Tissoires --- updated in v6 no changes in v5 new in v4 --- tools/include/uapi/linux/bpf.h | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index bf80b614c4db..f1890eed213a 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -1662,9 +1662,10 @@ union bpf_attr { } query; struct { /* anonymous struct used by BPF_RAW_TRACEPOINT_OPEN command */ - __u64 name; - __u32 prog_fd; - __aligned_u64 cookie; + __u64 name; + __u32 prog_fd; + __u32 :32; + __aligned_u64 cookie; } raw_tracepoint; struct { /* anonymous struct for BPF_BTF_LOAD */ @@ -7468,6 +7469,19 @@ enum { BPF_F_TIMER_CPU_PIN = (1ULL << 1), }; +/* Extra flags to control bpf_timer_init() behaviour, in addition to CLOCK_*. + * - BPF_F_TIMER_SLEEPABLE: Timer will run in a workqueue in a sleepable + * context, with no guarantees of ordering nor timing (consider this as + * being just offloaded immediately). + */ +enum { + /* CLOCK_* are using bits 0 to 3 */ + BPF_F_TIMER_SLEEPABLE = (1ULL << 4), + __MAX_BPF_F_TIMER_INIT, +}; + +#define MAX_BPF_F_TIMER_INIT __MAX_BPF_F_TIMER_INIT + /* BPF numbers iterator state */ struct bpf_iter_num { /* opaque iterator state; having __u64 here allows to preserve correct -- 2.44.0