From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85E0DC433F5 for ; Wed, 4 May 2022 15:33:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351931AbiEDPhQ (ORCPT ); Wed, 4 May 2022 11:37:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236890AbiEDPhO (ORCPT ); Wed, 4 May 2022 11:37:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFE39443F8 for ; Wed, 4 May 2022 08:33:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6C140B826E0 for ; Wed, 4 May 2022 15:33:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF7F3C385A5; Wed, 4 May 2022 15:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651678416; bh=7uhZxm+A/sRm+aC5Zd4aA9MiSCvNtDUpdxPH3zxeV38=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=iKYdHGPcTeBptqk0nLYEEk8w9Fcj822uxpuoCDDzp9R8MbYICIyENRtr/E/oRiM8k iJHZ0CtXwBptRfPPp9mqc5oCUdq5nfMI5pk96c1KRRKS4cq1MMqkE5TIwh8x2p1xJ2 ZM39T6BUY8o/w/V99Htuo9hjb7SCrN4wBangydpbNEd6CZPJmx2vRDHKxS8ch+lvGS GoxQFWgur8FvHYLWKHzKKoRn/UJiwiF1lmbRK+bk6ip7ThO5ZS91Jh2F4lQUo7v+wo Acj0KWmWhF7tLuJ9HcaVCrWU0Ufi473s7jXkKnPdBU7YJYaebYrF/9MQ5VtZM8kxc3 z4USDmZqY1nYw== Date: Wed, 4 May 2022 08:33:34 -0700 From: Jakub Kicinski To: Paolo Abeni Cc: Jamal Hadi Salim , netdev@vger.kernel.org, Cong Wang , Jiri Pirko Subject: Re: [PATCH net] net/sched: act_pedit: really ensure the skb is writable Message-ID: <20220504083334.1b7a98e3@kernel.org> In-Reply-To: References: <6c1230ee0f348230a833f92063ff2f5fbae58b94.1651584976.git.pabeni@redhat.com> <7e4682da-6ed6-17cf-8e5a-dff7925aef1d@mojatatu.com> <20220504074718.146a5724@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 04 May 2022 17:11:25 +0200 Paolo Abeni wrote: > > For testing stuff like this would it be possible to inject packets > > with no headers pulled and frags in pages we marked read-only? > > We can teach netdevsim to do it. > > We additionally need to ensure that the crafted packets are cloned, > otherwise the current code is AFAICS fine. Depends whether skb frags are writable, or not. Or to put it differently why does skb_cow_data() exist and does what it does.