Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4387583ioa; Wed, 27 Apr 2022 02:42:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvnEf3fr6PtZLj+n3OvgxS7MfaGzbo3swb24oylCUTLsdAUTUu6yYPbA3uwramI7WdnLdL X-Received: by 2002:a63:91ca:0:b0:3ab:600:6cab with SMTP id l193-20020a6391ca000000b003ab06006cabmr16689413pge.216.1651052539330; Wed, 27 Apr 2022 02:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651052539; cv=none; d=google.com; s=arc-20160816; b=BiDlSoMAUXOQ2YVw3shngd+741nO4i2xUKfKZu735ek26VN4l1VAOmsoia4vucjx4u qD25tstxI1Pi1brWprCMdDAIJkuAPSFX2+xLJaHfnORuxlSwaw69ulwapU3euRSlrR7b gtQnLwpbYZA0UTUwBIDzIC4TBBqTRLtDv+CtoK667BKdvucTa2Gxa40uplO+6Jep90zd 3uhdTA9MeHv4GOVbuSKDXCD61+MebC12acob4OpQvmzSYljcN9AsWuiZV6hBS+rmiSHr SDwMJmrPVroSSlMN7w1318YmbAA19q3bLNjw9EHm56DdELweIkya1j6MJDfy7wSdJ3vw Y4KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=PgY8JDNp96/PZ9zGZDqtUD86gS1yTV51Snpcd+6jrVQ=; b=qezW66kYOLRaH4J9JDl24xiu+i8IgnuvsmoaPVSoPXml+UqajOIRP5t6IL9aMG7ngg TDE9xy0pUhiak11KuY+bHQ5JTATPMMz+pQPJ0xrAHxxHOUFqlbZ9BFPcSDX6fGqetQb8 hdqnGiUgT6BE+47FdAvv8ieaNVXLAdeoo3pzm+BiLd/vjCjmtHqLWTFDAy/ERzR/Qjkj YT1XQPy5kWi9ONhARm6lvXnbMJhgTb4uwKkfj9Hrb5OATbZIMD2Ga12JUjC8wvphfsLL U7pxu60HadPzYwSM7qxVPPgI2Y2VoFU0UYz9GfTHPFYY2AUeiJLleEPneqPw3uVMGAMF Gtng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ShU3zbaO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bm1-20020a656e81000000b003ab971aeb0fsi1023092pgb.498.2022.04.27.02.42.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 02:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ShU3zbaO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D62F276115; Wed, 27 Apr 2022 02:17:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244011AbiDZEPd (ORCPT + 99 others); Tue, 26 Apr 2022 00:15:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233578AbiDZEPa (ORCPT ); Tue, 26 Apr 2022 00:15:30 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02FE117E0D; Mon, 25 Apr 2022 21:12:24 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id m14-20020a17090a34ce00b001d5fe250e23so1370718pjf.3; Mon, 25 Apr 2022 21:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=PgY8JDNp96/PZ9zGZDqtUD86gS1yTV51Snpcd+6jrVQ=; b=ShU3zbaOSjlfnuQzRkOtr1157n/MdxFknpUh9Gyg1dcFTnM9GB09A5Aakp/djXa6PE 1dVyV+xPEexa7fDaoFcK/dTIOOFammE9xG7cV4sgDCffSEUw/ygrx9PNH5VOmGI9fz0J yM6YMlg8JLtZSRNmW2K6lNUm82Q+KXI4kr45d0FsxUAEoZnsE6pfhylLvdkMQx3/C36K hKDquGbIQf5DjPcrqcLjJqfbLjvOAqFH1N5SOAR+SeJJwE8s8TK4lCeZnZyc+W76A2sD knylmaO540ZXLJeGQdker0LNMGQlA4oTFx9pQ0X6fRZ20kEp8A1OTNoxGeoT0yov4FCd Aw9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PgY8JDNp96/PZ9zGZDqtUD86gS1yTV51Snpcd+6jrVQ=; b=0ioujO/AmTt2XyLlz1h1SR9RvLUa24He/lIAwW4LQB8WrH9Lq4Uo0dfq8N/H1o4b78 8CE9rwNl026ri5U3VWsranYs8Y4NLOISxJ+B7CEruLHkG7xJhR+fhpzCL2DPfBf5WPN7 KayYbvSQL940PBze9l1rpxHnTT1c9KLiJOVTt5lREWFcq92XZKm2AEjZppcwumbArPm2 CVpzYImxKhm4l3fLSEeeEChjgM82m9jDjyCdejAKKBGpTwXx1y8XS04CI9HxhbLFNjQC 70uPD1CU5ofRV0/PAnrDRRC9n7eDTCNG00h5RIKzWriYQqfXd2SXE+vGDuCg5VlcCuW/ FSpA== X-Gm-Message-State: AOAM530fo3E3wp1J9YsQFIwQWDHcmJWjd+adncTAim1CS6HQOP0sHjce VDsGwsy/UNrzb7QIj/H4Jxg= X-Received: by 2002:a17:90b:2241:b0:1d2:54b2:64b2 with SMTP id hk1-20020a17090b224100b001d254b264b2mr35898463pjb.225.1650946343519; Mon, 25 Apr 2022 21:12:23 -0700 (PDT) Received: from MBP-98dd607d3435.dhcp.thefacebook.com ([2620:10d:c090:400::5:438a]) by smtp.gmail.com with ESMTPSA id z16-20020a17090abd9000b001d2edf4b513sm873683pjr.56.2022.04.25.21.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Apr 2022 21:12:23 -0700 (PDT) Date: Mon, 25 Apr 2022 21:12:20 -0700 From: Alexei Starovoitov To: Benjamin Tissoires Cc: Greg KH , Jiri Kosina , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Tero Kristo , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [RFC bpf-next v4 4/7] btf: Add a new kfunc set which allows to mark a function to be sleepable Message-ID: <20220426041220.xsblwpvmcvceyaco@MBP-98dd607d3435.dhcp.thefacebook.com> References: <20220421140740.459558-1-benjamin.tissoires@redhat.com> <20220421140740.459558-5-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220421140740.459558-5-benjamin.tissoires@redhat.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 21, 2022 at 04:07:37PM +0200, Benjamin Tissoires wrote: > This allows to declare a kfunc as sleepable and prevents its use in > a non sleepable program. > > Signed-off-by: Benjamin Tissoires makes sense. > @@ -17,6 +17,7 @@ enum btf_kfunc_type { > BTF_KFUNC_TYPE_ACQUIRE, > BTF_KFUNC_TYPE_RELEASE, > BTF_KFUNC_TYPE_RET_NULL, > + BTF_KFUNC_TYPE_SLEEPABLE, > BTF_KFUNC_TYPE_MAX, > }; > > @@ -35,6 +36,7 @@ struct btf_kfunc_id_set { > struct btf_id_set *acquire_set; > struct btf_id_set *release_set; > struct btf_id_set *ret_null_set; > + struct btf_id_set *sleepable_set;