From patchwork Mon Feb 19 13:48:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Iurman X-Patchwork-Id: 20596 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1292917dyc; Mon, 19 Feb 2024 05:49:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWLSW58Y2QVki0dDHu7kIDCncfQEZkS8nEkM2wVeK7hkA+0Q+iqwdnTUfeL1ozHuYEAA9AdgT4Yffp4erNIdgF1hwNI5w== X-Google-Smtp-Source: AGHT+IHQlZjEeb4+EQogv+Wk3XPttwc91zI9H6Mkp/1oNe29PqC5OASwL3MplooG58w82lnll+TM X-Received: by 2002:a05:6358:6f0b:b0:178:688e:fb21 with SMTP id r11-20020a0563586f0b00b00178688efb21mr13390146rwn.7.1708350571845; Mon, 19 Feb 2024 05:49:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708350571; cv=pass; d=google.com; s=arc-20160816; b=LcouNUP3kAPGbWlS7NNL2NGy/kzL3OJN8bssrgfm9pQrwcQAvHBr5kelifhCjw9sRG AVQiFN2rbaoV4MwpiDtX2tRzcDOLbxBUG6thg8N1w1BK2yWpeMCHUHzhYWLWy4B+d8As 5Uf/7yqfE/Q1bxk8dNQDSPy+uZrYakCTgYZ+aaWefZdcGIbK/hQmm2uF70alodZnqH/5 ZPvNHu2UxtgnZe3s3D+9F7XY8XIAQ98IO5yhvb5gLyp0oKtqhw6RujXMj/tUM8lu7tpr Qs8jtWPtBE3BTxryc1oW7EKNJMYIqhnokowwu670z1A1Dy3vQK+1TRYcjRfaZGINgadY /vNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=SY9aNVlTacbXAp2vEn5d+PobDYqqZDYINWpMGDqIKwk=; fh=1UEXF8WEdTRZGz3zsBPr9blJ8rxkIELeUsA6ymhnv1o=; b=e+/lcxW0dvbQBXKnl1HgOQ4gFZA+nE0jDYt3rdv7zGDip0zpJbcMkl9rp/dKT72f+x a+VQqtOtTf2atCSjbqm2XkmF3HF5Bp7nNUXzyUlY4xF1rcQr+Z9/rRSOY9YPCVD3TmCs C9tJRUF9iBhBPVg3H8oZfmUGOsrGL2iK7SUrBDKl2Y9kGtu2nxjBLh26pgSAkcLhmP3k 9kCQ2SuJ4GrnSUtwKGLObD/rux51IHllGhCofVycE1oTBRK6iQE4eqDFIDKLxNPbvGfw wf4FgIjuJMz1aIqLVmJHdt0Ax0PEzm3dKa4ryeZhRCVXUFIiJWl0K9ctBHvIlNx+iZam JsWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=wC79w9Av; arc=pass (i=1 spf=pass spfdomain=uliege.be dkim=pass dkdomain=uliege.be dmarc=pass fromdomain=uliege.be); spf=pass (google.com: domain of linux-kernel+bounces-71427-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71427-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uliege.be Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id c16-20020a056a000ad000b006e08068d6dbsi2903503pfl.265.2024.02.19.05.49.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 05:49:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71427-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@uliege.be header.s=ulg20190529 header.b=wC79w9Av; arc=pass (i=1 spf=pass spfdomain=uliege.be dkim=pass dkdomain=uliege.be dmarc=pass fromdomain=uliege.be); spf=pass (google.com: domain of linux-kernel+bounces-71427-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71427-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=uliege.be Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 21946281E34 for ; Mon, 19 Feb 2024 13:49:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1561837708; Mon, 19 Feb 2024 13:48:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=uliege.be header.i=@uliege.be header.b="wC79w9Av" Received: from serv108.segi.ulg.ac.be (serv108.segi.ulg.ac.be [139.165.32.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6ABEF364AB; Mon, 19 Feb 2024 13:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=139.165.32.111 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708350526; cv=none; b=qEJuqxzIsQCmn7jmnZlWLbMVfuCkQaCw8EiBID2Nvdpj2i39LsySEyaAzTOy7dPmM3NXyY6L8Awe6sFQ9YDWuH6AF8e9cJtRJFE6dyF5/ngWZB9DuLA6ZKghtKvENPyDLLyXYXm29i1JIwh9AwqS1ISpPjpTxpwPjbyQSfxz7/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708350526; c=relaxed/simple; bh=wL/23D8NCnghW0/R7m8chsNXdV/IJdIAhfUV7sVJLgY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=vDt71pCEdlsam0XiZ+8kzMdSQbReU3J246v1pVyYk1Xfb3Z05IO5bsI24nvSIl/dghqJNzZjzZVyYr88Tbt9uOY+QIDKvlTWhz3J/PFmgQEiaEtEGf2X/7tG/qvY7p1gWcGEBDS7T2spktIj2QPjkoS+ShJVwZIGSz+RSoehqYM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uliege.be; spf=pass smtp.mailfrom=uliege.be; dkim=pass (2048-bit key) header.d=uliege.be header.i=@uliege.be header.b=wC79w9Av; arc=none smtp.client-ip=139.165.32.111 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uliege.be Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uliege.be Received: from ubuntu.home (125.179-65-87.adsl-dyn.isp.belgacom.be [87.65.179.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by serv108.segi.ulg.ac.be (Postfix) with ESMTPSA id 1EEA8200EEA1; Mon, 19 Feb 2024 14:48:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 serv108.segi.ulg.ac.be 1EEA8200EEA1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uliege.be; s=ulg20190529; t=1708350522; bh=SY9aNVlTacbXAp2vEn5d+PobDYqqZDYINWpMGDqIKwk=; h=From:To:Cc:Subject:Date:From; b=wC79w9AvPvWPbkvfsT7tIFvJH/3EFpGd50R71n1M3rs7CjCGAuCVd0ylV4mTo6wNF rQY1bZ3NZ3BtYaKvyMO5Hl9Pd3J7iItX/oA3HTnpqhr9MkTD9rZX+atwUvK9NWX/uw RYs1ckSMOg7k9p+q28jQyd5eRdIVyJnuY0SRjfLQzrjOTkq4ULg2CJKzl59E6NKCLJ nzGLqG6tJyXi/FDkleei6Ie/Q8ZXM5CB6OM9jyQFXHO3WiH+1lbqPG1+Y8KoN6UlwD wR8h6nVeHMCLiA6UC/BiVSuZ4w9qs6SyURXLwrDUDnIwyvCwYLsouYZMd5syG2XRi5 K20lwmnsKxWCQ== From: Justin Iurman To: netdev@vger.kernel.org Cc: davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.kernel.org, justin.iurman@uliege.be Subject: [PATCH net v2 0/2] ioam6: fix write to cloned skb's Date: Mon, 19 Feb 2024 14:48:19 +0100 Message-Id: <20240219134821.14009-1-justin.iurman@uliege.be> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791335408496033576 X-GMAIL-MSGID: 1791335408496033576 v2: - use skb_ensure_writable() instead of skb_cloned()+pskb_expand_head() - refresh network header pointer in ip6_parse_tlv() when returning from ipv6_hop_ioam() Make sure the IOAM data insertion is not applied on cloned skb's. As a consequence, ioam selftests needed a refactoring. Justin Iurman (2): Fix write to cloned skb in ipv6_hop_ioam() selftests: ioam: refactoring to align with the fix net/ipv6/exthdrs.c | 10 +++ tools/testing/selftests/net/ioam6.sh | 38 ++++----- tools/testing/selftests/net/ioam6_parser.c | 95 +++++++++++----------- 3 files changed, 76 insertions(+), 67 deletions(-) base-commit: 166c2c8a6a4dc2e4ceba9e10cfe81c3e469e3210