From patchwork Mon Jun 17 12:57:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 167022 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2830283ilk; Mon, 17 Jun 2019 05:58:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqxmaN7e34j/4NNaEz3227Jhp9oE/XONT7O2ExBt2Hn3Qzv5jGnhlcBfMLHZw4GdNLdLl0YE X-Received: by 2002:a63:fb17:: with SMTP id o23mr19970631pgh.362.1560776315394; Mon, 17 Jun 2019 05:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560776315; cv=none; d=google.com; s=arc-20160816; b=ksPneFlWr+QtPwBC3jEJADbL+gES+RPOjWdLS1UL4ZD9nuewzohiAH6qVrJ3GYIwbX WlNn4IUIYGbY6RX6wS2FYK/1EexO8Vvy2Rw417CtTFsALqJOCSPxjktY5E8g23K1k17/ VY7Qu+slb3NciypRjKrU3nQLOn1j7VoOOr1I9KSTAQ16WPIWMBflcOfhWS4Ep2kghinj +ZTnXjICxOcM1lcY2C6hmnM24qUAUuwArQ+/7VcnF9iyq3T/JTFbwi35E9VgcqqBJW2D G9fuaHOcb1CRXS5OeTLC8gZ1PzwCPUflTH51M4cnNLZzw7V1XWkDnxptdKeCnglaIR7v 0z2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Yi7HRD7PcpWTppU1wGhkOpzv5ffN4VgUzJ7FcmBdjMg=; b=wRozbqz1YGKBMIiJQYYNqw7lzR1ZkATjkrLXYTNlOgtlKd74SF3EdG3Vbn/YtXr5mo bjBKYWF+pXj5Ne8Uk6fnMtHTd7OsMSifQr7HW0KfQcr7p+nDL2ym2cRrgDC7PpP9s3kC wNmO3dYLxI9HWoRzobVtJzujTi9SUJamhqUJ50zMXb/BmwJ+jkfPzq0duPcd1O0tJTSt +7Du9RDvgp+uXOeY5vFwrUViTZOLjACNeVs14v2ADI7PK0/tseIH4oulnO0dEgyz1EKd hZIb6R9o+lUG5H3V6htfI6Aos89GuL8AjavdnQ/uL/AProjLr4ngFxfsKEUbkjQG5O5g BqBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si9732228pll.194.2019.06.17.05.58.35; Mon, 17 Jun 2019 05:58:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727742AbfFQM6d (ORCPT + 27 others); Mon, 17 Jun 2019 08:58:33 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:48195 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726005AbfFQM6d (ORCPT ); Mon, 17 Jun 2019 08:58:33 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.145]) with ESMTPA (Nemesis) id 1MUGmL-1i2X5B21xb-00RGpA; Mon, 17 Jun 2019 14:57:26 +0200 From: Arnd Bergmann To: Steven Rostedt , Ingo Molnar , Alexei Starovoitov , Daniel Borkmann Cc: Arnd Bergmann , Andrii Nakryiko , Yonghong Song , Martin KaFai Lau , Song Liu , Matt Mullins , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] bpf: hide do_bpf_send_signal when unused Date: Mon, 17 Jun 2019 14:57:07 +0200 Message-Id: <20190617125724.1616165-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:lv1nV0q2KbUMLMJzM+Nv3YOvipTsLH12zv/CeHO3aM7xRWpsk6s MbUPGLsitpF3TOjYCzlqF0IIvcsMradip8JB0/CUnr3t/qfkB8u0XIVPwTaqXTUvD7uoH7a yj/56+kA2aGM5QMT0yfoToSqTFfsRpsP5JbFYCWHtLMam1v2JccNpZQgvhoRuCWXd+8txJs 2t1kKKuGSikq+VLG5PDRA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:W8pOpR/fJNI=:RukQ8rvFS6v8Sdui3NcM/A QXWuaCdtUF0v3yBtEnVuHl3st4RdUWL3hkaZKBc0iPvtUEtN5ddNlWxVsSbdG7oE4yKvcLK15 caHFgNzGyuVfraobUd4GpLTv5spdqPfybkKuoFYDIUweW/hqR/l73TBT9vglORMtJ5exJuTLX JvKMjVpNLI4syHtmARttM/n7uHotzqntj5vmuPhNRDMgCjVsdpaHOx8KuDRJL7hSuHiAYMW6x c7UBAA5LlMD0grB62BmTswCBNltaREih1d1rx6REAaUxLZsXSHvu3USMghAVYTSIcgL9g9JJB xcJfKVC11w0HtL+tIJy4DeAXwHvue3CY7V3yXq8chijEI8GaMfD99Q4OFY6fGBroMgifs+PwI 7JZhMzdUcs1M9EYaXit4XdlI6rb0vPrqOfgrm/f6DBghnXhvcP1Mg6bbnwv7pFsN5PX1ghQ3v mdx7gjeOq1Nc5kD4sZMBKqh9VPeaBLeAfAL0lHYmakKzY7vNtzeh/1k+Yf1duWs4Ftht/P34J 9tbD7y69nHGkyJJ0v9Y8Yn7pZdyydhr10byBMUNSbJVb2Cdkb36EEnMBJA6HiEFntAAQVsWuh 9F4CQoR+XgZHuxdcW54J1xJcf3slxXdjxaCOiFWCLYNWY36CQKkmi2nF5ppQ43GZf31tOfq+N kC7jiN730Jebq66xJLS1WcxEom2R4w88bIfZj6T3iejb8A+vJGso2JKPHhaCyoXEornIGc1Y1 ZkC+rbIHph++fVSRKPwnuMUJcrsjSf/+DcvTtQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_MODULES is disabled, this function is never called: kernel/trace/bpf_trace.c:581:13: error: 'do_bpf_send_signal' defined but not used [-Werror=unused-function] Add another #ifdef around it. Fixes: 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") Signed-off-by: Arnd Bergmann --- kernel/trace/bpf_trace.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.0 diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index c102c240bb0b..b1a814e2d451 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -602,6 +602,7 @@ struct send_signal_irq_work { static DEFINE_PER_CPU(struct send_signal_irq_work, send_signal_work); +#ifdef CONFIG_MODULES static void do_bpf_send_signal(struct irq_work *entry) { struct send_signal_irq_work *work; @@ -609,6 +610,7 @@ static void do_bpf_send_signal(struct irq_work *entry) work = container_of(entry, struct send_signal_irq_work, irq_work); group_send_sig_info(work->sig, SEND_SIG_PRIV, work->task, PIDTYPE_TGID); } +#endif BPF_CALL_1(bpf_send_signal, u32, sig) {