Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4691198imm; Mon, 17 Sep 2018 19:54:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdacmlmaffYTqXJIGWz0Xju1m9gosLiOBhaIMxqXHHsixSR7zy0SUQ0SMtvfsP5MBZU46tIy X-Received: by 2002:a62:d113:: with SMTP id z19-v6mr28268513pfg.98.1537239243960; Mon, 17 Sep 2018 19:54:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537239243; cv=none; d=google.com; s=arc-20160816; b=uiN0WKsdJ7/Ks0HYsWZD4qKVXTd9mdzhRZuXWI5MuBxHvGeSwmKeSIP9x4z2YhJKPh iM7WYysFLqXR58hNAsIMxn0xzHrNshSmKwnf8IrxCFqYHnbxwwUBUx1jeTbaznnBVW7G vYXDx6etJZGt+qnSTNwbSDDqdZi1S5aVReDUoFkd0oU7/byyfXjQN3CCdZVS+ulzOJPP i8mYdnq+1L8iUWsr9DakpgNcaEN3goULqdMSfigCgrIrkvcjb+r6W7UXcBNCo0yhN9KY TvnbYXMUDCygEyGnlQJ0OVAiJtF31UgNuyi5SSBWCic2AiNPy1GlyWIL9I0Y2faPcAyb agSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=Pub6A6z6Q4BOB3td8+groqW4WNKjP4FiDT31H0gNbg8=; b=ynAP9xdhb2RiT5PN5NqZA8m2kRE3T/ASFfhtmCK7sIgDKIaP7hPW/ElxLgf7ihfIq9 OwnVoFY7UAP7CvFXKYRW/WxN8XI/smh9e+nX1XBzpGRAOz6UEGJYRZqUPoXRLBov1F2m 2DNlFX4CtayCSUFZPP/cu7e8/TYlDyz0x+e7JsiVX9ttFY0bXRnf4QGjSCLtehoP9Y/x fTAMkA3lF1WmEn18cqBPxsnWzL1n3oUwoTY+8/2CF1Tm3dzyWH+vMLO3EOhrIZy02mTQ ECFDpd9xy7i1nQkpki3AnAnFCTe3ja4D9pIgtYQtagmCXhNJcmps9PJsVyHGyPIcjmZz FwiA== 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 x3-v6si16134475pln.232.2018.09.17.19.53.49; Mon, 17 Sep 2018 19:54:03 -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 S1729129AbeIRIWP (ORCPT + 99 others); Tue, 18 Sep 2018 04:22:15 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:54630 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726414AbeIRIWP (ORCPT ); Tue, 18 Sep 2018 04:22:15 -0400 Received: from localhost (unknown [104.240.4.228]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 20022146330DA; Mon, 17 Sep 2018 19:51:51 -0700 (PDT) Date: Mon, 17 Sep 2018 19:51:50 -0700 (PDT) Message-Id: <20180917.195150.315319338322641005.davem@davemloft.net> To: asmadeus@codewreck.org 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 From: David Miller In-Reply-To: <20180918024536.GA2061@nautica> References: <20180918015723.GA26300@nautica> <20180917.194059.1970452340378032090.davem@davemloft.net> <20180918024536.GA2061@nautica> X-Mailer: Mew version 6.7 on Emacs 26 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 17 Sep 2018 19:51:51 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dominique Martinet Date: Tue, 18 Sep 2018 04:45:36 +0200 > 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) What helper is used in the BPF program to get this offset value? (also good info to add to the commit message)