From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762AbdKJJfF (ORCPT ); Fri, 10 Nov 2017 04:35:05 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:47323 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063AbdKJJfD (ORCPT ); Fri, 10 Nov 2017 04:35:03 -0500 X-Google-Smtp-Source: ABhQp+Sbp+T+AHEiGwmwpxy/rRH0o4yHPhs9idKafvfcpuHS0lpNeRNa4RXWO9e+Cd6isDPJFxspzQ== Date: Fri, 10 Nov 2017 10:34:59 +0100 From: Ingo Molnar To: Josef Bacik Cc: rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, kernel-team@fb.com, daniel@iogearbox.net, Josef Bacik Subject: Re: [PATCH 1/2] bpf: add a bpf_override_function helper Message-ID: <20171110093459.w2pvo3ntkwbmgnha@gmail.com> References: <1510086523-8859-1-git-send-email-josef@toxicpanda.com> <1510086523-8859-2-git-send-email-josef@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1510086523-8859-2-git-send-email-josef@toxicpanda.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Josef Bacik wrote: > @@ -551,6 +578,10 @@ static const struct bpf_func_proto *kprobe_prog_func_proto(enum bpf_func_id func > return &bpf_get_stackid_proto; > case BPF_FUNC_perf_event_read_value: > return &bpf_perf_event_read_value_proto; > + case BPF_FUNC_override_return: > + pr_warn_ratelimited("%s[%d] is installing a program with bpf_override_return helper that may cause unexpected behavior!", > + current->comm, task_pid_nr(current)); > + return &bpf_override_return_proto; So if this new functionality is used we'll always print this into the syslog? The warning is also a bit passive aggressive about informing the user: what unexpected behavior can happen, what is the worst case? Thanks, Ingo