From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexei Starovoitov Subject: Re: [PATCH bpf] bpf: use array_index_nospec in find_prog_type Date: Thu, 3 May 2018 19:32:01 -0700 Message-ID: <20180504023200.hfl5mdrp76sklayt@ast-mbp> References: <925948ff31d036a1e22dcaa59e989c485945e1c4.1525392315.git.daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Mark Rutland To: Daniel Borkmann Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:37745 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751214AbeEDCcE (ORCPT ); Thu, 3 May 2018 22:32:04 -0400 Received: by mail-pf0-f193.google.com with SMTP id e9so12258724pfi.4 for ; Thu, 03 May 2018 19:32:04 -0700 (PDT) Content-Disposition: inline In-Reply-To: <925948ff31d036a1e22dcaa59e989c485945e1c4.1525392315.git.daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, May 04, 2018 at 02:13:57AM +0200, Daniel Borkmann wrote: > Commit 9ef09e35e521 ("bpf: fix possible spectre-v1 in find_and_alloc_map()") > converted find_and_alloc_map() over to use array_index_nospec() to sanitize > map type that user space passes on map creation, and this patch does an > analogous conversion for progs in find_prog_type() as it's also passed from > user space when loading progs as attr->prog_type. > > Signed-off-by: Daniel Borkmann > Cc: Mark Rutland Applied to bpf tree, thanks Daniel.