From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Holzheu Subject: Re: [PATCH bpf 1/5] bpf, s390x: do not reload skb pointers in non-skb context Date: Tue, 9 Jan 2018 15:20:37 +0100 Message-ID: <20180109152037.494db115@TP-holzheu> References: <20171214200727.22230-1-daniel@iogearbox.net> <20171214200727.22230-2-daniel@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ast@fb.com, naveen.n.rao@linux.vnet.ibm.com, davem@davemloft.net, netdev@vger.kernel.org To: Daniel Borkmann Return-path: Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:54756 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753111AbeAIOUr (ORCPT ); Tue, 9 Jan 2018 09:20:47 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w09EKXHl137303 for ; Tue, 9 Jan 2018 09:20:46 -0500 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 2fcvjarrcp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 09 Jan 2018 09:20:45 -0500 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 Jan 2018 14:20:42 -0000 In-Reply-To: <20171214200727.22230-2-daniel@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: Am Thu, 14 Dec 2017 21:07:23 +0100 schrieb Daniel Borkmann : > The assumption of unconditionally reloading skb pointers on > BPF helper calls where bpf_helper_changes_pkt_data() holds > true is wrong. There can be different contexts where the > BPF helper would enforce a reload such as in case of XDP. > Here, we do have a struct xdp_buff instead of struct sk_buff > as context, thus this will access garbage. > > JITs only ever need to deal with cached skb pointer reload > when ld_abs/ind was seen, therefore guard the reload behind > SEEN_SKB only. Tested on s390x. Hello Daniel, Sorry for the late answer - I have been on vacation up to now. Thanks for fixing / testing this for s390x. Michael