Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756383Ab3DZPnp (ORCPT ); Fri, 26 Apr 2013 11:43:45 -0400 Received: from mail-da0-f53.google.com ([209.85.210.53]:47768 "EHLO mail-da0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387Ab3DZPnn (ORCPT ); Fri, 26 Apr 2013 11:43:43 -0400 Message-ID: <1366991021.8964.221.camel@edumazet-glaptop> Subject: Re: [RFC PATCH net-next 2/6] x86: bpf_jit_comp: support BPF_S_ANC_SECCOMP_LD_W instruction From: Eric Dumazet To: Xi Wang Cc: Daniel Borkmann , "David S. Miller" , Russell King , Heiko Carstens , Eric Dumazet , Will Drewry , Andrew Morton , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 26 Apr 2013 08:43:41 -0700 In-Reply-To: References: <1366962706-24204-1-git-send-email-xi.wang@gmail.com> <1366962706-24204-3-git-send-email-xi.wang@gmail.com> <1366985926.8964.190.camel@edumazet-glaptop> <1366989094.8964.212.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1062 Lines: 29 On Fri, 2013-04-26 at 11:29 -0400, Xi Wang wrote: > On Fri, Apr 26, 2013 at 11:11 AM, Eric Dumazet wrote: > > 2) Calling a function potentially destroys some registers. > > %rdi,%r8,%r9 for instance, so we are going to crash very easily. > > > > I dont know, I feel a bit uncomfortable having to explain this to > > someone sending security related patches... > > My old code did save these registers. But, do we really need that for > seccomp? For example, %rdi (skb) is always NULL and never used by > seccomp filters. Did I miss anything? I do not know. This is not explained in your changelog or in any comment. You have to make the full analysis yourself and make us comfortable with the results. You send patches and ask us to spend hours on it, this is not how it works. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/