Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4686849imm; Mon, 17 Sep 2018 19:46:38 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYHcOCmYqhvhzWfdml+SdhuBjpo5+cp4uBQKkW4cck4zaAoR08bRDxY9dAaDJ1tikiH3ZMH X-Received: by 2002:a63:ac54:: with SMTP id z20-v6mr24987130pgn.74.1537238798020; Mon, 17 Sep 2018 19:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537238797; cv=none; d=google.com; s=arc-20160816; b=0cnl6dOQGxjzQsBGnCmgQf9LFID0XC0aIk20cp3AHfmVjpecLpg+0RLKKYLyuvdKzI qmWRG2sYMehJbI0Z2+TbBwBecPyd9Q7rjwQ9nup4eeo81JuGHlZTbmv1TKhBRdQ+OApM U45tv3uoURJ1nc1fUpL9/zljcEDRhL+8DhQBO8vMnVef3wDtrw9H8xD48ovXAqgjL1Mv MqrLU1I5cJU4LqhjeMtPeMimwy0/7g8BohuQZIV6iljqFVU7y+BCLH8FRAWFwQJ1THdz YRs5s4lb/kzoOvEriDgb+7X+9ZX2rw3mLI1mMTIGVU2SVFL/0vxL6tP5Cq3Hkaa/rRwO TNhg== 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=ttt4YhFJF9Z2c3JfCXOl4N1Ra4H/bfU2w9ZBFne484U=; b=Ne7lX4h12Bdb7P+ISfiBug53Msz1vFCOl739aLscUWCkEs1nZvndSQDniDMXjMYw8C Tet3g9rIUf1n93R3V+xNj/btTBac0RBtFaPV1pnfweO6twDjqHPT4STIbbUblwJklWaM /YYBzoeHRjwyQVZfkKSg1aNSsljzZ73+VYAKKXL9ecmzfN3PpolwOGN12R2T88gK7Bax L85DnElu/tFZjm+ItTzgm8ZZI1AyQadRy+8u8RZW2JhAitXpyJSJ4B+177DASm7aD/q4 iNat72+QbIKmVKuc6oQsIg8SKPgtRtYmm6dNUmPAtRnLs1gmk/z9HaOSNUbP+8DXd14r oqUQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a143-v6si19021965pfd.241.2018.09.17.19.46.23; Mon, 17 Sep 2018 19:46:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728621AbeIRIQO (ORCPT + 99 others); Tue, 18 Sep 2018 04:16:14 -0400 Received: from nautica.notk.org ([91.121.71.147]:37146 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbeIRIQO (ORCPT ); Tue, 18 Sep 2018 04:16:14 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 437F5C009; Tue, 18 Sep 2018 04:45:51 +0200 (CEST) Date: Tue, 18 Sep 2018 04:45:36 +0200 From: Dominique Martinet To: David Miller Cc: doronrk@fb.com, tom@quantonium.net, davejwatson@fb.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] kcm: remove any offset before parsing messages Message-ID: <20180918024536.GA2061@nautica> References: <20180912053642.GA2912@nautica> <20180917.184502.447385458615284933.davem@davemloft.net> <20180918015723.GA26300@nautica> <20180917.194059.1970452340378032090.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180917.194059.1970452340378032090.davem@davemloft.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Miller wrote on Mon, Sep 17, 2018: > Remind me, is there actually any way for the bpf programs run in this > situation to even _see_ strp_msg(skb)->offset at all? No, they can see it, so it's possible to make a KCM program that works right now if you are careful (I'm not sure why the offset within bpf is different from the offset in the kernel though, it looks like the bpf program skips the qos part of the control buffer) > There isn't right? And the alternate proposal was to add such a > facility, right? The problem is that this isn't documented at all, and I could not find any example doing that until Dave gave me one (I couldn't get it to work because of the different offset). The alternate proposal was to just document it, yes. > Just trying to remember all of the context, maybe it's good > information to add to the commit message? Good idea, I'll add some more explanation there. -- Dominique Martinet