From patchwork Thu Oct 17 09:05:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 1178372 X-Patchwork-Delegate: bpf@iogearbox.net Return-Path: X-Original-To: incoming-bpf@patchwork.ozlabs.org Delivered-To: patchwork-incoming-bpf@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=bpf-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linutronix.de Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 46v3CN3Vs2z9sCJ for ; Thu, 17 Oct 2019 20:05:04 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439365AbfJQJFE (ORCPT ); Thu, 17 Oct 2019 05:05:04 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52356 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728987AbfJQJFE (ORCPT ); Thu, 17 Oct 2019 05:05:04 -0400 Received: from bigeasy by Galois.linutronix.de with local (Exim 4.80) (envelope-from ) id 1iL1iP-00046j-1i; Thu, 17 Oct 2019 11:05:01 +0200 Date: Thu, 17 Oct 2019 11:05:01 +0200 From: Sebastian Andrzej Siewior To: bpf@vger.kernel.org Cc: Thomas Gleixner , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Peter Zijlstra Subject: [PATCH] BPF: Disable on PREEMPT_RT Message-ID: <20191017090500.ienqyium2phkxpdo@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Disable BPF on PREEMPT_RT because - it allocates and frees memory in atomic context - it uses up_read_non_owner() - BPF_PROG_RUN() expects to be invoked in non-preemptible context Signed-off-by: Sebastian Andrzej Siewior --- I tried to fix the memory allocations in http://lkml.kernel.org/r/20190410143025.11997-1-bigeasy@linutronix.de but I have no idea how to address the other two issues. init/Kconfig | 1 + net/kcm/Kconfig | 1 + 2 files changed, 2 insertions(+) --- a/init/Kconfig +++ b/init/Kconfig @@ -1629,6 +1629,7 @@ config KALLSYMS_BASE_RELATIVE # syscall, maps, verifier config BPF_SYSCALL bool "Enable bpf() system call" + depends on !PREEMPT_RT select BPF select IRQ_WORK default n --- a/net/kcm/Kconfig +++ b/net/kcm/Kconfig @@ -3,6 +3,7 @@ config AF_KCM tristate "KCM sockets" depends on INET + depends on !PREEMPT_RT select BPF_SYSCALL select STREAM_PARSER ---help---