Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp480932ybm; Thu, 28 May 2020 07:43:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBFmYRHw0mDYAZiiKPCF3ZL1DMJOsoLvFYs4LN7ED2HmtOY/xh+IeCvlT4nATW+Eg5nzbE X-Received: by 2002:a17:906:298a:: with SMTP id x10mr3196627eje.238.1590676988658; Thu, 28 May 2020 07:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590676988; cv=none; d=google.com; s=arc-20160816; b=QhS+CEOy7PhW9FCXW5XsHX1FVgs1mT4NWhF3a8PIRy7IUQPwoWrgUCI39ImlIDTobg zXS6y6h3vfE7GiNG20dxWl2hiKC17ukv+95O4xrTt8dr+ibQbCNTINcmFDPWWEm0fe52 hO0wrK5nY1G6OzB/fBc1Qg9x3nMa0VNBDYZ5Gd19h4CkfoiICBKLG0jVNrXl5gqS5MxY CHQLZ4ynGqIW3CAS4MrV8Tj/huoA6KfiP3aZKsSE4FFPnLJGJ08BToQEDMyyPxd9LWYI N18AjvJ7WZkM40IwMGcZK19Ez90Hqil3VPIvtL0qVsL6SV8xVvO/5Vd7c10DvKR0P9BT thTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zRXVDlluHKjLjOmHrC3BSrae/Dfoc5qLgROAlh7eUUY=; b=w5klF0oJZ9AWOTSFVbA4x1Q3pIyqX8hLlovtXVIQD/G4LWebmw1TMkpuLOY1BjgIzR hcgnyZnBYNflqGtb8HTth8gDcKWZLpB4QZsT9vTTK6IFHykTJYsf4XsHWDqZ+PawjKt0 Q6BdJfTWD6k9J8GJBJHkbt9l1Ieq6IMiZ9qlahbgu1S1AV9Jjd5CWI+TIV/0LPgLKpqu ccsTlOz3JoB9lIQoqxeB1XW0Smz4tExExFJfemrK0oSkgSCXICDQGHNXByjQSCifw27m E9Nk19CPr7XktPOqd90sF9ctMOdTGpF8amjW8OWfbEqAIbdXZblLDEFhWc2NJc9c9nZG YU0A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q11si3612462edb.536.2020.05.28.07.42.45; Thu, 28 May 2020 07:43:08 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391210AbgE1Oje (ORCPT + 99 others); Thu, 28 May 2020 10:39:34 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.