Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4428100pxk; Wed, 30 Sep 2020 02:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzblFu56IbqOWAhH1uuZYBPI87vB137pjbR+9EmkzdLCUIhBg93clCGXcNEBG9P+fup1/a0 X-Received: by 2002:a05:6402:21c5:: with SMTP id bi5mr1786592edb.380.1601458886692; Wed, 30 Sep 2020 02:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601458886; cv=none; d=google.com; s=arc-20160816; b=wVzfaxyULWKNUOa4DhaxItn16+pq7Dq27RXC9QHuzADvqfBmCUoOjLYaOm7H/vvEkh wgyC+d/fsYpjW0bzWIDxFV4VdismWPKxBi7oNAeLU0TvTGliSMdFQFwFASGGL0E6VBCf Iz1IZyDtJOFNGOU3763J90tyZoH1BKumqy+dAsOPTUGq1XWbeVHI0591kTT4nZ09y7lC 0ZHRPdq/S8H71Xv+c1STz3JqxaYxoblCu7qPsoPAEVs0ISe4i+Cm3MK29W+OImSUhfri 0JheBL9iWV3C7D+ywbcu/TUu1pk3B5wkpigV6q+5pfqf0FepVbBFJeO0H9ZmoliAG8tz AIWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=TfzEw5x0NiRRju3CPhetGru5/pRnoeNXGN+8SqIx2Xg=; b=aOixbUhwg78aSGf4ep9Q875mNMQ8eTB+kF9awb2vRgOFhtz3iAp5Ax9NdjujQkybAB n7oydhRoGixpnNOKCpVHxwCRb49LN97JVLO+PHmJPL+Ys8u54NwW3g2jUKXl8rf2G2mp JM3h6uihbj3KHVXvsN1CjN2iDN/cd3j/HU2GHGu54DXaJ+41VGwbSJY5iNytQ9mwP/RA Vl49amaf5YUpduGIC31aRjTz6Gb+pNBto9Vq00oN6SM54SduEybKE0cjOeUdfq0uhs7/ JmUSbjnmXSxJ7t6A5X0ATf9KsUGiGxG5l3U8eYIVAWVXhA8QEu8O4b2A5aEAYCMlFJc9 frig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=xSNlabK0; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si790834ejb.354.2020.09.30.02.41.03; Wed, 30 Sep 2020 02:41:26 -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; dkim=pass header.i=@cloudflare.com header.s=google header.b=xSNlabK0; 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=REJECT sp=REJECT dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728399AbgI3JiG (ORCPT + 99 others); Wed, 30 Sep 2020 05:38:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728638AbgI3JiG (ORCPT ); Wed, 30 Sep 2020 05:38:06 -0400 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75224C0613D1 for ; Wed, 30 Sep 2020 02:38:06 -0700 (PDT) Received: by mail-ot1-x32d.google.com with SMTP id s66so1196461otb.2 for ; Wed, 30 Sep 2020 02:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TfzEw5x0NiRRju3CPhetGru5/pRnoeNXGN+8SqIx2Xg=; b=xSNlabK0wj27CX+1Qcx2VTudu5ZW9FuibpTZ0nWLnP7KiZc1Y26yZKB8Eh31WGDcm6 8swxBpO09W7KLsdWCfcJLGpNOa9gUdbATUzXP1GsumP4vcMrlnAxEcLj8eox2M6rO4QT LYOYeyB9ved5GDo1QpgQlQh7SernXIJ3tBNMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TfzEw5x0NiRRju3CPhetGru5/pRnoeNXGN+8SqIx2Xg=; b=q09rRFihgCdEkisYWtJ9e//CMnVmtaoc9GnPIJDatUH2fnd8P33uhyXxC6X7dUK/zU jz25o4s38VlV30qyrTFWasOQA1L2WkXICcAuEGV2limNJTAfpWkkaN2J1bS4QXcQ5Gao t9kSe6R3+JihlcSeBDm4EzxcK6D+5RhgNTM/VgNLsxV77eP6Fl/sybRl9ckjRhlPSyi+ jDk0aRee7cI9JvpH4ro0v+MbW7BNy+O3aRPIaYWX6u6Mb9DjQ1M70OZYc95bKIOTKYTD orzuqm/WyjgyhK4lCXxyIXxp9JS7eKMGXtYNc+IASuiVgwTSflG5s/ZBbDILtmHjtcZN yHoA== X-Gm-Message-State: AOAM530dTt2IYZcXshCPJD+lXqhpGgk+IZEATl7mCweL7PeUthRn04D+ UOnMem6CyW4Z7RetQfaX7KNbk+lbVB5mX8X6etDZIQ== X-Received: by 2002:a9d:6e90:: with SMTP id a16mr962799otr.132.1601458684868; Wed, 30 Sep 2020 02:38:04 -0700 (PDT) MIME-Version: 1.0 References: <20200928090805.23343-1-lmb@cloudflare.com> <20200928090805.23343-5-lmb@cloudflare.com> <20200929060619.psnobg3cz3zbfx6u@kafai-mbp> <20200929172340.hogj6zficvhkpibx@kafai-mbp.dhcp.thefacebook.com> In-Reply-To: <20200929172340.hogj6zficvhkpibx@kafai-mbp.dhcp.thefacebook.com> From: Lorenz Bauer Date: Wed, 30 Sep 2020 10:37:53 +0100 Message-ID: Subject: Re: [PATCH bpf-next v2 4/4] selftest: bpf: Test copying a sockmap and sockhash To: Martin KaFai Lau Cc: Shuah Khan , Alexei Starovoitov , Daniel Borkmann , kernel-team , "open list:KERNEL SELFTEST FRAMEWORK" , Networking , bpf , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Sep 2020 at 18:23, Martin KaFai Lau wrote: ... > > Yeah, I think so. We'd need to do something similar to your > > sock_common work for PTR_TO_RDONLY_BUF_OR_NULL. The fact that the > > pointer is read only makes it a bit more difficult I think. After > I thought the key arg should be used as read-only in the map's helper. > or there is map type's helper that modifies the key? I don't know, that's what I meant by more difficult. If map keys are always read-only like you say this would be straight forward to do (famous last words). -- Lorenz Bauer | Systems Engineer 6th Floor, County Hall/The Riverside Building, SE1 7PB, UK www.cloudflare.com