Message ID | 965d9f3e-cc24-9d7b-6416-f6596ced8e86@iogearbox.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E4502603D7 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 5 Jul 2018 07:47:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3B2528971 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 5 Jul 2018 07:47:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C78A528B04; Thu, 5 Jul 2018 07:47:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0BF2228971 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 5 Jul 2018 07:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zcMCSh+t0BkKFw90p/gdWgmoenib+aaMbwzq1sGgvis=; b=PPR2Qb052rlvkm cqYfYLOuvjPBkeNHt3YSchBMYj2ZnP3un2LaY2sRpOplxsir3ACCVQ4f2AJgBvcEmjGLsqwThPDw5 ttYmiLHUCQ/lYg343+tKt/g6elZbzVmn069mratAg8veOhEp0sIr2iyWHJIeB22yP6DaSmleGavIU WpYAtLFztUKHGktZFyWA+8iQg7kRa+xtEQ76sn9OJpucIbF557nXxtcZ6gGe4DlTmcpPgxTnmTF9v bUZ/6XCD2ijc+iHNHGfieSEMyGwz84PRbDwzvi+jiCeOBH5RIDu+XL5DB3KD2xtjmZPG1qrE0bWKp 5hGh8Q6d0Q57z5+MB2/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fayye-0006qj-TN; Thu, 05 Jul 2018 07:46:56 +0000 Received: from www62.your-server.de ([213.133.104.62]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fayyZ-0006hm-Gp for linux-arm-kernel@lists.infradead.org; Thu, 05 Jul 2018 07:46:54 +0000 Received: from [78.46.172.3] (helo=sslproxy06.your-server.de) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from <daniel@iogearbox.net>) id 1fayyG-0004ee-BF; Thu, 05 Jul 2018 09:46:32 +0200 Received: from [62.203.87.61] (helo=linux.home) by sslproxy06.your-server.de with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from <daniel@iogearbox.net>) id 1fayyG-0003NE-6G; Thu, 05 Jul 2018 09:46:32 +0200 Subject: Re: [offlist] Re: Crash in netlink/sk_filter_trim_cap on ARMv7 on 4.18rc1 To: Russell King - ARM Linux <linux@armlinux.org.uk>, Peter Robinson <pbrobinson@gmail.com> References: <CALeDE9PP__kPHX_aW24kwzGf9BgA0gQOQJSY+Qw0yFMOLn4Pcw@mail.gmail.com> <7ff516fd-1d01-4d7a-1d5d-b58932c0c69d@gmail.com> <CALeDE9Nkz+cbueruiez_43ZS1ebAiQHDaVZRARE8raypYz323A@mail.gmail.com> <ad98d60c-bd60-b495-c4bd-507fc29c8bcd@iogearbox.net> <CALeDE9PBZWJBp8KB0mB4zoNXqscmzxWzz+LnuqRA-z4t1e9T8g@mail.gmail.com> <CALeDE9OOrZUnaNpzkYPU30iN=4HFQaqEomjf14EO5EtcnHu8OQ@mail.gmail.com> <CALeDE9MykqKyk5hJKn2OxZx2USW76ySm8Wxsw3eVgxa2g7PKXg@mail.gmail.com> <fe05405a-c06d-d8fe-07fa-5840e498bb13@iogearbox.net> <CALeDE9OJomWstG+AcftR543WBi5Bo8ANQj3T-pOW3BfBNzB=uw@mail.gmail.com> <20180704234154.GT17271@n2100.armlinux.org.uk> <20180705073120.GU17271@n2100.armlinux.org.uk> From: Daniel Borkmann <daniel@iogearbox.net> Message-ID: <965d9f3e-cc24-9d7b-6416-f6596ced8e86@iogearbox.net> Date: Thu, 5 Jul 2018 09:46:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20180705073120.GU17271@n2100.armlinux.org.uk> Content-Language: en-US X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.100.0/24724/Thu Jul 5 06:42:06 2018) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180705_004651_814520_7C211D96 X-CRM114-Status: GOOD ( 21.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: netdev@vger.kernel.org, labbott@redhat.com, Eric Dumazet <eric.dumazet@gmail.com>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c index f6a62ae..d6a7dfd 100644 --- a/arch/arm/net/bpf_jit_32.c +++ b/arch/arm/net/bpf_jit_32.c @@ -1844,6 +1844,13 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog) /* there are 2 passes here */ bpf_jit_dump(prog->len, image_size, 2, ctx.target); + /* Defer to interpreter after dump. */ + if (1) { + bpf_jit_binary_free(header); + prog = orig_prog; + goto out_imms; + } + bpf_jit_binary_lock_ro(header); prog->bpf_func = (void *)ctx.target; prog->jited = 1;