From patchwork Mon Nov 27 18:32:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larysa Zaremba X-Patchwork-Id: 13470097 X-Patchwork-Delegate: bpf@iogearbox.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ThKZPKTM" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E90D4C; Mon, 27 Nov 2023 10:51:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701111103; x=1732647103; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jRJExu1kINjylZ5RqABycvnvPx8c1x03hFJra8lgzQA=; b=ThKZPKTM4iaPMR/Qg1a/bgBItdc/3axNV27wHclBAtCy2KFxBtOuphWN OeJfgBYwHjR/pJkwFb7KT37GG9lzr5nDsbFwfaIM3qp5bWMg7GY+xPYnC iR5bFIylAv7A4TZHb0edhvPbBrsQXQdKNGhWLTR2WILXuOAF9hQu60iNK 8Q/p0peOOVXxvnc8Q8JvwhBEgX+Ej+pshHCB5Cu92z5JwlXa8P6B63OQ5 48R8POMPYtlwZAyFizMdbeXS7lbEyBwWZOnOclRpRiX8Sixxh4CttFAMT jeSO/kC2YSShah4JNnjeQyxxu1Os1QHcfiVxlWgXDrdVhRkkeXi0b4WgG g==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="389921343" X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="389921343" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 10:51:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="16376304" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by orviesa001.jf.intel.com with ESMTP; 27 Nov 2023 10:51:39 -0800 Received: from lincoln.igk.intel.com (lincoln.igk.intel.com [10.102.21.235]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 1AB2138D81; Mon, 27 Nov 2023 18:33:52 +0000 (GMT) From: Larysa Zaremba To: bpf@vger.kernel.org Cc: Larysa Zaremba , netdev@vger.kernel.org, Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , Eric Dumazet , Magnus Karlsson , Willem de Bruijn , Yunsheng Lin , Maciej Fijalkowski , John Fastabend , Aleksander Lobakin Subject: [PATCH bpf-next v3 1/2] selftests/bpf: increase invalid metadata size Date: Mon, 27 Nov 2023 19:32:15 +0100 Message-ID: <20231127183216.269958-2-larysa.zaremba@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231127183216.269958-1-larysa.zaremba@intel.com> References: <20231127183216.269958-1-larysa.zaremba@intel.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: bpf@iogearbox.net Changed check expects passed data meta to be deemed invalid. After loosening the requirement, the size of 36 bytes becomes valid. Therefore, increase tested meta size to 256, so we do not get an unexpected success. Signed-off-by: Larysa Zaremba --- tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c b/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c index ab4952b9fb1d..e6a783c7f5db 100644 --- a/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c +++ b/tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c @@ -77,8 +77,8 @@ void test_xdp_context_test_run(void) test_xdp_context_error(prog_fd, opts, 4, sizeof(__u32), sizeof(data), 0, 0, 0); - /* Meta data must be 32 bytes or smaller */ - test_xdp_context_error(prog_fd, opts, 0, 36, sizeof(data), 0, 0, 0); + /* Meta data must be 255 bytes or smaller */ + test_xdp_context_error(prog_fd, opts, 0, 256, sizeof(data), 0, 0, 0); /* Total size of data must match data_end - data_meta */ test_xdp_context_error(prog_fd, opts, 0, sizeof(__u32),