Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp260032pxm; Wed, 2 Mar 2022 14:50:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJygt1nWxBHuHSJtuhA0T81qmk4Sp2FYSHji+YZ94Q25YU5hjj4YEo7kc4DJGuTeq4tXsn7q X-Received: by 2002:a65:6794:0:b0:36c:460e:858d with SMTP id e20-20020a656794000000b0036c460e858dmr27849579pgr.418.1646261423252; Wed, 02 Mar 2022 14:50:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646261423; cv=none; d=google.com; s=arc-20160816; b=GZVD8pJ8g7QGbbA0i/SFcs6RY2RHia24MQzP1Qv88JmRS+ZSaP8JfupgeY1KplVL+S 8ylWtY3vNv3BvUJqAjBlnvsuk3JmHPsBH+gNTe27zo5yMdaON6WQkiP/7++Oro+8S+3h iMKSfu5Zk8O/ibocb2QBjc3KH3QCH2BkMkeesDNErTsHcyR6/bZJylt43hJmxEn6mTog iWOoosLPwjGyWUphVvpL0QDP6uKNapYzLmTkU1Yxk1TjZgLg/fAF3BhhDl8RflE1dRrV wTA2a4mcDTdKV62oaZu+wKYjdxnHphPrAo8GTuHWHFs82cNOiqw990AbsTgJ65omBWWr 5FIw== 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=vjf7RPI2PKTb2kP9VHjBAcKqQnyTyYbCaciuvjfKLdQ=; b=JHc+o7QSaGP3W1Mr5JS3s7S0Tk58LEw5xoboi2zTggAcKKlXN7K5qgU9H8WCapjWDV Geal9IdJGD34/bpJiOt4CeSA0MvDXQAE3Txm3h6t/ZfaeDXY+F1Rizd+Ebvx/VTa2V/D Yd2y5K9/CLOrK/6QH6GM91TRUwdqoYe7NTAOjmSqmTTt3vsUVhQlf4eR4/kvNBZFEugk 81lcJ2ADQ4h/ETDES1fdDQpdKf6nth8dUvWMHHnfZ3sZvq4r1Hh68dkR8VAIEsSWWLcC 7QaZkodyQRcLWPh4vDFXRQD6IKYJEFWLfpgWh7x+whU1vNL9iX+AcmKhoMYQ9AwR/yiq LMBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Dt6FS/ue"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id a23-20020a17090a8c1700b001bc40adffb1si6333479pjo.4.2022.03.02.14.50.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 14:50:23 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Dt6FS/ue"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30BE1108BD5; Wed, 2 Mar 2022 14:41:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241832AbiCBTma (ORCPT + 99 others); Wed, 2 Mar 2022 14:42:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234643AbiCBTm3 (ORCPT ); Wed, 2 Mar 2022 14:42:29 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C09A2C4E1F; Wed, 2 Mar 2022 11:41:45 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id h17so2479338plc.5; Wed, 02 Mar 2022 11:41:45 -0800 (PST) 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=vjf7RPI2PKTb2kP9VHjBAcKqQnyTyYbCaciuvjfKLdQ=; b=Dt6FS/uern+P5cz68+l/TVM/2ptRyGYPwDpkvrmWlwJNRyGimf1HFkiHrhNRYEqIr4 hMhStkL/cQSxSRpl8KEGVGFH13H5RlSm6EHsDf+7dwiFmollv0lCusMFh0W9nBB2iDlC snYE7crbNCuDi/lkJMEbk21nFCiKV0GT1TsosUOJG1bOzqoXaMI0/sWvPKNZdmRNkCVT Q0T/wzMMiQTi07QoQB4aBAjDOlNJEViAaVp2HGhBRm+Xy8k4SoN5t2NKH0fmJkDYnns8 pOKffa6ADQaF6G7FXCWwGo8mDCHKO2C5a9YVfs5hlI+qOOsr65lYAi+2DB2tb37iXAE4 9cqw== 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=vjf7RPI2PKTb2kP9VHjBAcKqQnyTyYbCaciuvjfKLdQ=; b=KbNdBhRNHXDqLi2ppKTkUDmSBelYIG7qX8bN91Sanm5AO1tSK5AHA22euWnr96B1V0 8ZHZdxrRmtRF8CpZhNwiq1fRaJ2jxCaxSydiyj1KMmCdFNsonKzBx7bC0pX+cmcWd+6s f2KJiZ+4IcwTzHenhOzH2drimbc0X1fGc6GaWzNUr/t7quUzyHE99sp4pE5UowTQ4dcz Jo1MiFM/5bIlDq0DP8JnHvMpmpK5RE/lNQdXRXZotBvV5wutOU2wr3nMHC+BL+Swk2SQ fQ8N5yBk7/6w5YE0mFXMR1jj9Z3SGTAM+ZTIcZESbt9lxfClaNaK6X01lwIDAs40oRcg zVbw== X-Gm-Message-State: AOAM532wbw32UOj+doLPfBet/LKAI5U4cN9T8/EZafa4ECDVNVOD40jV 5RyvfXjksv0qVcF6Jydm1ns= X-Received: by 2002:a17:902:e807:b0:150:2801:86f8 with SMTP id u7-20020a170902e80700b00150280186f8mr27465791plg.64.1646250105307; Wed, 02 Mar 2022 11:41:45 -0800 (PST) Received: from ast-mbp.dhcp.thefacebook.com ([2620:10d:c090:500::2:156b]) by smtp.gmail.com with ESMTPSA id bo10-20020a17090b090a00b001bc8405bd55sm5892624pjb.30.2022.03.02.11.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 11:41:45 -0800 (PST) Date: Wed, 2 Mar 2022 11:41:41 -0800 From: Alexei Starovoitov To: Hao Luo Cc: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Shakeel Butt , Joe Burton , Tejun Heo , joshdon@google.com, sdf@google.com, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH bpf-next v1 4/9] bpf: Introduce sleepable tracepoints Message-ID: <20220302194141.c4gvqz5v4mmmbwsv@ast-mbp.dhcp.thefacebook.com> References: <20220225234339.2386398-1-haoluo@google.com> <20220225234339.2386398-5-haoluo@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220225234339.2386398-5-haoluo@google.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,T_SCC_BODY_TEXT_LINE 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 Fri, Feb 25, 2022 at 03:43:34PM -0800, Hao Luo wrote: > diff --git a/include/linux/tracepoint-defs.h b/include/linux/tracepoint-defs.h > index e7c2276be33e..c73c7ab3680e 100644 > --- a/include/linux/tracepoint-defs.h > +++ b/include/linux/tracepoint-defs.h > @@ -51,6 +51,7 @@ struct bpf_raw_event_map { > void *bpf_func; > u32 num_args; > u32 writable_size; > + u32 sleepable; It increases the size for all tracepoints. See BPF_RAW_TP in include/asm-generic/vmlinux.lds.h Please switch writeable_size and sleepable to u16. > > -static const struct bpf_func_proto * > -syscall_prog_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog) > +/* Syscall helpers that are also allowed in sleepable tracing prog. */ > +const struct bpf_func_proto * > +tracing_prog_syscall_func_proto(enum bpf_func_id func_id, > + const struct bpf_prog *prog) > { > switch (func_id) { > case BPF_FUNC_sys_bpf: > return &bpf_sys_bpf_proto; > - case BPF_FUNC_btf_find_by_name_kind: > - return &bpf_btf_find_by_name_kind_proto; > case BPF_FUNC_sys_close: > return &bpf_sys_close_proto; > - case BPF_FUNC_kallsyms_lookup_name: > - return &bpf_kallsyms_lookup_name_proto; > case BPF_FUNC_mkdir: > return &bpf_mkdir_proto; > case BPF_FUNC_rmdir: > return &bpf_rmdir_proto; > case BPF_FUNC_unlink: > return &bpf_unlink_proto; > + default: > + return NULL; > + } > +} If I read this correctly the goal is to disallow find_by_name_kind and lookup_name from sleepable tps. Why? What's the harm?