Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752974AbdHOMxm (ORCPT ); Tue, 15 Aug 2017 08:53:42 -0400 Received: from dispatch1-us1.ppe-hosted.com ([67.231.154.164]:44202 "EHLO dispatch1-us1.ppe-hosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752931AbdHOMxg (ORCPT ); Tue, 15 Aug 2017 08:53:36 -0400 Subject: Re: [PATCH net-next] bpf/verifier: track liveness for pruning To: Daniel Borkmann , , "Alexei Starovoitov" , Alexei Starovoitov References: <262cf31a-b70d-3dca-c687-8bcc77726011@solarflare.com> <5992E090.5040103@iogearbox.net> CC: , , iovisor-dev From: Edward Cree Message-ID: <0de66302-95f9-feda-b537-1c515793be6a@solarflare.com> Date: Tue, 15 Aug 2017 13:53:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <5992E090.5040103@iogearbox.net> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.17.20.45] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23258.003 X-TM-AS-Result: No--3.709300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1502801615-I6Mi+r7VI9OM Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 694 Lines: 17 On 15/08/17 12:52, Daniel Borkmann wrote: > On 08/14/2017 07:55 PM, Edward Cree wrote: >> if (arg_type == ARG_ANYTHING) { >> if (is_pointer_value(env, regno)) { >> @@ -1639,10 +1675,13 @@ static int check_call(struct bpf_verifier_env *env, int func_id, int insn_idx) >> } >> >> /* reset caller saved regs */ >> - for (i = 0; i < CALLER_SAVED_REGS; i++) >> + for (i = 0; i < CALLER_SAVED_REGS; i++) { >> mark_reg_not_init(regs, caller_saved[i]); >> + check_reg_arg(env, i, DST_OP_NO_MARK); > > Don't we need the same in check_ld_abs() since we treat it similar > to a function call? Yes, I forgot about LD_ABS. I'll fix it and spin a v2. -Ed