From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754231AbaIKTyv (ORCPT ); Thu, 11 Sep 2014 15:54:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16278 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753958AbaIKTyr (ORCPT ); Thu, 11 Sep 2014 15:54:47 -0400 Message-ID: <5411FDE1.3060302@redhat.com> Date: Thu, 11 Sep 2014 21:54:09 +0200 From: Daniel Borkmann User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Alexei Starovoitov CC: Andy Lutomirski , "David S. Miller" , Ingo Molnar , Linus Torvalds , Steven Rostedt , Hannes Frederic Sowa , Chema Gonzalez , Eric Dumazet , Peter Zijlstra , Pablo Neira Ayuso , "H. Peter Anvin" , Andrew Morton , Kees Cook , Linux API , Network Development , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v11 net-next 00/12] eBPF syscall, verifier, testsuite References: <1410325808-3657-1-git-send-email-ast@plumgrid.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/10/2014 10:21 PM, Alexei Starovoitov wrote: ... >>> char bpf_log_buf[LOG_BUF_SIZE]; >> >> What happens if the size isn't LOG_BUF_SIZE? > > would do you mean? > LOG_BUF_SIZE is just a user defined macro. > Can be anything. I believe, Andy means, what would happen if log_level > 0 but the log_size is not big enough so that the human-readable error text string from the verifier will fit into it? I presume that will be truncated then ... hm. > it's passed along with pointer: > .log_buf = bpf_log_buf, > .log_size = LOG_BUF_SIZE, > .log_level = 1,