Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1261695pxb; Fri, 22 Jan 2021 10:51:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgIDjq7hAhjD6zX4g6IM3A/jSFDiWRI2E+1AnF5QwfyIOkQela1U6X4clVlgMmCEwmKtXd X-Received: by 2002:a05:6402:4389:: with SMTP id o9mr4367209edc.164.1611341517036; Fri, 22 Jan 2021 10:51:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611341517; cv=none; d=google.com; s=arc-20160816; b=IL1a9TrykH9DkB3HfspPB8kaEbozckTMPY4OVTD63Iws+utgmYpqNC5ci+YjQ6HCdf W55hIhghTOb8m3tFIzSgfhrfRHPgr2u08vbatsntzlSlIPWE9ShYqovsh88vEi1bRN12 rqFDC7ua+O9vOkfyT/WWKcJH0IymUL13rbfxyv00bpO5k/rh13ImkKQ4l7krTI5uNBEb VLnVpz08e2h08PJP0cZ9S4vBP5VEPemcJwhTHlXbwg4/FZogHVdQpHZTAoLSdWQpmAgv sxQNj2EJCBM12/OUFLtjKkBorNWA9sQHOS+5M5zwRBH70uBRY936P3KbLNNfp6k3iNLq IdDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HuPX5p/um+l75IvmK3iS27qmSkwvhEjAzWy6oZEUjlg=; b=F3xBjcfPUtvNk1J9nZxZ3IYT1atYKkuUTkgLcPZV3ZOEpqp5JXC8TnxQko1lrpPw+w a1s3x0VmiM7g/DYMtXk+uc5ScPfOxCEr5yEnTKX0H65Vsb7cyD2kGvYmkQPgg824Quv/ eOjNOsqu+9rlJdRLsXKLIZpB1CgsC6mNEtn65zociiq5KFwwMJg1EJBcy5sGRkRx2PYx eIGDuuGkuLyaYO0KkatYzphGQBzGkPua1q3dlNWOFLk3op9JPqI1IWgA2h2UwOxvFT03 mb7AISnuYnCUlfIt93tiDY2SstzL05RALuvjHxQW1d54xmZ3b98z8ujxNXiRHhxWAlz7 v7ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IkXYzXWx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si3969912edx.182.2021.01.22.10.51.33; Fri, 22 Jan 2021 10:51:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IkXYzXWx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730172AbhAVSuB (ORCPT + 99 others); Fri, 22 Jan 2021 13:50:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:39050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728551AbhAVOWp (ORCPT ); Fri, 22 Jan 2021 09:22:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 05B8523B6B; Fri, 22 Jan 2021 14:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1611324997; bh=Lk0HPTXq23BUToGyK2Nm9CHUIww566vzLVOcu/1DTI4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IkXYzXWxdJrSqCeSbJJxnIbqQAf4uQBkiBdYiP56/mPNqq1zsro5epAzA/W5wR2Yx 9HmnhiMPv/LIZn+Egz5EZENuVH/18X3L2Iw9nn75mLZt97uuNgq0wsOZiT827bQmIm vGpEChB5qRl8oK7+bIzvWlqhjE/abcOddOjmMeWw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mircea Cirjaliu , Daniel Borkmann , Mauricio Vasquez Subject: [PATCH 5.4 11/33] bpf: Fix helper bpf_map_peek_elem_proto pointing to wrong callback Date: Fri, 22 Jan 2021 15:12:27 +0100 Message-Id: <20210122135734.037596619@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210122135733.565501039@linuxfoundation.org> References: <20210122135733.565501039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mircea Cirjaliu commit 301a33d51880619d0c5a581b5a48d3a5248fa84b upstream. I assume this was obtained by copy/paste. Point it to bpf_map_peek_elem() instead of bpf_map_pop_elem(). In practice it may have been less likely hit when under JIT given shielded via 84430d4232c3 ("bpf, verifier: avoid retpoline for map push/pop/peek operation"). Fixes: f1a2e44a3aec ("bpf: add queue and stack maps") Signed-off-by: Mircea Cirjaliu Signed-off-by: Daniel Borkmann Cc: Mauricio Vasquez Link: https://lore.kernel.org/bpf/AM7PR02MB6082663DFDCCE8DA7A6DD6B1BBA30@AM7PR02MB6082.eurprd02.prod.outlook.com Signed-off-by: Greg Kroah-Hartman --- kernel/bpf/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/bpf/helpers.c +++ b/kernel/bpf/helpers.c @@ -105,7 +105,7 @@ BPF_CALL_2(bpf_map_peek_elem, struct bpf } const struct bpf_func_proto bpf_map_peek_elem_proto = { - .func = bpf_map_pop_elem, + .func = bpf_map_peek_elem, .gpl_only = false, .ret_type = RET_INTEGER, .arg1_type = ARG_CONST_MAP_PTR,