From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77353C433E0 for ; Thu, 28 May 2020 14:39:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 518A4207D3 for ; Thu, 28 May 2020 14:39:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391182AbgE1Ojd (ORCPT ); Thu, 28 May 2020 10:39:33 -0400 Received: from www62.your-server.de ([213.133.104.62]:35266 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391177AbgE1Ojb (ORCPT ); Thu, 28 May 2020 10:39:31 -0400 Received: from 75.57.196.178.dynamic.wline.res.cust.swisscom.ch ([178.196.57.75] helo=localhost) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1jeJgv-0008Kh-Gq; Thu, 28 May 2020 16:39:29 +0200 Date: Thu, 28 May 2020 16:39:28 +0200 From: Daniel Borkmann To: Anton Protopopov Cc: Alexei Starovoitov , Shuah Khan , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH bpf 0/5] bpf: fix map permissions check and cleanup code around Message-ID: <20200528143928.GA27756@pc-9.home> References: <20200527185700.14658-1-a.s.protopopov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200527185700.14658-1-a.s.protopopov@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.102.2/25826/Thu May 28 14:33:30 2020) Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Wed, May 27, 2020 at 06:56:55PM +0000, Anton Protopopov wrote: > This series fixes a bug in the map_lookup_and_delete_elem() function which > should check for the FMODE_CAN_READ bit, because it returns data to user space. > The rest of commits fix some typos and comment in selftests and extend the > test_map_wronly test to cover the new check for the BPF_MAP_TYPE_STACK and > BPF_MAP_TYPE_QUEUE map types. > > Anton Protopopov (5): > selftests/bpf: fix a typo in test_maps > selftests/bpf: cleanup some file descriptors in test_maps > selftests/bpf: cleanup comments in test_maps > bpf: fix map permissions check > selftests/bpf: add tests for write-only stacks/queues > > kernel/bpf/syscall.c | 3 +- > tools/testing/selftests/bpf/test_maps.c | 52 ++++++++++++++++++++++--- > 2 files changed, 49 insertions(+), 6 deletions(-) Looks good to me and is also consistent with what we do for the lookup + delete batch interface, applied thanks! Fyi, I've taken it to bpf-next given 5.7 is right around the corner. We can take the permissions fix to stable once in Linus' tree.