From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiong Wang Subject: Re: [RFC PATCH v3 bpf-next 4/5] bpf/verifier: use call graph to efficiently check max stack depth Date: Tue, 10 Apr 2018 13:54:27 +0100 Message-ID: References: <0d936412-a7fd-e861-f16b-91d970fd8896@solarflare.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Edward Cree , Alexei Starovoitov , Daniel Borkmann Return-path: Received: from mail-wm0-f41.google.com ([74.125.82.41]:52221 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbeDJMyd (ORCPT ); Tue, 10 Apr 2018 08:54:33 -0400 Received: by mail-wm0-f41.google.com with SMTP id u189so25887160wmd.1 for ; Tue, 10 Apr 2018 05:54:32 -0700 (PDT) In-Reply-To: <0d936412-a7fd-e861-f16b-91d970fd8896@solarflare.com> Content-Language: en-GB Sender: netdev-owner@vger.kernel.org List-ID: On 06/04/2018 18:14, Edward Cree wrote: > Since that algorithm selects > + * nodes in the order of the sorted output, we can do our processing in the loop > + * that does the tsort, rather than storing the sorted list and then having a > + * second loop to iterate over it and compute the total_stack_depth values. > */ IMO, seperate the sort from depth calculation is better than combining them. The tsort of call graph could potentially be used in other places.