From patchwork Fri May 24 17:07:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673348 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 CEC9612EBC9 for ; Fri, 24 May 2024 17:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; cv=none; b=dJlZbqTzcn5eIIBjgjzQ9MoHk6taG44zJisp+0L3dwLRAdQwtduyiK/DY6yQts/c/brq/M95/avlRLH/4mgr59bCw6nfw7EOEDfxS5pf08a7Q9rFfeEK2C9uHITI8MmWjl0gGV9f2IU42NFMlIVF+OCnP2ygTTRabmPemJns8S8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; c=relaxed/simple; bh=vv4qGe1UAumkQ4wSch6uTTp9AdEUJtju2263fhtTp04=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Quv5+NMsyeSDpqubW82wyWw3r8MKM/u2MzF3SMPyt265LHdVa6ZVaapTrh9dq4El0Q/iZAvshAI/WCIijXWJin0/12onBrtqJ0mziWSDmq2VtlPKH7oflOgVSUeEuVJ16HG8BShkAolnyCTc49K7KhG18MJOGz6ir4hcrbohcSs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=DE659tlB; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="DE659tlB" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=3htqzQPxW34FWM5oSonEr1H66qNQHMWv4eyRm4JFb8g=; t=1716570559; x=1717780159; b=DE659tlBqTS13oK9ZM5SAyIH+ORiPnVHvf/N7myXtcjXBov D+NYAnNOoqEeeYrK7LcIVV4v5i6TWlIahMNTmtLrEyKQkOeRKx89MqZU42Uhdo7vouKSMengx2MIX 9zuOJ+zizR/xZWoz4ZO9SIBs/SRcb2XnniR2u4jROSpiy6QFZ6cWFvVjeO63NRk7l+C/gWORXsPHb E1xB96cJ9/xJTee03OdumVcKuuXi5j7dC9tgPoPmzuKJ5ZBGgh+SuBpMAbvfFCyUrf9eJIJr936SI BIW/uee6bYzH9BIpFMiE8qWeEC7RbdaEtsarjQX22B4Gs84FRel4SKqduKsOE3Nw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPn-00000008Xuw-2fH5; Fri, 24 May 2024 19:09:11 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 01/74] gentree: fix python quoting errors Date: Fri, 24 May 2024 19:07:13 +0200 Message-ID: <20240524190906.d575052d1a9d.I8d3a02f96f06f8e5e7f2852f56f008045f5ea72d@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- gentree.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/gentree.py b/gentree.py index 05bb91b39291..a80b0a8def29 100755 --- a/gentree.py +++ b/gentree.py @@ -325,18 +325,18 @@ def get_rel_spec_stable(rel): """ if ("rc" in rel): m = re.match(r"(?P\d+)\.+" \ - "(?P\d+)[.]*" \ - "(?P\d*)" \ - "[-rc]+(?P\d+)\-+" \ - "(?P\d+)[-]*" \ - "(?P[usnpc]*)", \ + r"(?P\d+)[.]*" \ + r"(?P\d*)" \ + r"[-rc]+(?P\d+)\-+" \ + r"(?P\d+)[-]*" \ + r"(?P[usnpc]*)", \ rel) else: m = re.match(r"(?P\d+)\.+" \ - "(?P\d+)[.]*" \ - "(?P\d*)\-+" \ - "(?P\d+)[-]*" \ - "(?P[usnpc]*)", \ + r"(?P\d+)[.]*" \ + r"(?P\d*)\-+" \ + r"(?P\d+)[-]*" \ + r"(?P[usnpc]*)", \ rel) if (not m): return m @@ -347,8 +347,8 @@ def get_rel_spec_next(rel): Returns release specs for a linux-next backports based release. """ m = re.match(r"(?P\d+)[-]*" \ - "(?P\d*)[-]*" \ - "(?P[usnpc]*)", \ + r"(?P\d*)[-]*" \ + r"(?P[usnpc]*)", \ rel) if (not m): return m @@ -1099,7 +1099,7 @@ def process(kerneldir, copy_list_file, git_revision=None, # groups -- 50 seemed safer and is still fast) regexes = [] for some_symbols in [disable_makefile[i:i + 50] for i in range(0, len(disable_makefile), 50)]: - r = '^(([^#].*((' + bpid.full_prefix_resafe + '|CONFIG_)(' + '|'.join([s for s in some_symbols]) + ')))\W)' + r = '^(([^#].*((' + bpid.full_prefix_resafe + '|CONFIG_)(' + '|'.join([s for s in some_symbols]) + r')))\W)' regexes.append(re.compile(r, re.MULTILINE)) for f in maketree.get_makefiles(): data = open(f, 'r').read() From patchwork Fri May 24 17:07:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673353 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 B19C912EBF0 for ; Fri, 24 May 2024 17:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570563; cv=none; b=Pya0SE/I5KzQX7K7EprjD/Y8D6PmxIID13mxyJtzcnMNl5C+u+yeejRnLJVukZobWpA2m00saiytGLTBrQMIaJ57d7eTtQ7dnjsKIOOybHSryTH9jDqu+nlOx5A3lE8/OT6hDFVK9iAuxIV0BPmXs330ygq8gCQKYYj8lQkGvqw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570563; c=relaxed/simple; bh=qLxD8fVQSuvXUhHJYx/lEhXwPE/juutz4yzYzik5ceQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iV0W3QQasDbuVI08QP8+tqs4WaLxDXGY2WuQKpqgNIqm/tAL4VNJRREyavo66IAxZ1VcrigxF1Y01wEjkL9ISJzKaVD5TZ1f3ltjPsQg+gFBecqPjr98Vk/g4jju3EXW0q+NNj92bRBPQqxoBk6GtemyOYu+oFh3NvUjxpbT5Cw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=n/Rt5Me8; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="n/Rt5Me8" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=rD5+0bRFyf2DYLcbRes6xcAAwJ/2UanL9uymiw7vKII=; t=1716570560; x=1717780160; b=n/Rt5Me8uYWakY7SzXf2LNQd+Sxbe5kcFpkiri9D4WXFtkP GK1SpGzibETNzRg2hTdGGXklk6aJnhNeEBG8+NhOUpaWVoQ33UDEoCRRaX/alRbrmi6nnnzllS7Tt vxSjB7vqDio5+oKIFqpEg3HLTs0CVE63tTmzkrSUGiqeaCshFQwTpzpTopXOPw1i849TeG3aQ9Tp/ CSvtrTBVOo/L/DnpiR4NQOy7D7AHZX7i7rRR6LShcISqGhinLeWrY7oOs1HxU7747d1uv/q/Dsnxp KQfs4eTrG06LBP/Z/CelmuR8BBgzSuFegs5yArsuPN1fl5EMoAS8/FXiJyAC3NGQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPo-00000008Xuw-1gEn; Fri, 24 May 2024 19:09:12 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 02/74] backports: build: allow kernel versions >= 6 Date: Fri, 24 May 2024 19:07:14 +0200 Message-ID: <20240524190906.d438f86506ea.Ic331b52f9678fd6b0a95dbe83267fc8b5ca0a733@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backport/Makefile b/backport/Makefile index 77c2670d637e..37cd2c05ab38 100644 --- a/backport/Makefile +++ b/backport/Makefile @@ -85,7 +85,7 @@ mrproper: done \ ) > Kconfig.kernel ;\ kver=$$($(MAKE) --no-print-directory -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ - kernelversion | sed 's/^\(\([3-5]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\ + kernelversion | sed 's/^\(\([3-9]\|2\.6\)\.[0-9]\+\).*/\1/;t;d');\ test "$$kver" != "" || echo "Kernel version parse failed!" ;\ test "$$kver" != "" ;\ kvers="$$(seq 14 39 | sed 's/^/2.6./')" ;\ From patchwork Fri May 24 17:07:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673356 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 8517612F37F for ; Fri, 24 May 2024 17:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; cv=none; b=IUViUKyluMwriYWEPKIJGlMeqkah2TOzfx4p7KR3j93V6keKuyVaoeKsr2ltWlYDC18cBMrI0v/1m6Oz5uO1yB2T+ogZu0VAH4FiLLhGLh4Mg7OLp//DwQPhH6D94v8p8utsQ+rsJBmqlT+IvELDSykijTBmR6TrRJA2La+t4qc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; c=relaxed/simple; bh=NXCIinXtGe278Y0K8+qrRgrPglnt+6X5NV6hOBQdtPc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ITvDUk5rcK7dgNVri1iiGX/Ks9SPm4xbJTX/2cr1MOitEmr6LBri1mSANJXsdpBCJK2wfG9hAW0aXZec09EVeLLXU6R2aBCiTmJNJODf7DnBd9p0wyPq+Jofs38R9+nUutcjoxtOaYD922i7tQFjjH2a/L9MW4tACn+pBsFJx6U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=S8v0VDgf; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="S8v0VDgf" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=hfKOzKfTB3zBCEERMBizDuVQmAkNUvhWPfHcAJr9JMM=; t=1716570561; x=1717780161; b=S8v0VDgfKFtxOnOLM6ilXHGU3hx8CDQJFyfhASztjOa9L0X R4qeIBT2mqK0Bn4NsY3RFOVVEwAhJMnvzv3HmkNGLCKbx3s/4kVh+dIZBcZC/TmqCzgwmM1ifNpIE mN7BXLc8Lc+aHtZsz31VXVivBElQf5FSPDIZfcB75ECbobH3N3vYBALvGDqytPmtB2M312xrryboH fzzjHBM3ukz9VVMZxfTvQPpgVszRrB8Xb6seFnSQQuDPvQUt8m/IWWJbTeDigXiAg1pEO/Bf1XMXk PrpF3GfjncbXenYn5WUm8dEAdWxetj/Zu8gg4MrSnLsQVnTeyhK0uZUdxFKmeAGw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPp-00000008Xuw-0McH; Fri, 24 May 2024 19:09:13 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 03/74] backport: add v6.* to the Makefile Date: Fri, 24 May 2024 19:07:15 +0200 Message-ID: <20240524190906.06afae49e6a1.I108ec4756919a9e7c73f3fbab9029a46be9c76f1@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Update Makefile to handle 6.* kernel versions Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/backport/Makefile b/backport/Makefile index 37cd2c05ab38..2844270e82a6 100644 --- a/backport/Makefile +++ b/backport/Makefile @@ -92,6 +92,7 @@ mrproper: kvers="$$kvers $$(seq 0 19 | sed 's/^/3./')" ;\ kvers="$$kvers $$(seq 0 20 | sed 's/^/4./')" ;\ kvers="$$kvers $$(seq 0 99 | sed 's/^/5./')" ;\ + kvers="$$kvers $$(seq 0 99 | sed 's/^/6./')" ;\ print=0 ;\ for v in $$kvers ; do \ if [ "$$print" = "1" ] ; then \ From patchwork Fri May 24 17:07:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673352 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 8492212F379 for ; Fri, 24 May 2024 17:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570562; cv=none; b=fmJl8rm4mMsP7X8pPFmqZel9koc0OrWuo8a2IY0ZdKhOykmE7ji9Rw0bnOEwSRrIs/L353VXuE+drkl2jirGVLURdqL47ZNozydlsmt6H9nz06zBlF9HpOXZgcJs/BqGR+46AxgkwnaX6Qj5XDrdhCKFEOf8io2Hoiv3LZ5b9ak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570562; c=relaxed/simple; bh=BwztDbwh+O3zEVRPdoVnfOf8curPHYjSox416k9RgSA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ApHdWVwSGp+B32MY4QwyObcGgukYKATBB4s4tDAB4G5rgzcsy1+Znm6xYAveMJJDtZeWqKFVRiDC9F1gjp4cNxivaPSU6DWRXgAJ2Jcan2OvzVOnaPvghCTATPguVLUSTLtBDBf8moy+slJsIKL+a9hVbOY7Lyn0KavZYv++IBc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=QORFET0N; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="QORFET0N" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=2K7OapDKaiIER93a/8MX23Wdb+3DoMB5ePwNdrDpeDk=; t=1716570561; x=1717780161; b=QORFET0N7nQBEUWYuoUA4W54m/vu4RGWXrj1BXz81J6U5Xq We2MpPWcVGreLeiZn2A2L4R9qINhbxNTtkMk8wbd4AhzErnQsRZ3kilGZ1G/Bt1zEUpBzQNcKHqex G7CNCsSu3XqGs8jBybZPxuuzZE4wSzf5KEYr/KpcHooies0PW4EobVMRIi9FIfYuULcFBwtgxujnY r9HBpkz2EIbQtBnE5TtHZzmJ01mXYqsMKk7n8GY3D0Tv+VywnEuWbH/Moe5fLsF3WqfwS9PgnaSBj LE+ik2y9FQFpYBcIsljcduejnInjplwQ3BXpNrqPG9gGXImTDETxbYyBVyxbdy+A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPp-00000008Xuw-2w8x; Fri, 24 May 2024 19:09:13 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 04/74] backports: move to -std=gnu11 Date: Fri, 24 May 2024 19:07:16 +0200 Message-ID: <20240524190906.f775c3da7b8d.Idec21530cec4c44875ff13eeee07565ab328dc1a@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit The upstream kernel moved and we want to take some patches that take advantage of that, so also move backports. Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- backport/Makefile.kernel | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel index 11ce4177f2f7..5735421dad8c 100644 --- a/backport/Makefile.kernel +++ b/backport/Makefile.kernel @@ -35,6 +35,10 @@ ifeq ($(CPTCFG_KERNEL_4_3),y) subdir-ccflags-y += -Wno-pointer-sign endif +# upstream moved, move the driver for a few constructions such as +# variable declarations in for loops +subdir-ccflags-y += -std=gnu11 + obj-y += compat/ obj-$(CPTCFG_CFG80211) += net/wireless/ From patchwork Fri May 24 17:07:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673359 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 7799E12EBF0 for ; Fri, 24 May 2024 17:09:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; cv=none; b=B+AhsULnU9nwq/W+i1wagQT6LeS8i4gVrgQ9+us/6qyXzBVuOEcZA6esUT400r4Gn/d83EO/H5A/94LSxNcycWyLRIhR9uhToNRuEfsr66Tn1uqEbhmJLAoyCugel4fc96Txal1JcKI0lPCrJ9WJkiCbteIxLIVdgFQs3c68VXA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; c=relaxed/simple; bh=1Qa/oNLyQg3W2BWUrvv5ChMwMgHl/2Fh9YjhdeDk8qU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rlsESM9bpaalNLw6rT8ZDibliZTifWjseRUF1ptsKYwM3qb7UrvRCAY1MLREnJZMFbTy+aqSCrKsSf2WATFj5orb9/7dMXAfv+3bbV3Ir9gXIQ8zZvFpSUiEiVskQTNm/jimWeM1OKzDhu6cP8Rim75ALyDN2eGeedpWYyTmAQo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=QPHdJ1lz; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="QPHdJ1lz" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+kpCoH1kWYibCrZAeezSH9RTk90qBevpmBhiX4wePCg=; t=1716570563; x=1717780163; b=QPHdJ1lzUMggiUg1Hps8EkISgjusXVJrNy16uIN1J5qoWFC g+5K2l7ju7H9mKnTpUK4lTUDVFuoVtsOjo7VvAxOmhSJFDycEuQDMkTqbiVzv/fQeoTsbZ35rJ/OJ Fy6i/BXYcOvfwzTb5n0naAeuaQQ0QS4MvZy0A/uxUmRVbLsDo+0SQyphSu+ATi1FFJFoJViq0IvB2 257fCzLRUQvs33iLSpmNeVJRW2Wnb4VLuCebDNfYyVGT/8RFup18Wb2dJhoufQTFiXxgWN6mVBntd MOl5rgMX4VIJ6IuSCAI/lRxkoOsPQ8sGdcG4czN4fDxPxl2pNn6/IOn2BtgukHLQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPq-00000008Xuw-1Ck7; Fri, 24 May 2024 19:09:14 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 05/74] backports: add crypto/utils.h header file Date: Fri, 24 May 2024 19:07:17 +0200 Message-ID: <20240524190906.35087ebc437a.I1032c7966d32d27d2d28aaa95f8393b87bda567f@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman This adds crypto/utils.h header introduced in c616fb0cbae8 ("crypto: lib/utils - Move utilities into new header") Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/crypto/utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 backport/backport-include/crypto/utils.h diff --git a/backport/backport-include/crypto/utils.h b/backport/backport-include/crypto/utils.h new file mode 100644 index 000000000000..aa55df78a398 --- /dev/null +++ b/backport/backport-include/crypto/utils.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Cryptographic utilities + * + * Copyright (c) 2023 Herbert Xu + */ +#ifndef _BACKPORT_CRYPTO_UTILS_H +#define _BACKPORT_CRYPTO_UTILS_H + +#if LINUX_VERSION_IS_GEQ(6,4,0) +#include_next +#else +#include +#endif /* < 6.4.0 */ + +#endif /* _BACKPORT_CRYPTO_UTILS_H */ From patchwork Fri May 24 17:07:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673346 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 1510212E1EB for ; Fri, 24 May 2024 17:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; cv=none; b=kbIMpH5dP7bay04lA0n/D+pWvPAePksTB+G8qTYUhyBNk3HP1Sl6EFgPnc8sI0jhyRSnlEuMN7ys9yXZvUqO/yp9Nfyu93dQorsoPY1qRhSbUKyiydzNSTvl/39OOKXjIvic1LmySLrXZtZOpmuLzQ7x1/mLyLhsPSsLV4e0ML8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; c=relaxed/simple; bh=fldVOxqgbzWEEmxA85TJERHVblFPDwmiwo7trohOaPo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gvhaPb1k9h5QMo8+/6Dsl6dB4iHUACZmx5F9gzafROaQ2rlinMQsreatGX8N6PBdAXD0tcc7iqtJLSUkexx8m/uvs68z7bnluXduNPCpHdN/I6SeN6j3UqMYQl1x/+0vVbh1R5qdYfTPxlKO9I2/r2kY3KJfKfmrbd6S6wkIzew= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=obzg2tGv; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="obzg2tGv" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=sa/GArDXrZlHIAA8b8HEzxvkavkYjWTBIWLLIwztPhk=; t=1716570559; x=1717780159; b=obzg2tGvK7bpLS9Nb+kSD8NRxfZGxeq6t5kQNLUmFkc2NqH ERcsWMtsohgvyGTPMDO/arnUubQqlMtk62SJULizDPGiT5KS24zr7YsAN4/wVlO5apSlzbyVHrXf8 yaCZzHzUt4D4z4vFkxbkyd2WVj4wX693XQ08py4P/DgX5hQWVOWkS9q/HND8ZkfiNEsZNGnl+iDiX yUCqUndNU/VOYztPvJzV87Y8/h63NbvIZRLArRbohr2WoxQVmpmiHtTw9I6qHt/L1g3k8VE1e7LfS fayBkzztTmw7qjJ7nlNWnvXPIpXIi5yZR5Q303YIdfmXN7I+Zmkv1/jIPVe+96Og==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPr-00000008Xuw-3ZdQ; Fri, 24 May 2024 19:09:16 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 06/74] backports: add id_2 argument to find_asymmetric_key() Date: Fri, 24 May 2024 19:07:18 +0200 Message-ID: <20240524190906.599a472c0beb.I0bc338dbb6b1c91bdd54cf656ab41d09f05b8248@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/keys/asymmetric-type.h | 1 + backport/compat/verification/key.c | 1 + 2 files changed, 2 insertions(+) diff --git a/backport/backport-include/keys/asymmetric-type.h b/backport/backport-include/keys/asymmetric-type.h index 5744de9cee0f..35ddd4008c60 100644 --- a/backport/backport-include/keys/asymmetric-type.h +++ b/backport/backport-include/keys/asymmetric-type.h @@ -30,6 +30,7 @@ asymmetric_key_generate_id(const void *val_1, size_t len_1, extern struct key *find_asymmetric_key(struct key *keyring, const struct asymmetric_key_id *id_0, const struct asymmetric_key_id *id_1, + const struct asymmetric_key_id *id_2, bool partial); #endif #endif /* __BP_ASYMMETRIC_TYPE_H */ diff --git a/backport/compat/verification/key.c b/backport/compat/verification/key.c index 329f8b22e41f..f95aca4fca0e 100644 --- a/backport/compat/verification/key.c +++ b/backport/compat/verification/key.c @@ -129,6 +129,7 @@ EXPORT_SYMBOL_GPL(bp_key_create_or_update); struct key *find_asymmetric_key(struct key *keyring, const struct asymmetric_key_id *id_0, const struct asymmetric_key_id *id_1, + const struct asymmetric_key_id *id_2, bool partial) { struct key *key; From patchwork Fri May 24 17:07:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673349 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 13C2312C47A for ; Fri, 24 May 2024 17:09:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; cv=none; b=WMkCja2n9ThliwDtISSQzL8m2sTgzL6IPhUYjzOMlVQ86aRsGxKsO8eam6FfYoziTDIltZLrEVZ8WyT80wBgDywh+Eomu0ygODWpTmdcV3GnLdBfOmBR/bfaIkr3BnglAyhIvszMqA208uC9ztKpy8XgauGV8oUbmaRnR1bUNLY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; c=relaxed/simple; bh=hFyHjPiUFU23bXfK0Yt0gWm7ShPE84Y1s2VoEpbLX/c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CGuMKlb1dTvY/pvTcjJo6igFdDb067Va2K6ckAvRg+gkgC1CDbh3qwZRCMLgL9ktBwaeGcsCBv6OYb4fmvd9Ej/wvJxZONgcX7mcowXMldTCVJJWANP+z87PB501n1X78mqyq8duiWdpVDMtpD80ORXTE6oNi8jbEPOvuDNNMZU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=A9vWalOM; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="A9vWalOM" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=TZH6sg472osSJvCrJbBlwmN4WYhiBJzkjqy6o+e8euM=; t=1716570559; x=1717780159; b=A9vWalOMWgcoqOR9XQ/iTVp1PVs+C8U9vlwPlZiePkw0ijL TnAYDUfxHL6rTYzWSo5RwsWyTiZ+3JyIaTYRfbHAcPVLunL6klpcuzTPj5bt1VzCgywFbaCV454/6 WTWcogKNt3KlqlHfKHekZ+DkZXHn7qbHO4sI5VsbLNG5F8+mZtoHM9sNAZtDHoWRXzHUjWDSTiUzK ur/USY8NQC5etchoT4uXB2BbeXmqm+g6fJLwef0KlyMf9LDNHHUKKFft4GLSkLPJ0J47bxS84A11O upkU9a76CPJNeNPhOcIvfyd6VsMFWRELHJeLKM8crpgLTUw2adMi5JEpIFDyVotg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPs-00000008Xuw-2AAZ; Fri, 24 May 2024 19:09:16 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 07/74] backports: align x509_loader with newer kernels Date: Fri, 24 May 2024 19:07:19 +0200 Message-ID: <20240524190906.5f730413052a.Icf65a934f1a62061da526c1c37f0c4ecf2b3c38a@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman x509_load_certificate_list() was exported in kernel v6.3 by the commit 3609ff6401c3 ("wifi: cfg80211: Deduplicate certificate loading") There's no any spcial Kconfig dependency for that, so make it depend on the kernel version. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/keys/asymmetric-type.h | 7 ++++++- backport/compat/Makefile | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/keys/asymmetric-type.h b/backport/backport-include/keys/asymmetric-type.h index 35ddd4008c60..7467be40d4fe 100644 --- a/backport/backport-include/keys/asymmetric-type.h +++ b/backport/backport-include/keys/asymmetric-type.h @@ -32,5 +32,10 @@ extern struct key *find_asymmetric_key(struct key *keyring, const struct asymmetric_key_id *id_1, const struct asymmetric_key_id *id_2, bool partial); + #endif -#endif /* __BP_ASYMMETRIC_TYPE_H */ + +int x509_load_certificate_list(const u8 cert_list[], const unsigned long list_size, + const struct key *keyring); + +#endif /* _KEYS_ASYMMETRIC_TYPE_H */ diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 7c56e92f5ca4..1d47bd59fe90 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -36,6 +36,8 @@ compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/oid.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/asn1parse.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/rsapubkey.asn1.o +compat-$(CPTCFG_KERNEL_6_3) += verification/x509_loader.o + $(obj)/lib-oid_registry.o: $(obj)/oid_registry_data.c $(obj)/oid_registry_data.c: $(src)/../include/linux/backport-oid_registry.h \ From patchwork Fri May 24 17:07:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673350 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 D02DC12EBD4 for ; Fri, 24 May 2024 17:09:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; cv=none; b=mqfUp4lFSFg8+2wTqFqN+4aJi+0oEFbStdeRUV8hv1zGZi3DcYA6Tbab3ZP13wq0aQDjBo6Zhkw1W6q8a0TDMo1Um0tw1SOFORsIGJQp2yxIuei6QCp5+UF1ZoNiPLjGXURH9b3JUo0XVb8Axz/xgnUld6S5JaRWDVsffxVTDBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570561; c=relaxed/simple; bh=gMbHlvgl23e22QQqOYBY8k8JUDgW+tDCZUdhq6yoKpA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qQngk6DD05vnVDmq1fMKtUG09Ciac8EfFNpMQfQabYljYAhUYzxYK6Rts6QYvGunOo0uuFM0zYRpnRyH+Zi+64H7Ypo6/rFHjWJkZ661cJwulP9boVWnFgKbrzwtVKCyzGSpKDFa+J7qFOM0W8DwYLvwUoC9pum6LQRFUEy5Irk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=cwdBReli; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="cwdBReli" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=i8pdS6eQpLjPlkKCXHwzc6bHc6AP9CIqi5Aju+vkrwY=; t=1716570559; x=1717780159; b=cwdBRelilLBvMmNXRhFSzBnGD7LlzirZyv0yUlWa2lagSGR JDXywuj6CyLKHap9HgN4JEpvdPb+tSn0lEEUkIrlazNOSW9zXrjSZN21FwqfI7/LxajfR0q4lqgw2 GUIGx5QLO1kDFyu1Re//KFiYz3yuKORQHE6BpWBu0ynZ41TiOFBOf09ZdTZRunB2r9T0IrFuVyL4Y Scw/8SYCgTxytmpfDwpdBxnIuDcu/7QdS7105S6bkaYWpbEA9JJND9OVGVZXqdeXNgMuxq/4mH8JV EWjDFY+x5to2mC4tR9hhTMp2mmbehMI6rDVcXZ727EWwIRhl9DvjHMCvVYYuutvg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPt-00000008Xuw-0a97; Fri, 24 May 2024 19:09:17 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 08/74] backports: add kunit/visibility.h Date: Fri, 24 May 2024 19:07:20 +0200 Message-ID: <20240524190906.048a9ecd29ec.Iacef906e369bb75e3c13557b3252f53e7442857f@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Starting from v6.7 some files include kunit/visibility.h Add this include, since it was added only in v6.2 by 9c988fae6f6a ("kunit: add macro to allow conditionally exposing static symbols to tests") Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/kunit/visibility.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 backport/backport-include/kunit/visibility.h diff --git a/backport/backport-include/kunit/visibility.h b/backport/backport-include/kunit/visibility.h new file mode 100644 index 000000000000..a23992aa8920 --- /dev/null +++ b/backport/backport-include/kunit/visibility.h @@ -0,0 +1,12 @@ +#ifndef __BP_KUNIT_VISIBILITY_H +#define __BP_KUNIT_VISIBILITY_H +#include + +#if LINUX_VERSION_IS_LESS(6,2,0) +#define VISIBLE_IF_KUNIT static +#define EXPORT_SYMBOL_IF_KUNIT(symbol) +#else +#include_next +#endif + +#endif /* __BP_KUNIT_VISIBILITY_H */ From patchwork Fri May 24 17:07:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673351 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 B30E712EBFA for ; Fri, 24 May 2024 17:09:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570562; cv=none; b=FIfSKwA1N8TAaj2ILqjj8Lftjj98Ve+h6v9NVgpjaewUX5bjsN763V/+OiX6Cd338qVnX6RdEPVsVXz6/Ii6qSNTkv27fWat3+qH/2dW8FIQ75f+ziHH695RFWnBmMpcwpcw1uE7eBSSNlntGB3YhB0ZZBNXbsE7UOf7QZjUGMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570562; c=relaxed/simple; bh=xe8aXH8Q9GOswjxbXIEt1zRZkApRo78XjEnuzNT9tZY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KlgBXaQ8+vqecOEcPoLSucX7GRKKNWTFWJrh8CAAGfhOM9fxG4VxOeNQVaEnSi27qQ8LFkSWftYtcug9VLpjEpXq719cVFEY6ykT78DW6G29ritRL8QNP/f2xxVM16WmjMw4NqPUnaqhoQ+y72V04vbX0rcponXcYTpVbri4SoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=nzu686FD; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="nzu686FD" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=p5QvOtzigV01fB/UiL5YWT4Deg0v2qfm6tS+X3vdKAY=; t=1716570560; x=1717780160; b=nzu686FD3sQbk+A8ums8I7ArLzFgeiZ90gCHWhWL6oCjJWD uo0p3wAq4roKBF3T1R4gOltSYjv+mZBmZ6pcCwFwkv1I/2TX1WWAkNEDCV8AVCsnjOaOyjp+ZZ6Xg /ptefpbrw0jF1HTSjr0PzcggYXw/+ILp7rbmEOE1MUUuLvzXmdEN03t39wpiI+olh8NfKtnDhIKvn XCqmyebWbi//SMB3Mtb6zRYOc3AEQV6u/UGXvA4aQVnTG0nCeIDNPXxSDeAxz/gYDtkwHRblgBWl8 o1L9WMlF8HJoMfOyiUt3cY+2J22kMUifh+bj/W/oeqO9LTNhAP84i7tDYQsSbROg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPt-00000008Xuw-3L5S; Fri, 24 May 2024 19:09:18 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 09/74] backports: add linux/acpi_amd_wbrf.h Date: Fri, 24 May 2024 19:07:21 +0200 Message-ID: <20240524190906.949a500a035d.Ib2f48d784990a93132d04cfc5112e8a7c5cefc1f@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit Starting from v6.8 some files include linux/acpi_amd_wbrf.h Add this include, acpi_amd_wbrf.h was added in v6.8 by 58e82a62669d ("platform/x86/amd: Add support for AMD ACPI based Wifi band RFI mitigation feature") Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- .../backport-include/linux/acpi_amd_wbrf.h | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 backport/backport-include/linux/acpi_amd_wbrf.h diff --git a/backport/backport-include/linux/acpi_amd_wbrf.h b/backport/backport-include/linux/acpi_amd_wbrf.h new file mode 100644 index 000000000000..6946058e05cb --- /dev/null +++ b/backport/backport-include/linux/acpi_amd_wbrf.h @@ -0,0 +1,38 @@ +#ifndef __BP_ACPI_AMD_WBRF_H +#define __BP_ACPI_AMD_WBRF_H +#include + +#if LINUX_VERSION_IS_GEQ(6,8,0) +#include_next +#else + +#include +#include + +#define MAX_NUM_OF_WBRF_RANGES 11 +#define WBRF_RECORD_ADD 0x0 +#define WBRF_RECORD_REMOVE 0x1 + +struct freq_band_range { + u64 start; + u64 end; +}; + +struct wbrf_ranges_in_out { + u64 num_of_ranges; + struct freq_band_range band_list[MAX_NUM_OF_WBRF_RANGES]; +}; + +static inline +bool acpi_amd_wbrf_supported_producer(struct device *dev) +{ + return false; +} +static inline +int acpi_amd_wbrf_add_remove(struct device *dev, uint8_t action, struct wbrf_ranges_in_out *in) +{ + return -ENODEV; +} +#endif + +#endif /* __BP_ACPI_AMD_WBRF_H */ From patchwork Fri May 24 17:07:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673354 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 85E9912F387 for ; Fri, 24 May 2024 17:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570563; cv=none; b=vFBo/2eapCTH6LipDb1FHNWBOBbPZT6mknqsNdgwfUj6PL7jHeDWotEIevweDWcp8hbZ4q1ebYm5Ne/1q6y8UoKNYCrKRhBd48wyOcqQGIefSycvskeIKROCg34HVd/PGos3You9LkJ1B3u4fT+a/AHyGPHTuT1HDm/cfrVk3n0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570563; c=relaxed/simple; bh=jtzmKNsqyzKzpRHv37EYebEi1RaIP3fZTkIgkF817tE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bFYwUVhsFd4DqJpQia33xwYDEHHWpSAdS+LjW2xUHp1gTThTSfOPCmOVVc33FZx/u6WghLdxP74q+2eldBe7zW9vi3zpftC/nQfcDL5GuUa4UfUdw+Gjr9ckXrQ/jbZlF2tfp2JEItMQZ3jfDGqp2GaWh6rngDg4X4tfY4lEhaE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=VEZMsvvV; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="VEZMsvvV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=67sY4M2ZTRVE9wRsf4wzp5ro8A0Bj/1eToMr62s5BkY=; t=1716570561; x=1717780161; b=VEZMsvvV1MNpxjVq9IAumOHSM9aLyOYjsPm8icA4mF9bsIq bkSTB2PRfs0EiwPI08mqRI0hFunS/rvU5LpaaMsw73BbUOAqoXpheNS7N3tlwyCZwHUWXHFFlsnWQ v3S7DtFS5v1b7cQMyY3LechAtaDqdaEphUta06+bYwj6WV3m2BTivGVNA9GS3lrOZhqk0NOXructY 4/AsT4ZAF2sRNvEWTSlwmX+T2xSCE/hfsP//+/Ywivrb5pl6EIvCeLxaWZk75lWr3yFYmhKj15aPu dD7VX1KebbAwFsMbq69xY6+vOn2sjJMKsFcD59UQV9nj6+6eV7LewFhEdPymyhvg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPv-00000008Xuw-0bMZ; Fri, 24 May 2024 19:09:19 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 10/74] backports: Add __counted_by attribute Date: Fri, 24 May 2024 19:07:22 +0200 Message-ID: <20240524190906.03404f605970.I5f3ab2eb202242a2ccac0053fab1fb7d96c35829@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman This adds __counted_by attribute from c8248faf3ca2 ("Compiler Attributes: counted_by: Adjust name and identifier expansion") Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- .../backport-include/linux/compiler_attributes.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backport/backport-include/linux/compiler_attributes.h b/backport/backport-include/linux/compiler_attributes.h index 31ddc163e09a..6a0ffca2e102 100644 --- a/backport/backport-include/linux/compiler_attributes.h +++ b/backport/backport-include/linux/compiler_attributes.h @@ -31,4 +31,17 @@ #endif #endif /* fallthrough */ +/* + * Optional: only supported since gcc >= 14 + * Optional: only supported since clang >= 18 + * + * gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 + * clang: https://reviews.llvm.org/D148381 + */ +#if __has_attribute(__counted_by__) +# define __counted_by(member) __attribute__((__counted_by__(member))) +#else +# define __counted_by(member) +#endif + #endif /* _BACKPORTS_LINUX_COMPILER_ATTRIBUTES_H */ From patchwork Fri May 24 17:07:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673355 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 3D79912EBD5 for ; Fri, 24 May 2024 17:09:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570563; cv=none; b=DnqG8ZSz8JInUGm3nXSXaOkVFSGgQjDdni5qvBQel6O35wx56oUlgPW3f2aja0+jayMgQ2F5U07NCAxfbR8S5Ro2SrFx733HXFOV2KwI4OG1dWtxq2TM2HG8otMn86lAp7jFSUkZG+xvnhICyKVIREl6sS+l+Up4TA3wSuIP2NA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570563; c=relaxed/simple; bh=JzhiZIH6lJIma2Z0xYMT2/Dk3fQwq0dlMOTCplY3GsE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AjpUjPAu/uO/K2jkAqmnRNFTZfIDUstOhZKyKEQuLnxugOQPeUvn5O8QGhSKoPF5EZZuKk50RddSqypN+GnATRLn9a1QaxTE08RNNx3fe+gvVJSP7RdAHlpgbXWu6K0Y9LuqB22VGKuMnAlnGi7TNkirKM4hei1ouse2iAZ6Rw4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=pb0jdNrJ; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="pb0jdNrJ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+mcXsJyx2eRCtTxaK6kuvnU54ia7gPJ/p07HCb11OTc=; t=1716570562; x=1717780162; b=pb0jdNrJxmlzjCOBeLUDDC9Dwsl3Xl6g6lWxzJYs2VP7BaB MAibN5BVqiduyw5576E/y9pJI1KeVSM2iSk+vrV+DL2YM85I3Dl82aYR4jZajy1CoyEOc0KRWbCvQ 4xTcwSgJqAA8SKzRbB8qaEUJdTdcDm3cgTujzhwja822Pp9EK2MvOkyM+hSBSA2A5uReFT3UM8UaH +02xEcDL4aVOhWlbSqLvVEAR2twXvUB7D/BVvNVOVQyVV0nCe+iqNrivF541CJAm/ToHWTUiPww2f Qd7QCX6o0fkHi10vYo640KSdU9wP76NEJrGF9wehPwhVN8WF0j9765AQlxEDOWJw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPv-00000008Xuw-3LNR; Fri, 24 May 2024 19:09:19 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 11/74] backports: add stubs to handle debugfs cancellation API Date: Fri, 24 May 2024 19:07:23 +0200 Message-ID: <20240524190906.076a30163546.I33e5bb5a3f12cbf87838ef867681a7ba51beaf46@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman It is added in v6.7-rc4, add empty stubs. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/debugfs.h | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/backport/backport-include/linux/debugfs.h b/backport/backport-include/linux/debugfs.h index 6020c210f133..cb954ac392a9 100644 --- a/backport/backport-include/linux/debugfs.h +++ b/backport/backport-include/linux/debugfs.h @@ -23,4 +23,28 @@ static inline void debugfs_create_xul(const char *name, umode_t mode, } #endif +#if LINUX_VERSION_IS_LESS(6,7,0) +/** + * struct debugfs_cancellation - cancellation data + * @list: internal, for keeping track + * @cancel: callback to call + * @cancel_data: extra data for the callback to call + */ +struct debugfs_cancellation { + struct list_head list; + void (*cancel)(struct dentry *, void *); + void *cancel_data; +}; + +static inline void +debugfs_enter_cancellation(struct file *file, + struct debugfs_cancellation *cancellation) +{} + +static inline void +debugfs_leave_cancellation(struct file *file, + struct debugfs_cancellation *cancellation) +{} +#endif /* < 6.7.0 */ + #endif /* __BACKPORT_DEBUGFS_H_ */ From patchwork Fri May 24 17:07:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673357 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 F190212EBFA for ; Fri, 24 May 2024 17:09:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; cv=none; b=WwhE30ztqxIwoNp++fKIqirBOxZ6qnYes3SRmSp/o8QjDyxkcz1aPKW5zkYE13jsbCHjyBaykNSDq6uXU7vhvf5WTLG7+c2zxoV3ehDUvGN6jjffIl3KHeS32UzvyChCrkuhNmVduPWRaO9Ce8mlQxVxU3cst4CvvGJY3eLzm28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; c=relaxed/simple; bh=srdfCEs2V6qulytPNcCqGQwkpwj4G9C0pRMe7fsx1c8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gen7sr2d2LxONy89M4+cKUISbPqrRNfg3zmMRD4VR19TLAgxdWOHZotT2gtZ42jHwb/AKd7jgrZPQW9kkT37X5bV15shvTe+AqKW0sCvKgfBcMMRos+/xQGvimMYrSPZRrX57bmmEG2Vc65dvDC9XTVqU70RyvHdpzze8maQYzI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=sNutgKWE; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="sNutgKWE" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=GlFunf2neCwzdqBa/BZYTaJAjlLoyS6g71JZBxbyNzU=; t=1716570563; x=1717780163; b=sNutgKWEynFumMwVWTDLEx5bus50xcwjDsoFn++i0YAHMtM LXCwIcMbIP3rHUQhSFT64PbdsUH1Oh2mfiKRwlTIDVY3mI+INfJl4GSG5wfF9itbY2NuwJu2+b/Bf /L/oFatVss73+kMk2YW2wPMLy5/xOXXU/7p4AzA/xIHOx2DYRXh6Wg90ViMSf+3aUtuwbtWKO6OzQ ev01r0oIdsfv3Eg+XrowqkXnaqckhPbC1PH/xIup09RlptLmux4+R02qtg7XI4UL8Q7qpSqZafAc4 ObEYTHxJJdf2efOWGtlAsoFjNpYWkTSDA99Qg0O3Na86W57UVvgjXAO13oX2Zu3g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPw-00000008Xuw-28VX; Fri, 24 May 2024 19:09:20 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 12/74] backports: adjust namespace argument const Date: Fri, 24 May 2024 19:07:24 +0200 Message-ID: <20240524190906.2fce117fbf36.Iedd62c5e3204ee9d1ba2b370a930d19409d7ef37@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/device.h | 6 ++++++ patches/0108-namespace-arg-const.cocci | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 patches/0108-namespace-arg-const.cocci diff --git a/backport/backport-include/linux/device.h b/backport/backport-include/linux/device.h index 46f2190b06c4..1e5a5534340e 100644 --- a/backport/backport-include/linux/device.h +++ b/backport/backport-include/linux/device.h @@ -7,4 +7,10 @@ struct device_attribute dev_attr_##_name = __ATTR_RW_MODE(_name, 0600) #endif +#if LINUX_VERSION_IS_LESS(6,2,0) +#define __ns_const +#else +#define __ns_const const +#endif + #endif /* __BACKPORT_DEVICE_H_ */ diff --git a/patches/0108-namespace-arg-const.cocci b/patches/0108-namespace-arg-const.cocci new file mode 100644 index 000000000000..a03f32c0010e --- /dev/null +++ b/patches/0108-namespace-arg-const.cocci @@ -0,0 +1,20 @@ +@ns@ +identifier cls, fn; +identifier __class =~ "class"; +@@ +struct __class cls = { + .namespace = fn, + ... +}; + +@@ +identifier ns.fn, d; +attribute name __ns_const; +@@ +fn( +-const struct device *d ++__ns_const struct device *d + ) +{ + ... +} From patchwork Fri May 24 17:07:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673358 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 646B912FF95 for ; Fri, 24 May 2024 17:09:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; cv=none; b=pFUqXkVqZs7+KNV5oeIVcEoRFVnBT5eQ0KSgwiI6g3KQV8fcc8UropmVdCJXBdkk2s4wdUGAymrnbV+sMTFeInnfWlJ3038+S3JUpzkislrWOGIItx9pq908iCuaf9k4xJve/u9HfoTA8m0hoOIIWn083kH2kqJBARViSo9+kDM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570564; c=relaxed/simple; bh=dbEJYggp+0FAfA5ODiQLegHw/BQ5ZrGvuYaqAh9qlYM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Jd3VPau5/24E09vh9ZtMdReS4yWB9/HLORfkqvLdMYg07SaFX2Y9F9XrhcL6HFVJ7FHHk/Ac60xvi5yVBzJ26eeo+zBRURLJZnZkLCjZx/q3YaQS/1LBxfUVKCgWOmjWtImO/Yt06pwlF3VPyK88WOSWA3oOmhD1TPloJcORBmY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=Xo09hHdR; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="Xo09hHdR" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=tnOJ/uUgRcUOq64CSYWpMGrZg0+/iQZZAjhHD2YywUw=; t=1716570563; x=1717780163; b=Xo09hHdRSkKulxk/E8IwlOZg3ZFuAKNxtojIuzcCBYv39hu bW2XmmDYwaztpoidUBCPpcMavjy8adRsUS3UQG3D0JVY/bsnoQv97P7YvgB2vI4WeLy+ylHm+rbQ/ ljsqwnp665/s34i8THAeJdLFu5BVJgr6kgz2cNCz+u6U7RZSQLfAJm+4kPHLhOr8/a28hCi40hqn/ 2PDn3jjQgld94wpCu7txvpOQb4F+2G7gokQqg7ZPaQYOqGuiS5w9cuoD5nGymhQZPQhT7P/nXU5rE 6zOeQwqcXdBh9JRZDOnT1vB8/P+xG5zUCku0vfwIixnBjPm8cm7oogpe+TEIn4wQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPx-00000008Xuw-0ZOO; Fri, 24 May 2024 19:09:21 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 13/74] backports: add linux/efi.h Date: Fri, 24 May 2024 19:07:25 +0200 Message-ID: <20240524190906.f219db8b3f92.Ib2c8a1b389e6a5b212332e9cda7b0adb369738a5@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg We need efi_rt_services_supported() on older kernels now. Signed-off-by: Johannes Berg --- backport/backport-include/linux/efi.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/efi.h diff --git a/backport/backport-include/linux/efi.h b/backport/backport-include/linux/efi.h new file mode 100644 index 000000000000..c2ac9dd97947 --- /dev/null +++ b/backport/backport-include/linux/efi.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2022 Intel Corporation + */ +#ifndef __BACKPORT_LINUX_EFI_H +#define __BACKPORT_LINUX_EFI_H +#include_next + +#ifndef EFI_RT_SUPPORTED_GET_VARIABLE +#define efi_rt_services_supported(...) efi_enabled(EFI_RUNTIME_SERVICES) +#endif + +#endif /* __BACKPORT_LINUX_EFI_H */ From patchwork Fri May 24 17:07:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673360 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 5E2C212FF99 for ; Fri, 24 May 2024 17:09:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570565; cv=none; b=FGq0FFfsVnH75QiUd2Y8EaaMWaKPkXnyiU4Z9+B3NkoLs7Vi1D7Q3BzmKcg3NtCKNBPUgGJGXjIfh0HwaliD2LHCrPE/wkyqlgkh1j7yUQ/k2KALSR2Ic9g4OjCNmfmFeudOfOeiBq7oEefwoCopewPp6g4586khE018WqovMW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570565; c=relaxed/simple; bh=ehVi5JeyWJ2MfX20TowfjYIbJrnP0fqPMwG2SzpoUtg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k8V/CSs1d29cYUR+29V/9E+SginsOcjZ0INgVVAhhRl4QfWsGJqhZtMAh+I38z6l0WaSPaowNyRF0e/koBUZMJ7L2nQOliUENYMG8VMajA06Uwk359i9GfmPcl7PL31/lo1HiUyENQyPg21AfnRnAQly6zxDMFyvB6kKgXfkxGE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=xLWJlTiz; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="xLWJlTiz" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=GBlOymK+FeUdBpnMV1u4rGy98CNdgkxOk3nTIFGENOA=; t=1716570564; x=1717780164; b=xLWJlTizN+FXWJScbPXsjFZSDOczJohbS8oalu/GgpBKNlV KcbhKB9Fp6YPFHDNwi2sTyNSqfw5ZvcaiGh714dOpliJTxE7XnJjrY4ZbeH2kvQCggSWtcRY16Dkq aUkmUlBv2hT9MUUELpICSwwwzxizpeY0qG5ZWTfxtXXDC8oOgqij5j7YwOr4ezCnBLG6pX9COBaN/ wf2n9ZKBPNemtx1c3kvRMv7oZAZEE+R4yORBWeAzq8RNn2z4r9Wfp8obmdIQj8M4Pc+cWdmRo32GP e4O35Ez4lsPmUS1l1+G+/PZpCXnCpfUyExt4TDrJhlLPdEy7lfdDq3zOJFDdlGGw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPx-00000008Xuw-4BL1; Fri, 24 May 2024 19:09:22 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 14/74] backports: add eth_hw_addr_set() Date: Fri, 24 May 2024 19:07:26 +0200 Message-ID: <20240524190906.74a3fa97e08f.I04584880e09adbe7318583f88d24358005f95ccf@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/etherdevice.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 backport/backport-include/linux/etherdevice.h diff --git a/backport/backport-include/linux/etherdevice.h b/backport/backport-include/linux/etherdevice.h new file mode 100644 index 000000000000..c11b86d55801 --- /dev/null +++ b/backport/backport-include/linux/etherdevice.h @@ -0,0 +1,20 @@ +#ifndef _BACKPORT_LINUX_ETHERDEVICE_H +#define _BACKPORT_LINUX_ETHERDEVICE_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(5,15,0) +/** + * eth_hw_addr_set - Assign Ethernet address to a net_device + * @dev: pointer to net_device structure + * @addr: address to assign + * + * Assign given address to the net_device, addr_assign_type is not changed. + */ +static inline void eth_hw_addr_set(struct net_device *dev, const u8 *addr) +{ + ether_addr_copy(dev->dev_addr, addr); +} +#endif /* LINUX_VERSION_IS_LESS(5,15,0) */ + +#endif /* _BACKPORT_LINUX_ETHERDEVICE_H */ From patchwork Fri May 24 17:07:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673361 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 4D24012EBF0 for ; Fri, 24 May 2024 17:09:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570566; cv=none; b=ZwuVCTEoUJQV7wv9f9HhNTckMvehpF04oYxSG6sLyceWsfKiic+qiqmphi/vvkGiY/2ihWGL1Fs98ZFWmDcfVsf/y/G2PbZgZ3osPp9bFhW4t25A0WJyz3PYD5r/2e8n21iWM5KqJop0d/J/ifHuuAFF0/cD1A4ocRstYDr6bSc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570566; c=relaxed/simple; bh=qWgrdE8Lx75G/xLu7C4Wg+oU+VD2R4c7pfKvf2s5J8E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Vgk/yxva9FM9pqvp2HeWA7F4OBXki+UPq4X5RBh054Op9TX0RCQ/IEKBErGaECdcmFIFm0Zy1acxYFL90btxzK9LIxEmWShvUbD0HF2R6sewXd3JlbQ8OQof4Wj2uYlUcKV2JZ4FsJHHqhGvC7DSWczhtI8LzPXaG8HYlL9uVD0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=sYM6OnDO; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="sYM6OnDO" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+KDukWUqtncEdvGZUid/QfWyHruKnJzTuW7I9kZJBwo=; t=1716570565; x=1717780165; b=sYM6OnDOBSzMVwAPu9NzMySLWFy4QMkxssClY/tbIsjwWqH gzXKQlnaOYwQyvxEhfDMLNrVpMazpx/urIZr76+pnckmk18yVchtWwRqFMcrYd/rjCNHv6Bl8kq76 WAY8HuRSIyZDdL1MYd0ys/CH+z4gnqH8NURB8kCmNjXTgGMU+QI+L3V9SaqHV/TTo1cwLy2B2NBU3 sYKprwI+fUSkNQB0iWd9bKxGbZhVaUwgjEGgJJnh02nklfYJ/mT3Q6qEB3YlASBzf5KXlOVbuJH7m yPcVK1lsh3o0m8AXRgkYa8/C10OcpFsRKNlHE3EPtDNEliVVW2tPt4rorUiBI9Jg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPy-00000008Xuw-3wZc; Fri, 24 May 2024 19:09:23 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 15/74] backports: add module namespace support Date: Fri, 24 May 2024 19:07:27 +0200 Message-ID: <20240524190906.380cc851ca20.Id7fdad79d5130d44fe2e2bf5ea64ab10ec9f0022@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Add EXPORT_SYMBOL_NS_GPL() and MODULE_IMPORT_NS(), for kernels that don't yet know about it. Just do nothing about namespaces in that case, of course. Signed-off-by: Johannes Berg --- backport/backport-include/linux/export.h | 12 ++++++++++++ backport/backport-include/linux/module.h | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 backport/backport-include/linux/export.h diff --git a/backport/backport-include/linux/export.h b/backport/backport-include/linux/export.h new file mode 100644 index 000000000000..c24c9f99c78b --- /dev/null +++ b/backport/backport-include/linux/export.h @@ -0,0 +1,12 @@ +#ifndef _COMPAT_LINUX_EXPORT_H +#define _COMPAT_LINUX_EXPORT_H 1 + +#include + +#include_next + +#ifndef EXPORT_SYMBOL_NS_GPL +#define EXPORT_SYMBOL_NS_GPL(sym, ns) EXPORT_SYMBOL_GPL(sym) +#endif + +#endif /* _COMPAT_LINUX_EXPORT_H */ diff --git a/backport/backport-include/linux/module.h b/backport/backport-include/linux/module.h index efe970f174ed..b93a56d97611 100644 --- a/backport/backport-include/linux/module.h +++ b/backport/backport-include/linux/module.h @@ -67,4 +67,8 @@ extern void backport_dependency_symbol(void); __CFI_ADDRESSABLE(cleanup_module, __exitdata); #endif +#if LINUX_VERSION_IS_LESS(5,4,0) +#define MODULE_IMPORT_NS(ns) +#endif + #endif /* __BACKPORT_LINUX_MODULE_H */ From patchwork Fri May 24 17:07:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673362 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 96FB012F59D for ; Fri, 24 May 2024 17:09:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570568; cv=none; b=QINh1VbR2kAk4A7IcjHvcSsfWuCn2DddihdX2fiSFeyNpfL5YIVCpDsm+0CxkiUv2zFhqAD02/0F0uCmmM8FRf1/pNnexrKz+Ug7MYOrxemXLFClCUVylexD9KYXb1r2g9rg7euthK9uHURDccZhY/9WiORjeG/RoMR3Xw9u7xE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570568; c=relaxed/simple; bh=6Rmp78lf2Y/N7MJjADIzVtqaRj6V5ie9DRLf+8IZQbE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b9Lvh0FKqduaq0blWCej15vsOBCzpimOxE574s4uMHYvKuPTmIsNEYzJl8ng8l4KbXUaSAZYVCpEWPPFmseeosWC9stLujtsvi7q/p/hndb4VnsU8kQyeydjpbuZvBVYU4wFBT5etn8Z8V8ibtitwS00RzSCWlsqutQwl8yq5R0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=xvb095Yc; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="xvb095Yc" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=W/2Wjuf2k62l1jx2SgtLtsurmLHPfvDCPgd8JWsUHb4=; t=1716570566; x=1717780166; b=xvb095YcaZtiE4MPLqTZk6LHI1e9p6sDgHcuOe9FMniVCRe vyX7xHiI8AT2lQMHiqi5UhS5lzZo1Qd5GTazI1uMnJ1ViuCh0QVn5h/IZkjznUSwstOJF5YE2WSCV hVvU9a8dyZiuegK6juRyFlR1TU0JoHY0ZQhBQzK0h1eM13/IX8lvMaswtQZrq/gLvdhc8YyLTKsmO 4Mgy2U8PPWqOsnvK/G9wRYjrGf7giA16X6heVZxSa6WeNJm7kSLUSiFkSDHaPUODhc2yO267Gwt1E /WxzChFl/p2L3d4LFNmFeeFC8Z/j5gvLpVSIO1exKBIIqjKoxJYWZi08slWCmiGg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYPz-00000008Xuw-3p0r; Fri, 24 May 2024 19:09:24 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 16/74] backports: define __is_constexpr() for older kernels Date: Fri, 24 May 2024 19:07:28 +0200 Message-ID: <20240524190906.1835c4614254.Ib82d1b3349ab6fc55b5f17dba1ada60601dcd742@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/kernel.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 backport/backport-include/linux/kernel.h diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h new file mode 100644 index 000000000000..b59971fbc1f0 --- /dev/null +++ b/backport/backport-include/linux/kernel.h @@ -0,0 +1,17 @@ +#ifndef __BACKPORT_KERNEL_H +#define __BACKPORT_KERNEL_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(4,17,0) +/* + * This returns a constant expression while determining if an argument is + * a constant expression, most importantly without evaluating the argument. + * Glory to Martin Uecker + */ +#define __is_constexpr(x) \ + (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8))) + +#endif /* < 4.17.0 */ + +#endif /* __BACKPORT_KERNEL_H */ From patchwork Fri May 24 17:07:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673363 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 75C0E12F368 for ; Fri, 24 May 2024 17:09:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570568; cv=none; b=fYc4nMj6NbTfEOvCYcPh53psXUmLkSA05FY0ksBIEq6tHnJomqME3CiOHLKtTTr/af5HVwyNbw9lz51kNW1d75apOZTeFIpf6XNCxjp0kSB9/MEBJy1u5zGZU9tz/LkK9/hwlNaOH5E3couYl10O5jCfL8jslp9BbxfQEXgglNI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570568; c=relaxed/simple; bh=PwKz2WRzR+6df7xsHkMn9tNVoquzDadlGS3DhpIICgo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=howr3C3CWbS+x0Eru1A7M2VMaq2N1DToBrlCXxzD5EIgyaeS+4S105lluCdOWTHqntiJQX4/jGZeqEToThMRb+CDvi/3nS6r24EVsKFdlFpk7xNqDud12qZNYC2w0tGyMgB8Zi7ecqb+R6oeud7+rZ3QKu8DY3B+zoW84UQlI3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=hACBZ00Q; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="hACBZ00Q" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=kAWtnyvSyYeldFfzJvBfWo5dCk6/tDKhbbl3MK0hZy8=; t=1716570567; x=1717780167; b=hACBZ00QdVKSXTm+0eL0PTs95Z4rPENaIPX6I3268B3usG1 fgb7ByBGkTrPUeJYgwmRGzqDMrz8376ERLGM+Z80jjLuoZkaFGG/jgIeC8K+zjjj5R92mCHhobQJh nJfxAEWzMTICQSZPdqwVE/xqWo6H9oUQMMvkvGNXSZBjdmDO75RmG5HmfUmf9z1/x4qmX5BUhREzI up46Jn7PBL7wrpPhO7SIWlKGKGUvN2EIqVFo9tZEEQ0YcSKa0mYGMoaifQR6UzovrmQSenjjG5kNz eR88R5VZIcm3lJwSB7KN3oF2hBACiXJMvCc2i3DD6dKppppT9jJQYtso3HbldwYQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ1-00000008Xuw-0E58; Fri, 24 May 2024 19:09:25 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 17/74] backports: add kthread.h Date: Fri, 24 May 2024 19:07:29 +0200 Message-ID: <20240524190907.045b440b4ad2.I0c3c1ed3d75dcd800d0a4ef41943a4db10ea5df4@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg In 5.17, complete_and_exit() gets replaced by kthread_complete_and_exit(), so support that API. Signed-off-by: Johannes Berg --- backport/backport-include/linux/kthread.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/kthread.h diff --git a/backport/backport-include/linux/kthread.h b/backport/backport-include/linux/kthread.h new file mode 100644 index 000000000000..23a599e92b30 --- /dev/null +++ b/backport/backport-include/linux/kthread.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_KTHREAD_H +#define __BACKPORT_LINUX_KTHREAD_H +#include_next + +#if LINUX_VERSION_IS_LESS(5,17,0) +static inline void __noreturn +kthread_complete_and_exit(struct completion *c, long ret) +{ + complete_and_exit(c, ret); +} +#endif /* < 5.17 */ + +#endif /* __BACKPORT_LINUX_KTHREAD_H */ From patchwork Fri May 24 17:07:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673364 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 4D36D12E1EB for ; Fri, 24 May 2024 17:09:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570569; cv=none; b=R7kwtmlOktp85duMZLJg8E/DzuT5EnTGyQgp0+Pv8ixwsO5YFAZRztgXJCRkL1cY+cKq+oawZ/PU+9xhvJCOc5gqFZ+eOjd8aHpy1ek+iVEN6fgTgFgPM0wTGLtaK1wzdfjzqExb7l2t9hYwgWu6eanrk2SruFtKBap3fEgFTkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570569; c=relaxed/simple; bh=g8EwKXqncZhqMZAre5Y8nlj4ctC/jQIfuhVDKNOU0m0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dZMR2iSKIpF+UkNwFAn5TFpqCSy2avqyc4qgJkFFMlLPOxsPdGPl2TWNkdT+WIB5zJP+lVIDU1FL746Jc6bTWchXxmq+DZLajdFCIgkV+G8cVcUjhzFWLsfMTyKa/YsmDr76BRYzJnujLJddMDM+yLjS60O60TQm8zQJ/Y1yXoc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=U3G8aV8t; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="U3G8aV8t" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=e6wkcraKwBiHiT4EOjcQx5jwHnW+T1P8Kv1o76GVLaQ=; t=1716570568; x=1717780168; b=U3G8aV8tOP6oKdjKJYNNtvzcXv55TRmbu8ZsXYwwmOwgDx5 jDpNfYE/c3JDNUOVSpQ6is5Jg+JJpWSYvYdLos0wc6iRy+fffzzzCPGsHvs4PCJb3YZuV5KoiTrmT xJ1FpPrFQpxEzTPeHEcPp8JmWnLkC97rSvnNBQXB0cMVbQXwfwc4Q7f7BDjnlQLwvEkzx+QhWPe5B 29Q3hcQKec1T7qJqzQ17vnWtZw/Qh3Osapz2HvUz2aDE8KuSSEnWpsfZoAAxlg2zlSCa5Vmg9Cv9r fsoapxKnJH3OkoVqhftOAyNo3pB1MeXtQbKlV32eZs15G7UrIUPFFHb3rVbQrtMA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ2-00000008Xuw-0Lc6; Fri, 24 May 2024 19:09:26 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 18/74] backport: adjust led_trigger_blink*() to v6.5 Date: Fri, 24 May 2024 19:07:30 +0200 Message-ID: <20240524190907.4ae8dcacd09b.I0afa6437fec4e5e9a29e27bf4d88fb47ee6e8964@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman The signature of led_trigger_blink_oneshot() and led_trigger_blink() was changed in v6.5. Adjust to this change. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/leds.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 backport/backport-include/linux/leds.h diff --git a/backport/backport-include/linux/leds.h b/backport/backport-include/linux/leds.h new file mode 100644 index 000000000000..3ebae49d3c8b --- /dev/null +++ b/backport/backport-include/linux/leds.h @@ -0,0 +1,25 @@ +#ifndef __BACKPORT_LINUX_LEDS_H +#define __BACKPORT_LINUX_LEDS_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(6,5,0) +static inline void backport_led_trigger_blink_oneshot(struct led_trigger *trigger, + unsigned long delay_on, + unsigned long delay_off, + int invert) +{ + led_trigger_blink_oneshot(trigger, &delay_on, &delay_off, invert); +} +#define led_trigger_blink_oneshot LINUX_BACKPORT(led_trigger_blink_oneshot) + +static inline void backport_led_trigger_blink(struct led_trigger *trigger, + unsigned long delay_on, + unsigned long delay_off) +{ + led_trigger_blink(trigger, &delay_on, &delay_off); +} +#define led_trigger_blink LINUX_BACKPORT(led_trigger_blink) +#endif /* < 6.5 */ + +#endif /* __BACKPORT_LINUX_LEDS_H */ From patchwork Fri May 24 17:07:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673365 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 42D6112F368 for ; Fri, 24 May 2024 17:09:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570570; cv=none; b=o3OcQ6L92QQPfsNJcncTFOth0wnMTpp+uSsbkBsuLkzQtcjH0rdNOcf4Tw9mhh+RFzhYBOjhSacjNyY+WCHkQ6gmiVLhPJKGwctav0ja6O75twGC2azAoc9pb3RXgSZuO3gHDGeHewxFQc9J9TsORNBhGFsCQ+zui7ZZltSRYnA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570570; c=relaxed/simple; bh=s0+Q/sy+GBwqGGEvH3UFKQMD4tV2i/RjtKiAJVdJ8GY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GIDTcvJkS71woB06EGijxwEbMPUNDohyZjpjFme6htW5V3L61nbjjtjwNONyFInhpHUM0apxnBhDz5uYzvBZXTC6SEJhfLaG3yyOEyme1NHq+t7jGocbiKnbs5NXybfJixG59Wj0Lcbe2GfMp+1T0nSx18vwpRC+DeCTLIDT900= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=QzQuDXV8; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="QzQuDXV8" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=e7oQg2NKFSJc5TV20YTHn07QvqOw+vNgg1TtLCirW3g=; t=1716570569; x=1717780169; b=QzQuDXV8vZf7amnAPVN3HZ1GlFWusds6WKKisDOVxEMHHbN 4JfjGAVqt0CFnt2SEVzrWE1QmNtR+OfHzLmXy2fdVskY1bq9p3yVM/CFaqsnrcLR/HRZr3n+u9vzr pKo9Hyt49M3e5YZ1hkEXiZFTl/i5de5Ly7fffCY/1hwEfD0BfueXdgxlzPCxY5u58cSLVNuYjFtG/ J66t2uzKLL3BmoTOTP1RCNKe/vncxY99WEfx6fGn/+mkZY6wejlpwkEjPR9bb9/kfFrUZYfhKsSfh k4st1Q1yFC+8ZKQfQQKprxPwpMcGh/p59LVVvYAdxXGMgYQ7OWNPkMmlE+24XbOg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ2-00000008Xuw-3ozS; Fri, 24 May 2024 19:09:27 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 19/74] backports: add lockdep_is_held() when needed Date: Fri, 24 May 2024 19:07:31 +0200 Message-ID: <20240524190907.39c3936c9c58.I013e3ab4f0cfe836d7ff96ae3d68508e55987333@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg If lockdep is not enabled and lockdep_is_held() not already defined as a macro, declare it as an inline just like upstream does now. Signed-off-by: Johannes Berg --- backport/backport-include/linux/lockdep.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/lockdep.h b/backport/backport-include/linux/lockdep.h index 842e24b7ff8f..8295b0d49184 100644 --- a/backport/backport-include/linux/lockdep.h +++ b/backport/backport-include/linux/lockdep.h @@ -9,6 +9,13 @@ struct lockdep_map { }; #endif /* CONFIG_LOCKDEP */ #endif /* LINUX_VERSION_IS_LESS(4,15,0) */ +#if LINUX_VERSION_IS_LESS(5,11,0) +#if !defined(CONFIG_LOCKDEP) && !defined(lockdep_is_held) +/* upstream since 5.11 in this exact same way - calls compile away */ +int lockdep_is_held(const void *); +#endif +#endif + #ifndef lockdep_assert_not_held #ifdef CONFIG_LOCKDEP #ifndef LOCK_STATE_HELD From patchwork Fri May 24 17:07:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673366 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 307FE12E1EB for ; Fri, 24 May 2024 17:09:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570571; cv=none; b=txiOKtQ3sauNEiOeyifyl+aZbu+5ji0uanZdRjwTJqvjYFToEIgOrTcaOFU4SEsswvik27FCt8dp+h1YnZe3H9NfwXCBvgDOU04O7S2dLPDfp9/PgS433BxGcIP4sWmzC1HEKCSX5EY0LR7PVJue+9P+Y9fVfzlneRDg5Gb4dFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570571; c=relaxed/simple; bh=SAj6BGk58VP2OqfKO23fgUTYxxT6tuMCSSe+JLl6tLA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Qh7Hw9HRzccPj7a0qZGZTPSo7+XqUnlTPt/8NUPBTNYNKTU5lJgot/KR1o4fPWlvQRs7L2j/6OPIu2Cx1eVJ5aqOQGIpEArofjL3H5dLQcpmEOUcv/cV+rKbX26LrR2wSv/J6b+AhxCzcSL7oC90L8jZL4FVGqkeunCOY0Jd02U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=hIwLm/Ii; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="hIwLm/Ii" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=hwhd8LXdiSNUR1McV6+ah6/r078QPgxSA9uxL3B91OA=; t=1716570570; x=1717780170; b=hIwLm/IiPie37ovfjdaqlJoeDI7RwErQewQ66/Hu+sJS+6t KUgGeJrszmi21TLYbj+K7S/Kaw5Fxso697Ebs+k2HZR5nhA0XgNhPA7N3uG3VV4bhPZlD7VGS6F9y gIZtvr2bBqvuEe0csTwaUtybLHX8vjc4BLcImrPXnYmJ6knO3ChIOprGV8NZU7suY7iPA28GgkW5Z rCjQPN5I+ovdDxhh+AXiGW/GRo+ltXvJ4tCxXEpHd3K72C3D01c7gvMbwWO/U+zJXfJWtR6NxMUZ3 cvQCS+Y4JrjfugkQ4YwHMA2o8ZwZjjj4abd68AI0jv/VeaEwk3Ig/z0740xWClkA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ3-00000008Xuw-3avd; Fri, 24 May 2024 19:09:28 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 20/74] backports: add mul_u64_u64_div_u64() Date: Fri, 24 May 2024 19:07:32 +0200 Message-ID: <20240524190907.fcf4bcdc51ee.Ia106b487910574e59b56065f04f9448655011b0a@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/math64.h | 11 ++++++ backport/compat/Makefile | 1 + backport/compat/backport-5.9.c | 45 ++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 backport/backport-include/linux/math64.h create mode 100644 backport/compat/backport-5.9.c diff --git a/backport/backport-include/linux/math64.h b/backport/backport-include/linux/math64.h new file mode 100644 index 000000000000..6aea9c9eec77 --- /dev/null +++ b/backport/backport-include/linux/math64.h @@ -0,0 +1,11 @@ +#ifndef __BACKPORT_LINUX_MATH64_H +#define __BACKPORT_LINUX_MATH64_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(5,9,0) +#define mul_u64_u64_div_u64 LINUX_BACKPORT(mul_u64_u64_div_u64) +extern u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c); +#endif /* < 5.9 */ + +#endif /* __BACKPORT_LINUX_MATH64_H */ diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 1d47bd59fe90..3c8430bc4958 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -11,6 +11,7 @@ compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o compat-$(CPTCFG_KERNEL_5_3) += backport-5.3.o compat-$(CPTCFG_KERNEL_5_5) += backport-5.5.o +compat-$(CPTCFG_KERNEL_5_9) += backport-5.9.o compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o diff --git a/backport/compat/backport-5.9.c b/backport/compat/backport-5.9.c new file mode 100644 index 000000000000..54d1802efd31 --- /dev/null +++ b/backport/compat/backport-5.9.c @@ -0,0 +1,45 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include +#include + +u64 mul_u64_u64_div_u64(u64 a, u64 b, u64 c) +{ + u64 res = 0, div, rem; + int shift; + + /* can a * b overflow ? */ + if (ilog2(a) + ilog2(b) > 62) { + /* + * (b * a) / c is equal to + * + * (b / c) * a + + * (b % c) * a / c + * + * if nothing overflows. Can the 1st multiplication + * overflow? Yes, but we do not care: this can only + * happen if the end result can't fit in u64 anyway. + * + * So the code below does + * + * res = (b / c) * a; + * b = b % c; + */ + div = div64_u64_rem(b, c, &rem); + res = div * a; + b = rem; + + shift = ilog2(a) + ilog2(b) - 62; + if (shift > 0) { + /* drop precision */ + b >>= shift; + c >>= shift; + if (!c) + return res; + } + } + + return res + div64_u64(a * b, c); +} +EXPORT_SYMBOL_GPL(mul_u64_u64_div_u64); From patchwork Fri May 24 17:07:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673367 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 184B812F368 for ; Fri, 24 May 2024 17:09:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570572; cv=none; b=PNnMZ3/EaaXonw1bZzlRccoBM2GbaRkHzefHTEAt72TVKf4/geFgjYoghTAL22GeMhVUhjs6zbosZvVrU+L/e6OT9vnyGG+lmuvavpsX4KzRKKOVVIDCwOqrGWskpCiXVP05/YCdIX42zZv5sAQmEZYUnCGNdda4dvvt1ZuAvzo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570572; c=relaxed/simple; bh=vQZD2Fsd7Hijy+zm/ifZ6emQeSpEi5NzWIl+MDVMMf8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ozHjuNU6pSU9g4VibPOzDDItR0CKe76IWNVzvgHXgKXKNjRHKPk5/KZkqIk5Zrn69atOinNb3bqAq6nNanB/k+o4WENe9QbCY9d4yZYKOCV4duRCYAezYnhSvxeljyNrQ6a6CkD/yTsvTELFq3Q1rxVWyfcIAMzvv7wLofor37U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=JIM2zYf+; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="JIM2zYf+" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+O2DA3tQNMKX3Q3XGakLYKrh3dMC+0MKbN6TxQHgdRU=; t=1716570571; x=1717780171; b=JIM2zYf+CpqyXwyyalmVx91ddhpDkvkV0ImftfBwsdr13vb RMN6XM536i9f/E5DaM+l2aT5u3M8D05bbSa8mFBNDT3I2qQVdUhXgdcPPHefYN1Bzb4VXEOT0Tbme PNR3xuIqYKlltW19eF80aRd4EsKxUrw0YHOGuE1ny0dmUQsHwgoM1YU3bgeMbTdB5g+mn5q+I17IY Ik+JAaCBm1mkkVkl7y8rIh0S+o1fCePui+JL42ZIp3WS1SPTJ34kXzTUMeAuM5OwMPJNNL9tbedBW pkvo8ZLlJOqWAkO77TfaRkb1/g9G6RUaj6TJgW5uByjFcvhCVgd2pPLaRdCcEIVw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ4-00000008Xuw-38Ra; Fri, 24 May 2024 19:09:28 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 21/74] backports: add minmax.h Date: Fri, 24 May 2024 19:07:33 +0200 Message-ID: <20240524190907.a03ccc68063b.Ieb3178a725c066c7153ba92596b1bb42f4162a38@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This is needed for kernels <5.10. Signed-off-by: Johannes Berg --- backport/backport-include/linux/minmax.h | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 backport/backport-include/linux/minmax.h diff --git a/backport/backport-include/linux/minmax.h b/backport/backport-include/linux/minmax.h new file mode 100644 index 000000000000..032bf3dfbbcc --- /dev/null +++ b/backport/backport-include/linux/minmax.h @@ -0,0 +1,8 @@ +#ifndef __BACKPORT_MINMAX_H +#define __BACKPORT_MINMAX_H +#if LINUX_VERSION_IS_LESS(5,10,0) +#include +#else +#include_next +#endif +#endif /* __BACKPORT_MINMAX_H */ From patchwork Fri May 24 17:07:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673368 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 D86C512FB29 for ; Fri, 24 May 2024 17:09:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570573; cv=none; b=Ow4SN0RnQb+/4oNxQ0sgh51HMqBbW0qdWtEorj0/MhxhLJd+txLJ5pUkgHi0sNaX7nLJOT4+bnQYN+gA5ftYWeZ81DNfSL+qMRj1S5tKW5kJgSJLGOjsyAX4uGBJ3RIVY5GnLaLJaF9MG1Y/PgDlD9Oy5s5R97UOiw1wYd2bCL0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570573; c=relaxed/simple; bh=oMiW8Uu5/Ay4bTFWq/lAthy9GnMs97gBwgvKJGEF1I4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eNACbxf/JwEz719Q9pelKCJEElyhfwgc6vlXaJa/G4yexhOan0De4AEwToDwokHiKxmnVlJe7618awID9TzQc1PVSuogDdjqSXB1bB7WkR1xfCsatpdFI8Tlh3HhlbWlZrSaS+m5EOAzMZ2YXNzW1xHiu+P1RUpRhOtRbbkCqEM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=VTmy102A; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="VTmy102A" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=d2OB7FFADNjvHBzZLV6uVgELoi9+JgRm6q38Pbag5Ng=; t=1716570571; x=1717780171; b=VTmy102AsCUOqpDff/U0NXxu1rEBVCsbyXyme8r9ltZwj2F lR3vfEaAP6qXRYTS9vM8qUJP9L/+XsVEH11P5B+4qAyH5D5E9YpizgqV7VVyRK/ApOzX4WW5OV7CO Qole1bPh7DK/63iZ6GRKop9zHG3wTaDpIrOTC5u252tROg1bkvtJKRY3gTWJwdyTmg85SVIEuZ+h3 mTYXgQAJA8Q32KNkaK8z6xW6CAA+mCVZhsc0vadHyHiqfL75ZqSDbenjrpwWRaoHKUsJc4JgOFZvh VR4fuhnwCEp/LrYolRMvOrw6Tm/3mzh+oZ9bQVy/RKL9sQvGGy/6Hqi/5I2ld/hg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ5-00000008Xuw-2xJ7; Fri, 24 May 2024 19:09:30 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 22/74] backports: add support for kvmemdup Date: Fri, 24 May 2024 19:07:34 +0200 Message-ID: <20240524190907.896ca9334310.I1558b8083444d6bb053501b489091ab1ac077ae3@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit This was added in 6.3. Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- backport/backport-include/linux/mm.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h index 46c7ecafce76..83b495a1bd02 100644 --- a/backport/backport-include/linux/mm.h +++ b/backport/backport-include/linux/mm.h @@ -10,5 +10,18 @@ static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) return kvmalloc_array(n, size, flags | __GFP_ZERO); } #endif /* < 4.18 */ +#if LINUX_VERSION_IS_LESS(6,3,0) + +#define kvmemdup LINUX_BACKPORT(kvmemdup) +static inline void *kvmemdup(const void *src, size_t len, gfp_t gfp) +{ + void *p; + + p = kvmalloc(len, gfp); + if (p) + memcpy(p, src, len); + return p; +} +#endif #endif /* __BACKPORT_MM_H */ From patchwork Fri May 24 17:07:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673369 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 193F712F368 for ; Fri, 24 May 2024 17:09:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570574; cv=none; b=pIyEUpiIpNBrCRjcOXFx9atu3ojQ22VB0xH5D4x+4L8nZIlVSdk7Mq6JNInUKq/VN41SFMwNwiKNRoEjEj2KZYbN1BHlQnQmb3gNTXUEpOiekaxgMztOpo1LW258x38fRRg8tPctw0KzyHvzb9NYEi0P+e2zwHHsdCgti173aYY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570574; c=relaxed/simple; bh=rNWpoa5Q5ViEs5Tdz21NnFKyUxp59gwmvE0HxjicurI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JGr0cTXqXAIsk9y2BMTf/8kvgMeC/rucN0bxOMwE8bIr5+jN6iw2JN2PXicKg7shFoqhhk0i4VpLBf9T1MSBzqEizPthzNpqRsB/t0LsMmwif6F78nyQjpCswbcjGY4MYplocTyLcW+dTHCWuGwXxOGJw0OYZOuYJ9y2eYAD9T8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=HaJP6RoW; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="HaJP6RoW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=6FzVekPIgKbvdGCYmzeGOKMEDjXdX5X9uweJ49eaSLI=; t=1716570573; x=1717780173; b=HaJP6RoW+SLA04JrEE7tthzHMuOEqY8FKvrHRSs8Gm2fp57 W9OI/Y3P2N911BhzxnND8hiJ+vR0Weu7HFw6D+R6HJaeaxK9G5UQcsqJGUS/2t4n3RbeGdubnOpbM nXWJuGGz8XWZ1nekFXwegUqNek2H+Luzx7q/+TFO3MVwgwODvAVlcHGh+H46OQ/AMS/vb0Tz8Vkbd nB3XkQDXb7GfCvyaqiHnQRwuiYMeZ5JEEe1GZwTCn4wNJBJIod0/iE0CGYGynHb1xROT8HC4Ns9Wl K+r89EhN68Aq7JccQPbsO8EpjH2ms4TOExtCCNZ67RMtIU9vSJGaochIWgAPOpng==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ6-00000008Xuw-2ByA; Fri, 24 May 2024 19:09:31 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 23/74] backports: add DMI_OEM_STRING for older kernels Date: Fri, 24 May 2024 19:07:35 +0200 Message-ID: <20240524190907.e82b195cfd2f.I56742f3d6a096fd6c246fdf341af68b0962bdb90@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/mod_devicetable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backport/backport-include/linux/mod_devicetable.h b/backport/backport-include/linux/mod_devicetable.h index fc9beedb2d8d..07d66a6ba6ae 100644 --- a/backport/backport-include/linux/mod_devicetable.h +++ b/backport/backport-include/linux/mod_devicetable.h @@ -29,4 +29,8 @@ struct mhi_device_id { }; #endif +#if LINUX_VERSION_IS_LESS(4,17,0) +#define DMI_OEM_STRING (DMI_STRING_MAX + 1) +#endif /* < 4.17.0 */ + #endif /* __BACKPORT_MOD_DEVICETABLE_H */ From patchwork Fri May 24 17:07:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673370 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 1BD4212F59A for ; Fri, 24 May 2024 17:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570575; cv=none; b=HsIzMTRGw1g+bSM0gY/oxE9bAvd7+zpseZGiZANgOY78K/3BoyVmzXoB6on7vOBUE66dIeS+Pc/DCa+siQoi7cg0ot1rmJguR7qq/UivWU231L4xP1BXtqxk6Qy3kEY9yrZLK4+6tsUQJIVLhX8TnAm6UoIRaR989xtKb7ubvcc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570575; c=relaxed/simple; bh=xHiCtdAO5C4z0MWaqyug9DiafFLPrhu9RMeE/Pwd9bI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SJ47FoNyHNL4P4OnB1hvdlYdXoh/mN1aCf1PmkpSxd69wqf0Fj/0XPEnS1pP1i4w33eF0dq9qklbAttJKKSuJrr9v1mY/8Qf8N0v4DTg1gc7pSZonGt+bW4iUpd4YuicDRg5wJUB0LSjfTaIO8QcltQY1J/EZVyGJhI/9Sj4b18= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=VBBx+Mlo; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="VBBx+Mlo" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=OHpuku/uG6fOiqGEzCbUT9BD3JIkFlwoE0UUa3ZFlqk=; t=1716570574; x=1717780174; b=VBBx+Mloob+bOLEQgUXxb+xPTszoFsYuegbmYUGQZCViMFP zULRRy1T6qqicnaQ7Nx5G1dypZl2BgGcz6sEYKKdhg5vWDsp6kwssT3VV4J7lWgm4X7nZdYQEVnmP PJm7IgSJO7m6va8468OEmmjYTC+HQL5u9YS6eCkTms4DdDoa9AQGJpC9iJrOd7LOmO7iUpcU5CBdy zXzae13dmI3bLpP8RJ8HwZC0uBoSNL3okC3sdx7TqnIO5K8IHC9BSx0U5yPgRCqeHKMpT3J6ctq44 KqrsixpWjPwXc8ncDXF39FTP6aK51DRGJ6BRml2+QxcUXPKiM6N01pxJCeXbOioA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ7-00000008Xuw-2YL0; Fri, 24 May 2024 19:09:31 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 24/74] backport: fix __CFI_ADDRESSABLE use Date: Fri, 24 May 2024 19:07:36 +0200 Message-ID: <20240524190907.c464b76f129d.I69530605b67444170edc2f42589f31b8fb89b3f0@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman In later kernels, __CFI_ADDRESSABLE became just ___ADDRESSABLE, but we still use __CFI_ADDRESSABLE. Since it's easier this way, keep using __CFI_ADDRESSABLE but make it ___ADDRESSABLE if that exists. This fixes the issue that we get warnings about missing endbr: traps: Missing ENDBR: __exit_compat+0x0/0x20 [module name] Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/module.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/module.h b/backport/backport-include/linux/module.h index b93a56d97611..8269238c2cd4 100644 --- a/backport/backport-include/linux/module.h +++ b/backport/backport-include/linux/module.h @@ -3,8 +3,11 @@ #include_next #include +#ifndef ___ADDRESSABLE +#define ___ADDRESSABLE(fn, __attr) +#endif #ifndef __CFI_ADDRESSABLE -#define __CFI_ADDRESSABLE(fn, __attr) +#define __CFI_ADDRESSABLE(fn, __attr) ___ADDRESSABLE(fn, __attr) #endif /* From patchwork Fri May 24 17:07:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673371 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 B83E912F368 for ; Fri, 24 May 2024 17:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570576; cv=none; b=E+7PxTwL6q6/AgHPRdoTNmEIjwmd4burEfyOitepkaSE3G+ry+0CevI8Fnrrtq96CMJDIoSQaCipgpCG3+5fsxL6a9n1PLCsVe3GNvY6CMjW9xZN9WpEI/D1OD7Gcvkacf8kca94rWzK6wtYaWyHHGZNPwM1wcii73eq3C1aWck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570576; c=relaxed/simple; bh=qj+Bcd3qbYorZbxkdHjxaRJKpvWZ8LobtGOxeYGk9HU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dIWJM05uqSRJLdJ6Y+Vm7mtaerhIcovJgQdV+YZ+22KO1hfJMoVc9UvRv+KL1uoHw/BYx+aDKfGBvpzeurbHkR7Hgbo6S0Q0mrQU/yyl8iyv7PMHpY22R5Tb1D5pcmjbSuzY3xgzPPg+uecHiC0+590pKn7VDSAcEJjHRmHHFSw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=hF1WiRo5; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="hF1WiRo5" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Y4qYnzn88ihs60EAAiaPdXwSrsGGe7UUxhErbn/GWxo=; t=1716570574; x=1717780174; b=hF1WiRo5ZqGoirH8oG/dMtmHqF7wLiuZKBJyON8CxP9+X8/ J9yDPYxTVM3KocjKhV/GFxYGePuHGtNhdaMgYLxAhYRMpWh2sw3db3Wy0a22rXABUc5OnFM2iaokK 0eFRyJH4ZrbEpjuNHg61YasT1gH+RY2FAQB9e83kYTKuZ2wNPN5m4WQCuE75Ruyn/wx6Pj3cuIVO6 X61s3BHc2l4ClF3ArUp9zdlRJU5exZcXEsMn0dmcBhb/0oPgVvblIzfs6r/D5f1K1glNrtT3z/F7a 0adS8zTom413TO7AMFNpQJbpoOWXdpmjT7juowq8M5ngz4duaK71BRRdMlbr5Pyw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ8-00000008Xuw-2R7s; Fri, 24 May 2024 19:09:32 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 25/74] backports: stub structs but remove ndo_fill_forward_path Date: Fri, 24 May 2024 19:07:37 +0200 Message-ID: <20240524190907.6994a5b9ef0d.I59271805ee60501a03c50f5ec05240393f1fb4be@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 55 +++++++++++++++++++++ patches/0107-net-forward-path.cocci | 19 +++++++ 2 files changed, 74 insertions(+) create mode 100644 patches/0107-net-forward-path.cocci diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 354b399b1ade..ebc137a3bf2f 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -103,4 +103,59 @@ static inline void backport_dev_hold(struct net_device *dev) #define dev_hold LINUX_BACKPORT(dev_hold) #endif /* < 5.15 */ +#ifndef NET_DEVICE_PATH_STACK_MAX +enum net_device_path_type { + DEV_PATH_ETHERNET = 0, + DEV_PATH_VLAN, + DEV_PATH_BRIDGE, + DEV_PATH_PPPOE, + DEV_PATH_DSA, +}; + +struct net_device_path { + enum net_device_path_type type; + const struct net_device *dev; + union { + struct { + u16 id; + __be16 proto; + u8 h_dest[ETH_ALEN]; + } encap; + struct { + enum { + DEV_PATH_BR_VLAN_KEEP, + DEV_PATH_BR_VLAN_TAG, + DEV_PATH_BR_VLAN_UNTAG, + DEV_PATH_BR_VLAN_UNTAG_HW, + } vlan_mode; + u16 vlan_id; + __be16 vlan_proto; + } bridge; + struct { + int port; + u16 proto; + } dsa; + }; +}; + +#define NET_DEVICE_PATH_STACK_MAX 5 +#define NET_DEVICE_PATH_VLAN_MAX 2 + +struct net_device_path_stack { + int num_paths; + struct net_device_path path[NET_DEVICE_PATH_STACK_MAX]; +}; + +struct net_device_path_ctx { + const struct net_device *dev; + const u8 *daddr; + + int num_vlans; + struct { + u16 id; + __be16 proto; + } vlan[NET_DEVICE_PATH_VLAN_MAX]; +}; +#endif /* NET_DEVICE_PATH_STACK_MAX */ + #endif /* __BACKPORT_NETDEVICE_H */ diff --git a/patches/0107-net-forward-path.cocci b/patches/0107-net-forward-path.cocci new file mode 100644 index 000000000000..f612239404a6 --- /dev/null +++ b/patches/0107-net-forward-path.cocci @@ -0,0 +1,19 @@ +@ops@ +identifier ops, fn; +@@ +const struct net_device_ops ops = { ++#if LINUX_VERSION_IS_GEQ(5,13,0) + .ndo_fill_forward_path = fn, ++#endif + ... +}; + +@@ +identifier ops.fn; +@@ ++#if LINUX_VERSION_IS_GEQ(5,13,0) +int fn(...) +{ +... +} ++#endif /* LINUX_VERSION_IS_GEQ(5,13,0) */ From patchwork Fri May 24 17:07:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673372 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 11A7412EBFC for ; Fri, 24 May 2024 17:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570577; cv=none; b=WjAHNsekTDJbTp88eWXF16smKQNWIm9Bzv3GuTjwBnz6q6EEg0zaz64n9M/gKLtAQigVJzMEsfq9UNq3O2CH8M0d7yAFrtYM8jS0TpQrRXLHPkzsVNSncyRyUxT6NU1AmkuOgve4QDGC1zLcgaqGn5oJQDlAfRhoNbqyJh1l0FY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570577; c=relaxed/simple; bh=2mpEvFOlKhYGMdexMDe5NNthZ4Z3RWRAQgCdSfymWWM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MpqJ2jndBqo+Ry+O72xb++f2dHwOnhiv/nbNwGhimivK1NHA0o8ZrGSZF6M63JahVEba6UtbAda6ZRQNEEjgbFFBNJvoRsTKEyCBb0FuzgKXncbiw4Qf9qlPLSgxbHYNo6+Mkk8w0/qz+QYw02FprLrp+1fnMaQpKLtA8W6usBY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=TMIHR6yv; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="TMIHR6yv" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=8Jn1VttkLBPnNhO1G/2xxqR9r+1V/r73MX7IoaxUxuw=; t=1716570576; x=1717780176; b=TMIHR6yvsImkTgh/Bn8M4xrHhPSWGBmyJv/v1+9oRXE+g5q ABa3K1QY60q5DdkBysP+yQHSzp2GJiEg3lc0V8eBdB5zu3DHoik1GYUFKW7jKg3ntJ8yPqiG0KJ31 0NdLQM6WKQ0fgABSKy7JMltqny3wdE/YA+kGWoU0LLf+8cZ6s85cmd7jt6XoAxn7OcrdozvK85Uxo g5xAQGZo7uItPm62EtBzKxoTxSruV4wiOV35ztnzF5FkQF1N4cijkVpw2wkfdbOev41mjMFCb4kLY CCTjTiOu5vWwM8xw8cjZgdOt6fy1WFCE+JMXS0OPF2KvUZP5f2d0NVDYkDgTALvA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQ9-00000008Xuw-1nFU; Fri, 24 May 2024 19:09:33 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Felix Fietkau Subject: [PATCH 26/74] headers: add DEFINE_SIMPLE_DEV_PM_OPS Date: Fri, 24 May 2024 19:07:38 +0200 Message-ID: <20240524190907.aa2f57d0feb3.I26bf7a2fd34b6c2fc26bf2163f219e0f71aa77c9@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Felix Fietkau Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg --- backport/backport-include/linux/pm.h | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/backport/backport-include/linux/pm.h b/backport/backport-include/linux/pm.h index 926b0bf15c8e..24d760fab33c 100644 --- a/backport/backport-include/linux/pm.h +++ b/backport/backport-include/linux/pm.h @@ -14,4 +14,34 @@ #define PMSG_IS_AUTO(msg) (((msg).event & PM_EVENT_AUTO) != 0) #endif +#ifndef DEFINE_SIMPLE_DEV_PM_OPS + +#define pm_sleep_ptr(_ptr) (IS_ENABLED(CONFIG_PM_SLEEP) ? (_ptr) : NULL) + +#define SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ + .suspend = pm_sleep_ptr(suspend_fn), \ + .resume = pm_sleep_ptr(resume_fn), \ + .freeze = pm_sleep_ptr(suspend_fn), \ + .thaw = pm_sleep_ptr(resume_fn), \ + .poweroff = pm_sleep_ptr(suspend_fn), \ + .restore = pm_sleep_ptr(resume_fn), + +#define RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ + .runtime_suspend = suspend_fn, \ + .runtime_resume = resume_fn, \ + .runtime_idle = idle_fn, + +#define _DEFINE_DEV_PM_OPS(name, \ + suspend_fn, resume_fn, \ + runtime_suspend_fn, runtime_resume_fn, idle_fn) \ +const struct dev_pm_ops name = { \ + SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ + RUNTIME_PM_OPS(runtime_suspend_fn, runtime_resume_fn, idle_fn) \ +} + +#define DEFINE_SIMPLE_DEV_PM_OPS(name, suspend_fn, resume_fn) \ + _DEFINE_DEV_PM_OPS(name, suspend_fn, resume_fn, NULL, NULL, NULL) + +#endif + #endif /* __BACKPORT_PM_H */ From patchwork Fri May 24 17:07:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673373 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 8B77612EBD4 for ; Fri, 24 May 2024 17:09:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570577; cv=none; b=h3w/SuYnSERQJcg5a66l3lCHiWtyyhoqRFsV8i9DJT7Dv3vA6JJlxU+SG9Y1zsbwL/WFzacbVwhAa+h9dcz56Tu2AUFgGqispSDLTvKcs7dFlnd4uNjePW5ZKPPeyLnSTKqpaOhc6B/O7d0rXm744UO3cxsMKUoF/PysfI5py0s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570577; c=relaxed/simple; bh=qPk+41qETnIeg+w5Mq+sxv5OdNH6DTlPYAl/XRzTL4w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ladMXSduvXc2cmxCXcvh1QrTK+xCKDi/eBtWsSgomPV5kas3FbwNyl8yW7ZIJqUNCzVwNu+Dmgo8Nre06GjRCFqO8gFaRCQVMwjfUIAdKzOkNYu1l/SuN3FNIU5Fv0PkRApXIYC1mLu2SAM/uz3fEiRyT1dTRPjhetaKUp+cWMc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=eKEkKMA6; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="eKEkKMA6" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=NkrGxR4RNTYscWg8VbXL2HnuFhqWmSgHviSMJNlk6V0=; t=1716570576; x=1717780176; b=eKEkKMA6xHv6eyUWTtcPu/MFZoo/v14BWuPqD8AY6zOEev7 /VTqjNTnKpVIwt6lJugs+UwYjV9AGYDrKLxtp6MMmTQ1pXoTDNiHlPsKuPTTMAjsAUQgPlTQyCRhZ 7l95X6hLii5aG8+Ea0/IT4ZchqBIsHaBFoU0X5Qkpiz93D5AAkCR0zCQPGIGw1Vzwb4yK8rClp09z z9b/VjvwFVrW6XF6aa8llx5oyLDY9q/3kWT2E75+JRYTDtLCBMRTQO4CiRtP1UcKbaEYyDCHqtZvB 92p+TEt0z3lT6NXv+9qtrs9amugvfuZtJkW4Rso9ICcS0l1hXHf4gZ9ztGLy6vzw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQA-00000008Xuw-1UA3; Fri, 24 May 2024 19:09:34 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg , Gregory Greenman Subject: [PATCH 27/74] backport: add get_random_u32_inclusive() Date: Fri, 24 May 2024 19:07:39 +0200 Message-ID: <20240524190907.9b29c2303625.I3466484d655a8d5dbf9208a3f64ea5a926dd844e@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg For get_random_u32_inclusive() we need get_random_u32_below(), implement it with prandom_u32_max() as it used to be in iwlwifi. Reviewed-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/random.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 backport/backport-include/linux/random.h diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h new file mode 100644 index 000000000000..0a247321785a --- /dev/null +++ b/backport/backport-include/linux/random.h @@ -0,0 +1,21 @@ +#ifndef __BACKPORT_RANDOM_H +#define __BACKPORT_RANDOM_H +#include_next +#include + +#if LINUX_VERSION_IS_LESS(6,2,0) +static inline u32 get_random_u32_below(u32 ceil) +{ + return prandom_u32_max(ceil); +} + +static inline u32 get_random_u32_inclusive(u32 floor, u32 ceil) +{ + BUILD_BUG_ON_MSG(__builtin_constant_p(floor) && __builtin_constant_p(ceil) && + (floor > ceil || ceil - floor == U32_MAX), + "get_random_u32_inclusive() must take floor <= ceil"); + return floor + get_random_u32_below(ceil - floor + 1); +} +#endif + +#endif /* __BACKPORT_RANDOM_H */ From patchwork Fri May 24 17:07:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673374 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 AD8B2376EB for ; Fri, 24 May 2024 17:09:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570579; cv=none; b=B/heApZSrjR4vKa8qpHSgqdFb6ulPnEmQS2xpKEQXNc8WMQG5l9efs1x/h9hsi693etBccYeOPAPYFbMJ+ijYUXKXpkbX4DQEc0SRHlv5O4WMo+bqtp8UhiLl3Jmqt/9LUFhFkLKfbuzxiKnUphn/moqMNseHTXBg2amqRs3Lwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570579; c=relaxed/simple; bh=h09jWKcVN3dWbABQhSbfl7xb2B0G9Yb0YhmKaBCW0hM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O53ZoHT2dvR7G109XMMjG/kumFris287X0HM1jBqeXKJohl+ZfKiSLDnLoE77ZuXe80I3U+mX6qwo2FBH2RrfyHKTz5ZSEurxjcNivQQO8PsAEBFe3a1bBFus0jsKYXrNnxa2+hqyudjX9w3giiiax3K49Z3vSs0wWGG5NDms/4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=p6ZGfmxS; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="p6ZGfmxS" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=yWh15hV6/j2NYpUJnMMJ5USIDwOMLCnXUP1C08io57U=; t=1716570577; x=1717780177; b=p6ZGfmxSbXk/cxY6laHE+ZVab9TGde1QVrfGgsYympNceOh 4zbYUuTarANrStORAJmdwyMmk98ifsmgvb+5t65kzVKjlwspXRjk0+1DTAADPBrX7/XoAI1OpuxH0 J4xWMLKwbZ1hsKApoJVvi1pfhFn2SuQOlwpClzuswEQsMDC1r4g88Gdcz9hrCkrTWKImzr4/okgGZ 6+nD2OUlIGS9C8HbAK/7oMJfwyqth0plMbO0Ms3j6MWi/kd4kDXCXBgY74UNcsHu2S2Mk4xFQFJdw Yi5FKoyCxAkpPPEjYOXSl3nc22T6S9ZFGn59VfTS8jI4I6dMRb4S1xlX2rjjj0Kw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQB-00000008Xuw-0sJZ; Fri, 24 May 2024 19:09:35 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 28/74] backports: add get_random_u16() Date: Fri, 24 May 2024 19:07:40 +0200 Message-ID: <20240524190907.0ee01bdbffe9.Iac1c83457034d19878457df15d9f93a8c4781308@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/random.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h index 0a247321785a..89e9ce022505 100644 --- a/backport/backport-include/linux/random.h +++ b/backport/backport-include/linux/random.h @@ -3,6 +3,13 @@ #include_next #include +#if LINUX_VERSION_IS_LESS(6,1,0) +static inline u16 get_random_u16(void) +{ + return get_random_int() & 0xffff; +} +#endif + #if LINUX_VERSION_IS_LESS(6,2,0) static inline u32 get_random_u32_below(u32 ceil) { From patchwork Fri May 24 17:07:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673375 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 9607312EBD4 for ; Fri, 24 May 2024 17:09:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570579; cv=none; b=YGKVdNtkYSEw0lfpEOz2ABnkiihPbKOgJKUJEvijITp7gZ1yoS8boFitaw5oNCowgn8nwZHeU7Tv+91W+L4sG7bqKei7vzsDLtH96DIAJplDL6clutcIfs5iMiXF/i8x9FKyj1MVsFC7Z2EHcR43mMmkpiCLyqo272rIimYcKJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570579; c=relaxed/simple; bh=SSOH+jt5NvGJE6YxGC9QsW7pSGTxCnAxuBdevbMq/nI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WjXiLsvKoykilrpcqhDsElmPa5EKJ8bvGltrKJzNw7j28FPs2KjwEZJ1fSh3tyFrL7IkZbYOKv6zBXColL/yw2sXnQv+cVu3KjpkTTgrnikqd/vusd9uAa/8SLYA5Jnk7tgIkTrA3OG49VX3E3Lde1T0m8BPbHIHfYZddqrZbt4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=k966ea7x; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="k966ea7x" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=cNPQapZ7VKW+2zCCMWZiuFz5ZhfeIQlm4ffUWuvq8jw=; t=1716570578; x=1717780178; b=k966ea7x/y0ahL8poiiFe2bRnWpTorPzGokrQ8i/OAYbZG9 A9pgiFGbrDda1DWech0C7tbEckrR1hKOKuYSOYxq2WzlVotS0bikekbFGMlUWuVJOvuEtgekjWOs9 DCXAXh7TAG+NjAGKvR2iufFFudkcGFt6BgBv4WnTiJTsxVmRsh4S6R4/IeQKNnikif0tHXKf4Nlll 3aYq4kzDWYrpwRZfIjZbwzYPdLnCefXfEbw/7qHgiBd7pVA76InIm2mhTNAkIPQMf8Zpjcy03oj8k hTyKBbC3phMb8bLxiiPlOL0tpq/Nm2snTvK/bdkmz9z4z+GfHpNGELfM4Qe/a8tQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQC-00000008Xuw-1Gpz; Fri, 24 May 2024 19:09:36 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 29/74] backports: add rfkill_soft_blocked() Date: Fri, 24 May 2024 19:07:41 +0200 Message-ID: <20240524190907.8c3b5222cab8.Icd550ec514b6d1c90cb113b564c3897aab987d00@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/rfkill.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backport/backport-include/linux/rfkill.h b/backport/backport-include/linux/rfkill.h index c0b99d58f9c0..d130c9b70c47 100644 --- a/backport/backport-include/linux/rfkill.h +++ b/backport/backport-include/linux/rfkill.h @@ -21,4 +21,13 @@ static inline bool rfkill_set_hw_state_reason(struct rfkill *rfkill, #endif /* 5.11 */ +#if LINUX_VERSION_IS_LESS(5,17,0) && !defined(CONFIG_WLAN_VENDOR_INTEL_MEI) + +static inline bool rfkill_soft_blocked(struct rfkill *rfkill) +{ + return rfkill_blocked(rfkill); +} + +#endif /* 5.17 */ + #endif /* __BACKPORT_UAPI__RFKILL_H */ From patchwork Fri May 24 17:07:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673376 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 C333E376EB for ; Fri, 24 May 2024 17:09:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570581; cv=none; b=baY5xuank3yDUeaQT9hexrYrbZ4ngFRY163YX9IrAQJrF8IBmiDz0R9h2YpxScoHJwO+GjXcThic7CXxXNi2W1jdUN5Cq9GHenqj2zLh6h5VPG+x0yBQVX/l9GLRsFTvOmPmDaadI1al8WZ9LU3Cq8tenhQHMuWThoTYq9vsT2Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570581; c=relaxed/simple; bh=aY7j4nteNeRGstMxjTe9oh0bbfXAr3FIHYJPTefDQ9M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AY39I8BNQchO3am5TiZtfJJsUU2IJXKkwz4D6hjtIMPFDY5aVrocGTyk48oioQEPgrSK045gEEzY+I5/m91x1/tGE7UTEmy0sS8tmvfUAyRGIaa8L8v0gMohowdZe9gHCRJJEduIYR+dmN2zgsNvw4oPuAjwrJA3+yz535swCCA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=EMBPQRpo; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="EMBPQRpo" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=QGJl6o0AQ9mXupVYP+mBozTjvMRwI6Yh6zB7U2x6gYQ=; t=1716570579; x=1717780179; b=EMBPQRpoWVB57hZTV7pcJFp9H8UQVlEgqryfWVfO+fToyfu QU1diIgf6cRdmOrDCAzUtnSnVjn38uRga1z/2TEEPGRVUM8H0ZZRIF3esLkS3ek2ssEipT9rQO9b/ Nt5KTuxRdeRp7mYIbpaXoCQ4+SbPu2NmW6Aeqcse+Ctl/jGZc7oBBa/HZVnXQLpqlm5ZgWQlJNNzZ YKTPaunHQT/lO/bfi12pXsd1U3ormExyohHTnZspO0y+HaXNezY492fl1xiZtLbyaY4smDkZJuggj LI5BkI7lW1gT8xSbwhIW8Xs8wWfRCaGz4/EGc5nxo3uAp3Eo53aVGS/1JHkM4ENQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQD-00000008Xuw-0xOD; Fri, 24 May 2024 19:09:37 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 30/74] backports: add skb_list_del_init() Date: Fri, 24 May 2024 19:07:42 +0200 Message-ID: <20240524190907.033807850b36.I5a46230bc9c575b716597267e0b7b455600e05b6@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This got backported to 4.19.10, but we use it for >= 4.19.0, so provide a backported version for < 4.19.10. Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 2bcd10364f9c..2daf06012864 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -15,8 +15,16 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb) { skb->next = NULL; } +#endif /* 4.19.10 <= x < 4.20 || 4.14.217 <= x < 4.15 */ + +#if !LINUX_VERSION_IN_RANGE(4,19,10, 4,20,0) +static inline void skb_list_del_init(struct sk_buff *skb) +{ + __list_del_entry((struct list_head *)&skb->next); + skb_mark_not_on_list(skb); +} #endif /* 4.19.10 <= x < 4.20 */ -#endif +#endif /* < 4.20 */ #if LINUX_VERSION_IS_LESS(5,4,0) /** From patchwork Fri May 24 17:07:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673377 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 BE24812EBD4 for ; Fri, 24 May 2024 17:09:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570582; cv=none; b=podiy+4dumXHjxsk/6rasJSslIuO3U4Lll7Dm2ZW77B5rOoGM0C9KOBauWd80Y62vHhOsG2G4UfKZSrj8Q/hR+fkZofTNboE75tONjhLezSCJgTmoSCoo8/mxG3GQR4MjdlL3j8s3U3vH3Y7z9fmz7aadGnba8csEPlgfi8D7ck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570582; c=relaxed/simple; bh=MXQZcvaqYjFYEhbNo19Yj738wartpqZmZyHHjrqtsW8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NOdXF3XKDq7gQhWBcLRqrmhmxXaWVbOTGRlQkgfiIjugFt8cAzDJouj7+QFLKTixzvLKxzp0qqwfEfW99zigqqg/bsRmpKLkjgiIG+EgRaiTTS0kwCP65u1cc7ITzs5eJXgSKW5rlXgsLSxFrROjP8dPM5neBaO7wG2ytAwtlio= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=KhJfTinE; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="KhJfTinE" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=GxiNTZvpt4asoHHhcOYDpXPI8ndRgjF0DMcUHPSnR8Q=; t=1716570580; x=1717780180; b=KhJfTinEGO9cWoR+IYtTBdlxkMWL74GF5vnopqi121TSLty ovzCElLUyK2JpeOg64bVhjV8zJcNnDDUZsNzWxix5LuGKUBH8ZZGn2XFIEEi+3BdXxbOi4IW63n8i KRkQUH+IAuWmKkY7frryxW6ANlqnePqvatBpmuhkGlvmIrpOmG5g3d1Dxxsp6SOdCRHE29rS3YV1+ jbou+GJwjdSg+rcXjZFUSSNcqVGLNjDH3AjagkdspU6bvtptnUoG/+2Tbj9ybUQSfi2NUvzO3SIQh lDvkSf9VfOWdpBZYmF38b3ox286Uf75agTDVyqNkUHZ5HY66Od8Cs+/kPJ9b4seA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQE-00000008Xuw-1uJO; Fri, 24 May 2024 19:09:38 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 31/74] backports: handle kfree_skb_reason for older kernels Date: Fri, 24 May 2024 19:07:43 +0200 Message-ID: <20240524190907.ca531b72b1df.Ibba0f29bbf9e340a7b04d26c2e99f596233e6e89@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman kfree_skb_reason() was added in 5.17, handle it for kernels older than that. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 2daf06012864..909f0a9d63c0 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -76,4 +76,11 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb) } #endif +#if LINUX_VERSION_IS_LESS(5,17,0) +static inline void kfree_skb_reason(struct sk_buff *skb, u32 reason) +{ + dev_kfree_skb(skb); +} +#endif + #endif /* __BACKPORT_SKBUFF_H */ From patchwork Fri May 24 17:07:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673378 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 040EB376EB for ; Fri, 24 May 2024 17:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570583; cv=none; b=jA435ZaLMcR2II744vsZ3MK3L9h4be29uHroxHFwCgDoOLpOkSkMZXmuT1lDGXYcZ9xnd6zpNivYyHTNyPQ/40GpBMuyVoY7HqbsgFup9eA7l21AQhJ0w/6vBqVIQvdoOppU+8PZ7xW1OyARLIMvTtj5cfk/PKGuYK7tvi3FaW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570583; c=relaxed/simple; bh=vL3zf7PoGdBXbh1cG8nYqz6QsFVYC60SahvOuwIEd1s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=O/O5/mFZFpEwBe9f8yGR9DZ7dUa0PvnTn7xkr+/9bqLWiClUA0yQC34KJPCkiYXTutU3YS8Fc6gkfmsxIQFqtOU22vz1nN/9eVBISj5KHOFvnNj+U34pEWYxA5LpmHE5gS6nHAoNKFDk7tCsYgqcwzP/U+15EnWhj5zU4kyVaBo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=OAZ3VaNW; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="OAZ3VaNW" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=S5DuwPRx1xMgugLJHKl1iU3FZAtGZyq8LxO12D1OiYM=; t=1716570582; x=1717780182; b=OAZ3VaNWNNRayd1JsOFHBQTS2YFu632MQ7xjMXTdIPEQ69Y 7gO7YV2C5cP8Fkq/TyAvBuSyaQr028GUIT9O9DdzI8Fz2LgMgVxw5pHl2807IQVhsneRAeRMf9T9D kXiFLlGsqJA5KuDu93lSQrb0ovbo64zkLnIwpMrRZM8EIO/VzV6K7nsBpA+KOPphYb/aMm2slfLMH bvzeIf9qq+ra5WAJn+0MHSSi1lZk52qAncQNqQ0XO/jDZ2300K69x94/oqR/Gww2vs2GpX8aR1z1R jXy1rJpV3bPgkWRLVifgpnn87lD92J1m+AQcULY4QD38qWKrX6Boe+Adw6itXqQw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQF-00000008Xuw-2DIL; Fri, 24 May 2024 19:09:39 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman , Benjamin Berg Subject: [PATCH 32/74] backports: kunit: add kunit_add_cleanup Date: Fri, 24 May 2024 19:07:44 +0200 Message-ID: <20240524190907.6b4e9dec2702.I6db5dedc7e92f9bcc8e0139e9e2d9ec18ebbd478@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman This will be included upstream in 6.4 hopefully. Co-Authored-By: Benjamin Berg Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/compat/Makefile | 1 + backport/compat/backport-6.4.c | 42 ++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 backport/compat/backport-6.4.c diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 3c8430bc4958..62dfc62f7b46 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -16,6 +16,7 @@ compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o +compat-$(CPTCFG_KERNEL_6_4) += backport-6.4.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o diff --git a/backport/compat/backport-6.4.c b/backport/compat/backport-6.4.c new file mode 100644 index 000000000000..995c1f1d1b22 --- /dev/null +++ b/backport/compat/backport-6.4.c @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: GPL-2.0 + +#if LINUX_VERSION_IS_GEQ(6,2,0) && defined(CONFIG_KUNIT) +#include + +struct kunit_auto_cleanup { + struct kunit_resource resource; + kunit_cleanup_t cleanup_func; +}; + +static void kunit_auto_cleanup_free(struct kunit_resource *res) +{ + struct kunit_auto_cleanup *cleanup; + + cleanup = container_of(res, struct kunit_auto_cleanup, resource); + + cleanup->cleanup_func(cleanup->resource.data); +} + +void kunit_add_cleanup(struct kunit *test, kunit_cleanup_t cleanup_func, + const void *data, gfp_t internal_gfp) +{ + struct kunit_auto_cleanup *res; + + KUNIT_ASSERT_NOT_NULL_MSG(test, cleanup_func, + "Cleanup function must not be NULL"); + + res = kzalloc(sizeof(*res), internal_gfp); + if (!res) { + cleanup_func(data); + KUNIT_ASSERT_FAILURE(test, "Could not allocate resource for cleanup"); + } + + res->cleanup_func = cleanup_func; + res->resource.should_kfree = true; + + /* Cannot fail as init is NULL */ + __kunit_add_resource(test, NULL, kunit_auto_cleanup_free, + &res->resource, (void *)data); +} +EXPORT_SYMBOL_GPL(kunit_add_cleanup); +#endif /* LINUX_VERSION_IS_GEQ(6,2,0) */ From patchwork Fri May 24 17:07:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673379 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 3518412C47A for ; Fri, 24 May 2024 17:09:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570585; cv=none; b=qiXaRcUYBIUXXaA15u17PHzrrluYe1bcqllCBLlsNlTa7NLQBeMuEisc8REljz5OWyXOoy809yzBD78oRz2AAYGtqNcWz0hRj91cWYsY8OO/JCxpC2evWt+wAAIi+0d4O0umi3eNKipKC6NocHnBW5hL/0zJ48oSVWPr9fSz6ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570585; c=relaxed/simple; bh=zdXq77Mi5lW15bnMlSNgI77ac5RwAGpFbEMwujgqkn4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ojh3/M/D6OdkPJoNM3/g0lviA3uBkxlJXALKZJ+6vqACRD0RTfxituf6j0Hx3juYxZYw4k48qeln1Rw1aQq+BcXYuCeixjfD+4vSHjJG9ZIRkmdC3HccZhuU5fKgs6eG+FEh/VpGcaNEyWJ8kRzmx4MFZyK62061UdyQl27gdJg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=w6gfCNLZ; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="w6gfCNLZ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=D5Cjevqle4Hcn4X+09vKit8gdG/5EVA7EyrSncqGpQI=; t=1716570583; x=1717780183; b=w6gfCNLZqXUY7vp4bICZjKQqqyHas2xkONFJ2mvHwQTYTwN +rcm72ctYbt0fNThTqqrNQhLPUU2Yjq3GjVIz4xAF7c1euQ62MaAhu9IHbRpD2uhKie6CUl8N8TOp eRReXu3R6YPUTkTQTVlPBV2NxDJYZhyaQnm1Sfnv23YKJ1nCpnu4dQXZCz2JVzk7qlh4Di1YCVZ/U Zn2xWTADzShV5xA3hUg/0Y1lsbhdtDdUCoolpWnMMOd7ZLS7CfmQkPhucMMySq2vG5bJw760Zzl8/ OTjMaxvmMnoIlVFIkwOkibaFbUK9c6GNEjKfzwmehx5fY9tHJKRTE4bsEixFdPAA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQG-00000008Xuw-2aqA; Fri, 24 May 2024 19:09:41 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 33/74] backports: handle dropreason for kernels < 6.4 Date: Fri, 24 May 2024 19:07:45 +0200 Message-ID: <20240524190907.edeadcb46a25.I8886ef5c0db7045a01f17de52ec71de663a286a6@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman This functionality was added in kernel 6.4-rc1. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/net/dropreason.h | 312 +++++++++++++++++++++ backport/compat/backport-6.4.c | 13 + 2 files changed, 325 insertions(+) create mode 100644 backport/backport-include/net/dropreason.h diff --git a/backport/backport-include/net/dropreason.h b/backport/backport-include/net/dropreason.h new file mode 100644 index 000000000000..d35187af1547 --- /dev/null +++ b/backport/backport-include/net/dropreason.h @@ -0,0 +1,312 @@ +#ifndef __BACKPORT_DROPREASON_H +#define __BACKPORT_DROPREASON_H + +#if LINUX_VERSION_IS_LESS(6,4,0) +/** + * enum skb_drop_reason_subsys - subsystem tag for (extended) drop reasons + */ +enum skb_drop_reason_subsys { + /** @SKB_DROP_REASON_SUBSYS_CORE: core drop reasons defined above */ + SKB_DROP_REASON_SUBSYS_CORE, + + /** + * @SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE: mac80211 drop reasons + * for unusable frames, see net/mac80211/drop.h + */ + SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE, + + /** + * @SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR: mac80211 drop reasons + * for frames still going to monitor, see net/mac80211/drop.h + */ + SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR, + + /** @SKB_DROP_REASON_SUBSYS_NUM: number of subsystems defined */ + SKB_DROP_REASON_SUBSYS_NUM +}; + +struct drop_reason_list { + const char * const *reasons; + size_t n_reasons; +}; + +/** + * enum skb_drop_reason - the reasons of skb drops + * + * The reason of skb drop, which is used in kfree_skb_reason(). + */ +enum skb_drop_reason { + /** + * @SKB_NOT_DROPPED_YET: skb is not dropped yet (used for no-drop case) + */ + SKB_NOT_DROPPED_YET = 0, + /** @SKB_CONSUMED: packet has been consumed */ + SKB_CONSUMED, + /** @SKB_DROP_REASON_NOT_SPECIFIED: drop reason is not specified */ + SKB_DROP_REASON_NOT_SPECIFIED, + /** @SKB_DROP_REASON_NO_SOCKET: socket not found */ + SKB_DROP_REASON_NO_SOCKET, + /** @SKB_DROP_REASON_PKT_TOO_SMALL: packet size is too small */ + SKB_DROP_REASON_PKT_TOO_SMALL, + /** @SKB_DROP_REASON_TCP_CSUM: TCP checksum error */ + SKB_DROP_REASON_TCP_CSUM, + /** @SKB_DROP_REASON_SOCKET_FILTER: dropped by socket filter */ + SKB_DROP_REASON_SOCKET_FILTER, + /** @SKB_DROP_REASON_UDP_CSUM: UDP checksum error */ + SKB_DROP_REASON_UDP_CSUM, + /** @SKB_DROP_REASON_NETFILTER_DROP: dropped by netfilter */ + SKB_DROP_REASON_NETFILTER_DROP, + /** + * @SKB_DROP_REASON_OTHERHOST: packet don't belong to current host + * (interface is in promisc mode) + */ + SKB_DROP_REASON_OTHERHOST, + /** @SKB_DROP_REASON_IP_CSUM: IP checksum error */ + SKB_DROP_REASON_IP_CSUM, + /** + * @SKB_DROP_REASON_IP_INHDR: there is something wrong with IP header (see + * IPSTATS_MIB_INHDRERRORS) + */ + SKB_DROP_REASON_IP_INHDR, + /** + * @SKB_DROP_REASON_IP_RPFILTER: IP rpfilter validate failed. see the + * document for rp_filter in ip-sysctl.rst for more information + */ + SKB_DROP_REASON_IP_RPFILTER, + /** + * @SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST: destination address of L2 is + * multicast, but L3 is unicast. + */ + SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST, + /** @SKB_DROP_REASON_XFRM_POLICY: xfrm policy check failed */ + SKB_DROP_REASON_XFRM_POLICY, + /** @SKB_DROP_REASON_IP_NOPROTO: no support for IP protocol */ + SKB_DROP_REASON_IP_NOPROTO, + /** @SKB_DROP_REASON_SOCKET_RCVBUFF: socket receive buff is full */ + SKB_DROP_REASON_SOCKET_RCVBUFF, + /** + * @SKB_DROP_REASON_PROTO_MEM: proto memory limition, such as udp packet + * drop out of udp_memory_allocated. + */ + SKB_DROP_REASON_PROTO_MEM, + /** + * @SKB_DROP_REASON_TCP_MD5NOTFOUND: no MD5 hash and one expected, + * corresponding to LINUX_MIB_TCPMD5NOTFOUND + */ + SKB_DROP_REASON_TCP_MD5NOTFOUND, + /** + * @SKB_DROP_REASON_TCP_MD5UNEXPECTED: MD5 hash and we're not expecting + * one, corresponding to LINUX_MIB_TCPMD5UNEXPECTED + */ + SKB_DROP_REASON_TCP_MD5UNEXPECTED, + /** + * @SKB_DROP_REASON_TCP_MD5FAILURE: MD5 hash and its wrong, corresponding + * to LINUX_MIB_TCPMD5FAILURE + */ + SKB_DROP_REASON_TCP_MD5FAILURE, + /** + * @SKB_DROP_REASON_SOCKET_BACKLOG: failed to add skb to socket backlog ( + * see LINUX_MIB_TCPBACKLOGDROP) + */ + SKB_DROP_REASON_SOCKET_BACKLOG, + /** @SKB_DROP_REASON_TCP_FLAGS: TCP flags invalid */ + SKB_DROP_REASON_TCP_FLAGS, + /** + * @SKB_DROP_REASON_TCP_ZEROWINDOW: TCP receive window size is zero, + * see LINUX_MIB_TCPZEROWINDOWDROP + */ + SKB_DROP_REASON_TCP_ZEROWINDOW, + /** + * @SKB_DROP_REASON_TCP_OLD_DATA: the TCP data reveived is already + * received before (spurious retrans may happened), see + * LINUX_MIB_DELAYEDACKLOST + */ + SKB_DROP_REASON_TCP_OLD_DATA, + /** + * @SKB_DROP_REASON_TCP_OVERWINDOW: the TCP data is out of window, + * the seq of the first byte exceed the right edges of receive + * window + */ + SKB_DROP_REASON_TCP_OVERWINDOW, + /** + * @SKB_DROP_REASON_TCP_OFOMERGE: the data of skb is already in the ofo + * queue, corresponding to LINUX_MIB_TCPOFOMERGE + */ + SKB_DROP_REASON_TCP_OFOMERGE, + /** + * @SKB_DROP_REASON_TCP_RFC7323_PAWS: PAWS check, corresponding to + * LINUX_MIB_PAWSESTABREJECTED + */ + SKB_DROP_REASON_TCP_RFC7323_PAWS, + /** @SKB_DROP_REASON_TCP_INVALID_SEQUENCE: Not acceptable SEQ field */ + SKB_DROP_REASON_TCP_INVALID_SEQUENCE, + /** @SKB_DROP_REASON_TCP_RESET: Invalid RST packet */ + SKB_DROP_REASON_TCP_RESET, + /** + * @SKB_DROP_REASON_TCP_INVALID_SYN: Incoming packet has unexpected + * SYN flag + */ + SKB_DROP_REASON_TCP_INVALID_SYN, + /** @SKB_DROP_REASON_TCP_CLOSE: TCP socket in CLOSE state */ + SKB_DROP_REASON_TCP_CLOSE, + /** @SKB_DROP_REASON_TCP_FASTOPEN: dropped by FASTOPEN request socket */ + SKB_DROP_REASON_TCP_FASTOPEN, + /** @SKB_DROP_REASON_TCP_OLD_ACK: TCP ACK is old, but in window */ + SKB_DROP_REASON_TCP_OLD_ACK, + /** @SKB_DROP_REASON_TCP_TOO_OLD_ACK: TCP ACK is too old */ + SKB_DROP_REASON_TCP_TOO_OLD_ACK, + /** + * @SKB_DROP_REASON_TCP_ACK_UNSENT_DATA: TCP ACK for data we haven't + * sent yet + */ + SKB_DROP_REASON_TCP_ACK_UNSENT_DATA, + /** @SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE: pruned from TCP OFO queue */ + SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE, + /** @SKB_DROP_REASON_TCP_OFO_DROP: data already in receive queue */ + SKB_DROP_REASON_TCP_OFO_DROP, + /** @SKB_DROP_REASON_IP_OUTNOROUTES: route lookup failed */ + SKB_DROP_REASON_IP_OUTNOROUTES, + /** + * @SKB_DROP_REASON_BPF_CGROUP_EGRESS: dropped by BPF_PROG_TYPE_CGROUP_SKB + * eBPF program + */ + SKB_DROP_REASON_BPF_CGROUP_EGRESS, + /** @SKB_DROP_REASON_IPV6DISABLED: IPv6 is disabled on the device */ + SKB_DROP_REASON_IPV6DISABLED, + /** @SKB_DROP_REASON_NEIGH_CREATEFAIL: failed to create neigh entry */ + SKB_DROP_REASON_NEIGH_CREATEFAIL, + /** @SKB_DROP_REASON_NEIGH_FAILED: neigh entry in failed state */ + SKB_DROP_REASON_NEIGH_FAILED, + /** @SKB_DROP_REASON_NEIGH_QUEUEFULL: arp_queue for neigh entry is full */ + SKB_DROP_REASON_NEIGH_QUEUEFULL, + /** @SKB_DROP_REASON_NEIGH_DEAD: neigh entry is dead */ + SKB_DROP_REASON_NEIGH_DEAD, + /** @SKB_DROP_REASON_TC_EGRESS: dropped in TC egress HOOK */ + SKB_DROP_REASON_TC_EGRESS, + /** + * @SKB_DROP_REASON_QDISC_DROP: dropped by qdisc when packet outputting ( + * failed to enqueue to current qdisc) + */ + SKB_DROP_REASON_QDISC_DROP, + /** + * @SKB_DROP_REASON_CPU_BACKLOG: failed to enqueue the skb to the per CPU + * backlog queue. This can be caused by backlog queue full (see + * netdev_max_backlog in net.rst) or RPS flow limit + */ + SKB_DROP_REASON_CPU_BACKLOG, + /** @SKB_DROP_REASON_XDP: dropped by XDP in input path */ + SKB_DROP_REASON_XDP, + /** @SKB_DROP_REASON_TC_INGRESS: dropped in TC ingress HOOK */ + SKB_DROP_REASON_TC_INGRESS, + /** @SKB_DROP_REASON_UNHANDLED_PROTO: protocol not implemented or not supported */ + SKB_DROP_REASON_UNHANDLED_PROTO, + /** @SKB_DROP_REASON_SKB_CSUM: sk_buff checksum computation error */ + SKB_DROP_REASON_SKB_CSUM, + /** @SKB_DROP_REASON_SKB_GSO_SEG: gso segmentation error */ + SKB_DROP_REASON_SKB_GSO_SEG, + /** + * @SKB_DROP_REASON_SKB_UCOPY_FAULT: failed to copy data from user space, + * e.g., via zerocopy_sg_from_iter() or skb_orphan_frags_rx() + */ + SKB_DROP_REASON_SKB_UCOPY_FAULT, + /** @SKB_DROP_REASON_DEV_HDR: device driver specific header/metadata is invalid */ + SKB_DROP_REASON_DEV_HDR, + /** + * @SKB_DROP_REASON_DEV_READY: the device is not ready to xmit/recv due to + * any of its data structure that is not up/ready/initialized, + * e.g., the IFF_UP is not set, or driver specific tun->tfiles[txq] + * is not initialized + */ + SKB_DROP_REASON_DEV_READY, + /** @SKB_DROP_REASON_FULL_RING: ring buffer is full */ + SKB_DROP_REASON_FULL_RING, + /** @SKB_DROP_REASON_NOMEM: error due to OOM */ + SKB_DROP_REASON_NOMEM, + /** + * @SKB_DROP_REASON_HDR_TRUNC: failed to trunc/extract the header from + * networking data, e.g., failed to pull the protocol header from + * frags via pskb_may_pull() + */ + SKB_DROP_REASON_HDR_TRUNC, + /** + * @SKB_DROP_REASON_TAP_FILTER: dropped by (ebpf) filter directly attached + * to tun/tap, e.g., via TUNSETFILTEREBPF + */ + SKB_DROP_REASON_TAP_FILTER, + /** + * @SKB_DROP_REASON_TAP_TXFILTER: dropped by tx filter implemented at + * tun/tap, e.g., check_filter() + */ + SKB_DROP_REASON_TAP_TXFILTER, + /** @SKB_DROP_REASON_ICMP_CSUM: ICMP checksum error */ + SKB_DROP_REASON_ICMP_CSUM, + /** + * @SKB_DROP_REASON_INVALID_PROTO: the packet doesn't follow RFC 2211, + * such as a broadcasts ICMP_TIMESTAMP + */ + SKB_DROP_REASON_INVALID_PROTO, + /** + * @SKB_DROP_REASON_IP_INADDRERRORS: host unreachable, corresponding to + * IPSTATS_MIB_INADDRERRORS + */ + SKB_DROP_REASON_IP_INADDRERRORS, + /** + * @SKB_DROP_REASON_IP_INNOROUTES: network unreachable, corresponding to + * IPSTATS_MIB_INADDRERRORS + */ + SKB_DROP_REASON_IP_INNOROUTES, + /** + * @SKB_DROP_REASON_PKT_TOO_BIG: packet size is too big (maybe exceed the + * MTU) + */ + SKB_DROP_REASON_PKT_TOO_BIG, + /** @SKB_DROP_REASON_DUP_FRAG: duplicate fragment */ + SKB_DROP_REASON_DUP_FRAG, + /** @SKB_DROP_REASON_FRAG_REASM_TIMEOUT: fragment reassembly timeout */ + SKB_DROP_REASON_FRAG_REASM_TIMEOUT, + /** + * @SKB_DROP_REASON_FRAG_TOO_FAR: ipv4 fragment too far. + * (/proc/sys/net/ipv4/ipfrag_max_dist) + */ + SKB_DROP_REASON_FRAG_TOO_FAR, + /** + * @SKB_DROP_REASON_TCP_MINTTL: ipv4 ttl or ipv6 hoplimit below + * the threshold (IP_MINTTL or IPV6_MINHOPCOUNT). + */ + SKB_DROP_REASON_TCP_MINTTL, + /** @SKB_DROP_REASON_IPV6_BAD_EXTHDR: Bad IPv6 extension header. */ + SKB_DROP_REASON_IPV6_BAD_EXTHDR, + /** @SKB_DROP_REASON_IPV6_NDISC_FRAG: invalid frag (suppress_frag_ndisc). */ + SKB_DROP_REASON_IPV6_NDISC_FRAG, + /** @SKB_DROP_REASON_IPV6_NDISC_HOP_LIMIT: invalid hop limit. */ + SKB_DROP_REASON_IPV6_NDISC_HOP_LIMIT, + /** @SKB_DROP_REASON_IPV6_NDISC_BAD_CODE: invalid NDISC icmp6 code. */ + SKB_DROP_REASON_IPV6_NDISC_BAD_CODE, + /** @SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS: invalid NDISC options. */ + SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS, + /** + * @SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST: NEIGHBOUR SOLICITATION + * for another host. + */ + SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST, + /** + * @SKB_DROP_REASON_MAX: the maximum of core drop reasons, which + * shouldn't be used as a real 'reason' - only for tracing code gen + */ + SKB_DROP_REASON_MAX, + + /** + * @SKB_DROP_REASON_SUBSYS_MASK: subsystem mask in drop reasons, + * see &enum skb_drop_reason_subsys + */ + SKB_DROP_REASON_SUBSYS_MASK = 0xffff0000, +}; + +#define SKB_DROP_REASON_SUBSYS_SHIFT 16 + +void drop_reasons_register_subsys(enum skb_drop_reason_subsys subsys, + const struct drop_reason_list *list); +void drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys); +#endif +#endif + diff --git a/backport/compat/backport-6.4.c b/backport/compat/backport-6.4.c index 995c1f1d1b22..d26f46ebddde 100644 --- a/backport/compat/backport-6.4.c +++ b/backport/compat/backport-6.4.c @@ -1,5 +1,9 @@ // SPDX-License-Identifier: GPL-2.0 +#include +#include +#include + #if LINUX_VERSION_IS_GEQ(6,2,0) && defined(CONFIG_KUNIT) #include @@ -40,3 +44,12 @@ void kunit_add_cleanup(struct kunit *test, kunit_cleanup_t cleanup_func, } EXPORT_SYMBOL_GPL(kunit_add_cleanup); #endif /* LINUX_VERSION_IS_GEQ(6,2,0) */ + +void drop_reasons_register_subsys(enum skb_drop_reason_subsys subsys, + const struct drop_reason_list *list) +{} +EXPORT_SYMBOL_GPL(drop_reasons_register_subsys); + +void drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys) +{} +EXPORT_SYMBOL_GPL(drop_reasons_unregister_subsys); From patchwork Fri May 24 17:07:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673380 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 487C9376EB for ; Fri, 24 May 2024 17:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570586; cv=none; b=UnP1mmACQ8n0UjgHSJLPIOM3C48z9EYrPxmoT0aIWnPQ2Z+JIeY81jHzDfVoH04IBq2Er+XNuX0gDNxxOcGr8nonggXSqXYr2Quo9/2MBu8TugxWjvI/vVkqEOiaXseHM7KeWGTuvEqESzJlxBqxZiIRq3+WxPaPQRa4H2yQntw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570586; c=relaxed/simple; bh=anqTfcf1zWdVexi+iwjrg4XjrVEmbEkm4cT8dNPiwLQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Yt0MLzhO1eGdseb6YzIVnxq9gv0pk0Lg/kCM8SvSCwQ7/blOOldzJf2xRv9Eu2UAtydFIv1ddD8kyjxUpTCPL+LbTSKHtGiUTtAdJp4B4J4x/JMkOBJoNcFxVZyQCiFr6iz8bCPuB0fJso7kp7GRo8fpUgKCt3WksB9Dbmh0j1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=UW6zqmJ9; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="UW6zqmJ9" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=3DEWumzBFui8f8LaDQSMc/2S/tt67EZZNWRHzmaq0vw=; t=1716570584; x=1717780184; b=UW6zqmJ9y0abvuAcUUg0fSzwlpftb/xdapnitBlQgRSCoKT lclbMJ2Zm4Q+FYUCQHew2D+oVQ0rvh6vtmaHKRaWA9uDXasV9G8K9Nmf5Eqe36X7lf/dOUSWZzPyQ qncgKQU+TiFwBccdXJv5sciZlBF/kglDu+olBTGmE38F2nqr1PXS+02eT+Y56w0oiyqo8WZmZln5u 6NjfA3Sv3jFr4fgYaeX6P9BNAwsBCMoDxjpQnhJhE3SaJj+dNSgDpv7p0fpqjB1KVfexlitjOdIvA 0yK3gKqLOOht+UwObKWp3FM+7WCrFIPtQO0h1/4tHq5oXSLSnu3DLvMrbBsVoOeQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQH-00000008Xuw-3Ya2; Fri, 24 May 2024 19:09:42 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 34/74] backport: fix dropreason handling Date: Fri, 24 May 2024 19:07:46 +0200 Message-ID: <20240524190907.5870f67925c4.If8aac2d9d3c4fb7a22eed3e4ca6fd8fbaf0cdcd1@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/skbuff.h | 10 +- backport/backport-include/net/dropreason.h | 327 +++------------------ 2 files changed, 42 insertions(+), 295 deletions(-) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 909f0a9d63c0..bc4d5e5450a5 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -76,11 +76,17 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb) } #endif +#if LINUX_VERSION_IS_LESS(6,4,0) +static inline void +LINUX_BACKPORT(kfree_skb_reason)(struct sk_buff *skb, u32 reason) +{ #if LINUX_VERSION_IS_LESS(5,17,0) -static inline void kfree_skb_reason(struct sk_buff *skb, u32 reason) -{ dev_kfree_skb(skb); +#else + kfree_skb_reason(skb, SKB_DROP_REASON_NOT_SPECIFIED); +#endif } +#define kfree_skb_reason LINUX_BACKPORT(kfree_skb_reason) #endif #endif /* __BACKPORT_SKBUFF_H */ diff --git a/backport/backport-include/net/dropreason.h b/backport/backport-include/net/dropreason.h index d35187af1547..c0855503c04f 100644 --- a/backport/backport-include/net/dropreason.h +++ b/backport/backport-include/net/dropreason.h @@ -1,27 +1,34 @@ #ifndef __BACKPORT_DROPREASON_H #define __BACKPORT_DROPREASON_H +#if LINUX_VERSION_IS_GEQ(6,0,0) +#include_next +#else +#include +#endif + +#if LINUX_VERSION_IS_LESS(5,17,0) +#define SKB_DROP_REASON_MAX 1 +#endif + +#if LINUX_VERSION_IS_LESS(5,18,0) +/* + * Same as SKB_DROP_REASON_NOT_SPECIFIED on some kernels, + * but that's OK since we won't report these reasons to + * the kernel anyway until 6.4, see kfree_skb_reason(). + */ +#define SKB_NOT_DROPPED_YET 0 +#endif + +#if LINUX_VERSION_IS_LESS(6,2,0) +#define SKB_CONSUMED (SKB_DROP_REASON_MAX + 1) +#endif + #if LINUX_VERSION_IS_LESS(6,4,0) -/** - * enum skb_drop_reason_subsys - subsystem tag for (extended) drop reasons - */ enum skb_drop_reason_subsys { - /** @SKB_DROP_REASON_SUBSYS_CORE: core drop reasons defined above */ SKB_DROP_REASON_SUBSYS_CORE, - - /** - * @SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE: mac80211 drop reasons - * for unusable frames, see net/mac80211/drop.h - */ SKB_DROP_REASON_SUBSYS_MAC80211_UNUSABLE, - - /** - * @SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR: mac80211 drop reasons - * for frames still going to monitor, see net/mac80211/drop.h - */ SKB_DROP_REASON_SUBSYS_MAC80211_MONITOR, - - /** @SKB_DROP_REASON_SUBSYS_NUM: number of subsystems defined */ SKB_DROP_REASON_SUBSYS_NUM }; @@ -30,283 +37,17 @@ struct drop_reason_list { size_t n_reasons; }; -/** - * enum skb_drop_reason - the reasons of skb drops - * - * The reason of skb drop, which is used in kfree_skb_reason(). - */ -enum skb_drop_reason { - /** - * @SKB_NOT_DROPPED_YET: skb is not dropped yet (used for no-drop case) - */ - SKB_NOT_DROPPED_YET = 0, - /** @SKB_CONSUMED: packet has been consumed */ - SKB_CONSUMED, - /** @SKB_DROP_REASON_NOT_SPECIFIED: drop reason is not specified */ - SKB_DROP_REASON_NOT_SPECIFIED, - /** @SKB_DROP_REASON_NO_SOCKET: socket not found */ - SKB_DROP_REASON_NO_SOCKET, - /** @SKB_DROP_REASON_PKT_TOO_SMALL: packet size is too small */ - SKB_DROP_REASON_PKT_TOO_SMALL, - /** @SKB_DROP_REASON_TCP_CSUM: TCP checksum error */ - SKB_DROP_REASON_TCP_CSUM, - /** @SKB_DROP_REASON_SOCKET_FILTER: dropped by socket filter */ - SKB_DROP_REASON_SOCKET_FILTER, - /** @SKB_DROP_REASON_UDP_CSUM: UDP checksum error */ - SKB_DROP_REASON_UDP_CSUM, - /** @SKB_DROP_REASON_NETFILTER_DROP: dropped by netfilter */ - SKB_DROP_REASON_NETFILTER_DROP, - /** - * @SKB_DROP_REASON_OTHERHOST: packet don't belong to current host - * (interface is in promisc mode) - */ - SKB_DROP_REASON_OTHERHOST, - /** @SKB_DROP_REASON_IP_CSUM: IP checksum error */ - SKB_DROP_REASON_IP_CSUM, - /** - * @SKB_DROP_REASON_IP_INHDR: there is something wrong with IP header (see - * IPSTATS_MIB_INHDRERRORS) - */ - SKB_DROP_REASON_IP_INHDR, - /** - * @SKB_DROP_REASON_IP_RPFILTER: IP rpfilter validate failed. see the - * document for rp_filter in ip-sysctl.rst for more information - */ - SKB_DROP_REASON_IP_RPFILTER, - /** - * @SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST: destination address of L2 is - * multicast, but L3 is unicast. - */ - SKB_DROP_REASON_UNICAST_IN_L2_MULTICAST, - /** @SKB_DROP_REASON_XFRM_POLICY: xfrm policy check failed */ - SKB_DROP_REASON_XFRM_POLICY, - /** @SKB_DROP_REASON_IP_NOPROTO: no support for IP protocol */ - SKB_DROP_REASON_IP_NOPROTO, - /** @SKB_DROP_REASON_SOCKET_RCVBUFF: socket receive buff is full */ - SKB_DROP_REASON_SOCKET_RCVBUFF, - /** - * @SKB_DROP_REASON_PROTO_MEM: proto memory limition, such as udp packet - * drop out of udp_memory_allocated. - */ - SKB_DROP_REASON_PROTO_MEM, - /** - * @SKB_DROP_REASON_TCP_MD5NOTFOUND: no MD5 hash and one expected, - * corresponding to LINUX_MIB_TCPMD5NOTFOUND - */ - SKB_DROP_REASON_TCP_MD5NOTFOUND, - /** - * @SKB_DROP_REASON_TCP_MD5UNEXPECTED: MD5 hash and we're not expecting - * one, corresponding to LINUX_MIB_TCPMD5UNEXPECTED - */ - SKB_DROP_REASON_TCP_MD5UNEXPECTED, - /** - * @SKB_DROP_REASON_TCP_MD5FAILURE: MD5 hash and its wrong, corresponding - * to LINUX_MIB_TCPMD5FAILURE - */ - SKB_DROP_REASON_TCP_MD5FAILURE, - /** - * @SKB_DROP_REASON_SOCKET_BACKLOG: failed to add skb to socket backlog ( - * see LINUX_MIB_TCPBACKLOGDROP) - */ - SKB_DROP_REASON_SOCKET_BACKLOG, - /** @SKB_DROP_REASON_TCP_FLAGS: TCP flags invalid */ - SKB_DROP_REASON_TCP_FLAGS, - /** - * @SKB_DROP_REASON_TCP_ZEROWINDOW: TCP receive window size is zero, - * see LINUX_MIB_TCPZEROWINDOWDROP - */ - SKB_DROP_REASON_TCP_ZEROWINDOW, - /** - * @SKB_DROP_REASON_TCP_OLD_DATA: the TCP data reveived is already - * received before (spurious retrans may happened), see - * LINUX_MIB_DELAYEDACKLOST - */ - SKB_DROP_REASON_TCP_OLD_DATA, - /** - * @SKB_DROP_REASON_TCP_OVERWINDOW: the TCP data is out of window, - * the seq of the first byte exceed the right edges of receive - * window - */ - SKB_DROP_REASON_TCP_OVERWINDOW, - /** - * @SKB_DROP_REASON_TCP_OFOMERGE: the data of skb is already in the ofo - * queue, corresponding to LINUX_MIB_TCPOFOMERGE - */ - SKB_DROP_REASON_TCP_OFOMERGE, - /** - * @SKB_DROP_REASON_TCP_RFC7323_PAWS: PAWS check, corresponding to - * LINUX_MIB_PAWSESTABREJECTED - */ - SKB_DROP_REASON_TCP_RFC7323_PAWS, - /** @SKB_DROP_REASON_TCP_INVALID_SEQUENCE: Not acceptable SEQ field */ - SKB_DROP_REASON_TCP_INVALID_SEQUENCE, - /** @SKB_DROP_REASON_TCP_RESET: Invalid RST packet */ - SKB_DROP_REASON_TCP_RESET, - /** - * @SKB_DROP_REASON_TCP_INVALID_SYN: Incoming packet has unexpected - * SYN flag - */ - SKB_DROP_REASON_TCP_INVALID_SYN, - /** @SKB_DROP_REASON_TCP_CLOSE: TCP socket in CLOSE state */ - SKB_DROP_REASON_TCP_CLOSE, - /** @SKB_DROP_REASON_TCP_FASTOPEN: dropped by FASTOPEN request socket */ - SKB_DROP_REASON_TCP_FASTOPEN, - /** @SKB_DROP_REASON_TCP_OLD_ACK: TCP ACK is old, but in window */ - SKB_DROP_REASON_TCP_OLD_ACK, - /** @SKB_DROP_REASON_TCP_TOO_OLD_ACK: TCP ACK is too old */ - SKB_DROP_REASON_TCP_TOO_OLD_ACK, - /** - * @SKB_DROP_REASON_TCP_ACK_UNSENT_DATA: TCP ACK for data we haven't - * sent yet - */ - SKB_DROP_REASON_TCP_ACK_UNSENT_DATA, - /** @SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE: pruned from TCP OFO queue */ - SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE, - /** @SKB_DROP_REASON_TCP_OFO_DROP: data already in receive queue */ - SKB_DROP_REASON_TCP_OFO_DROP, - /** @SKB_DROP_REASON_IP_OUTNOROUTES: route lookup failed */ - SKB_DROP_REASON_IP_OUTNOROUTES, - /** - * @SKB_DROP_REASON_BPF_CGROUP_EGRESS: dropped by BPF_PROG_TYPE_CGROUP_SKB - * eBPF program - */ - SKB_DROP_REASON_BPF_CGROUP_EGRESS, - /** @SKB_DROP_REASON_IPV6DISABLED: IPv6 is disabled on the device */ - SKB_DROP_REASON_IPV6DISABLED, - /** @SKB_DROP_REASON_NEIGH_CREATEFAIL: failed to create neigh entry */ - SKB_DROP_REASON_NEIGH_CREATEFAIL, - /** @SKB_DROP_REASON_NEIGH_FAILED: neigh entry in failed state */ - SKB_DROP_REASON_NEIGH_FAILED, - /** @SKB_DROP_REASON_NEIGH_QUEUEFULL: arp_queue for neigh entry is full */ - SKB_DROP_REASON_NEIGH_QUEUEFULL, - /** @SKB_DROP_REASON_NEIGH_DEAD: neigh entry is dead */ - SKB_DROP_REASON_NEIGH_DEAD, - /** @SKB_DROP_REASON_TC_EGRESS: dropped in TC egress HOOK */ - SKB_DROP_REASON_TC_EGRESS, - /** - * @SKB_DROP_REASON_QDISC_DROP: dropped by qdisc when packet outputting ( - * failed to enqueue to current qdisc) - */ - SKB_DROP_REASON_QDISC_DROP, - /** - * @SKB_DROP_REASON_CPU_BACKLOG: failed to enqueue the skb to the per CPU - * backlog queue. This can be caused by backlog queue full (see - * netdev_max_backlog in net.rst) or RPS flow limit - */ - SKB_DROP_REASON_CPU_BACKLOG, - /** @SKB_DROP_REASON_XDP: dropped by XDP in input path */ - SKB_DROP_REASON_XDP, - /** @SKB_DROP_REASON_TC_INGRESS: dropped in TC ingress HOOK */ - SKB_DROP_REASON_TC_INGRESS, - /** @SKB_DROP_REASON_UNHANDLED_PROTO: protocol not implemented or not supported */ - SKB_DROP_REASON_UNHANDLED_PROTO, - /** @SKB_DROP_REASON_SKB_CSUM: sk_buff checksum computation error */ - SKB_DROP_REASON_SKB_CSUM, - /** @SKB_DROP_REASON_SKB_GSO_SEG: gso segmentation error */ - SKB_DROP_REASON_SKB_GSO_SEG, - /** - * @SKB_DROP_REASON_SKB_UCOPY_FAULT: failed to copy data from user space, - * e.g., via zerocopy_sg_from_iter() or skb_orphan_frags_rx() - */ - SKB_DROP_REASON_SKB_UCOPY_FAULT, - /** @SKB_DROP_REASON_DEV_HDR: device driver specific header/metadata is invalid */ - SKB_DROP_REASON_DEV_HDR, - /** - * @SKB_DROP_REASON_DEV_READY: the device is not ready to xmit/recv due to - * any of its data structure that is not up/ready/initialized, - * e.g., the IFF_UP is not set, or driver specific tun->tfiles[txq] - * is not initialized - */ - SKB_DROP_REASON_DEV_READY, - /** @SKB_DROP_REASON_FULL_RING: ring buffer is full */ - SKB_DROP_REASON_FULL_RING, - /** @SKB_DROP_REASON_NOMEM: error due to OOM */ - SKB_DROP_REASON_NOMEM, - /** - * @SKB_DROP_REASON_HDR_TRUNC: failed to trunc/extract the header from - * networking data, e.g., failed to pull the protocol header from - * frags via pskb_may_pull() - */ - SKB_DROP_REASON_HDR_TRUNC, - /** - * @SKB_DROP_REASON_TAP_FILTER: dropped by (ebpf) filter directly attached - * to tun/tap, e.g., via TUNSETFILTEREBPF - */ - SKB_DROP_REASON_TAP_FILTER, - /** - * @SKB_DROP_REASON_TAP_TXFILTER: dropped by tx filter implemented at - * tun/tap, e.g., check_filter() - */ - SKB_DROP_REASON_TAP_TXFILTER, - /** @SKB_DROP_REASON_ICMP_CSUM: ICMP checksum error */ - SKB_DROP_REASON_ICMP_CSUM, - /** - * @SKB_DROP_REASON_INVALID_PROTO: the packet doesn't follow RFC 2211, - * such as a broadcasts ICMP_TIMESTAMP - */ - SKB_DROP_REASON_INVALID_PROTO, - /** - * @SKB_DROP_REASON_IP_INADDRERRORS: host unreachable, corresponding to - * IPSTATS_MIB_INADDRERRORS - */ - SKB_DROP_REASON_IP_INADDRERRORS, - /** - * @SKB_DROP_REASON_IP_INNOROUTES: network unreachable, corresponding to - * IPSTATS_MIB_INADDRERRORS - */ - SKB_DROP_REASON_IP_INNOROUTES, - /** - * @SKB_DROP_REASON_PKT_TOO_BIG: packet size is too big (maybe exceed the - * MTU) - */ - SKB_DROP_REASON_PKT_TOO_BIG, - /** @SKB_DROP_REASON_DUP_FRAG: duplicate fragment */ - SKB_DROP_REASON_DUP_FRAG, - /** @SKB_DROP_REASON_FRAG_REASM_TIMEOUT: fragment reassembly timeout */ - SKB_DROP_REASON_FRAG_REASM_TIMEOUT, - /** - * @SKB_DROP_REASON_FRAG_TOO_FAR: ipv4 fragment too far. - * (/proc/sys/net/ipv4/ipfrag_max_dist) - */ - SKB_DROP_REASON_FRAG_TOO_FAR, - /** - * @SKB_DROP_REASON_TCP_MINTTL: ipv4 ttl or ipv6 hoplimit below - * the threshold (IP_MINTTL or IPV6_MINHOPCOUNT). - */ - SKB_DROP_REASON_TCP_MINTTL, - /** @SKB_DROP_REASON_IPV6_BAD_EXTHDR: Bad IPv6 extension header. */ - SKB_DROP_REASON_IPV6_BAD_EXTHDR, - /** @SKB_DROP_REASON_IPV6_NDISC_FRAG: invalid frag (suppress_frag_ndisc). */ - SKB_DROP_REASON_IPV6_NDISC_FRAG, - /** @SKB_DROP_REASON_IPV6_NDISC_HOP_LIMIT: invalid hop limit. */ - SKB_DROP_REASON_IPV6_NDISC_HOP_LIMIT, - /** @SKB_DROP_REASON_IPV6_NDISC_BAD_CODE: invalid NDISC icmp6 code. */ - SKB_DROP_REASON_IPV6_NDISC_BAD_CODE, - /** @SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS: invalid NDISC options. */ - SKB_DROP_REASON_IPV6_NDISC_BAD_OPTIONS, - /** - * @SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST: NEIGHBOUR SOLICITATION - * for another host. - */ - SKB_DROP_REASON_IPV6_NDISC_NS_OTHERHOST, - /** - * @SKB_DROP_REASON_MAX: the maximum of core drop reasons, which - * shouldn't be used as a real 'reason' - only for tracing code gen - */ - SKB_DROP_REASON_MAX, - - /** - * @SKB_DROP_REASON_SUBSYS_MASK: subsystem mask in drop reasons, - * see &enum skb_drop_reason_subsys - */ - SKB_DROP_REASON_SUBSYS_MASK = 0xffff0000, -}; - #define SKB_DROP_REASON_SUBSYS_SHIFT 16 +#define SKB_DROP_REASON_SUBSYS_MASK 0xffff0000 -void drop_reasons_register_subsys(enum skb_drop_reason_subsys subsys, - const struct drop_reason_list *list); -void drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys); -#endif -#endif +static inline void +drop_reasons_register_subsys(enum skb_drop_reason_subsys subsys, + const struct drop_reason_list *list) +{} +static inline void +drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys) +{} +#endif /* <= 6.4 */ + +#endif From patchwork Fri May 24 17:07:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673381 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 5007712EBD5 for ; Fri, 24 May 2024 17:09:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570586; cv=none; b=uWnExFy7QgYJhF7VX6YitJBvwt1lKNnOv8p22tyvgNtI8t5WgoutTjVRz+NyPFlkjAEsRq8ovXGHbr5wsfeU25/ug+yyMCGffBSp7uWjEk//xNKA60C7TGlEr0qwjaO0HZAdnTjNxykOexVxp8TKKKL5h7NGOGV5vnWRMxkb0YI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570586; c=relaxed/simple; bh=x77x66TJi1mCoc6H1GoNKnimaWJ0ihXpfyXqt6SI22g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BlJqFrM559WEohFGDSORttsrFHzS3TN889uvMpfJWMa0nH0VDj8ApqeALUNLDWTZSqLqv5DEIW6RzJa5wXrouDbvE7vLH0SYwIHacdQVYyMBWd4432JphCP5mmZEOE1+QSF864Z4KVTSiau55KBYWiFxLHu7EnSpZ4Q6NtDB6XQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=IYSTqdK6; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="IYSTqdK6" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=plvSw+E4ZXRs5KxbigFkpdbrlaEW61Sw2Ltn9dfhhUM=; t=1716570585; x=1717780185; b=IYSTqdK6wlEr+HXl8bImEutbti/kNV/9KjHK1b3JkbRnMlk PTpcsb1aJgAH7Fqyc0I+0QzVnje78ke0CvvWYPaQLTAfKAPtLYea2ZX+PtS5mt24TTaw75ZMMhPnG 3i1atzrDPDAz6+5bU+Wg8DTiJ/KyGi7NNUAQDusti+EgqkUbYc4Qa7GiKsnOnDn9W0/htZwTwRRkI SWQRzI4k/ywYitCUYtmr3qKhwPTnlbPTFa/NPQ3x10s4XgvkSpfvBBCVSUdTsgRNYyJBbpb4fMH5F mOKfW7YQFX+Jdzx5tA75790gCMHXv5/VJn+G3sCJlaDAzQUv8/YkxdcRrgnDHJDg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQI-00000008Xuw-3k1z; Fri, 24 May 2024 19:09:43 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 35/74] backports: add memset_after/memset_startat Date: Fri, 24 May 2024 19:07:47 +0200 Message-ID: <20240524190907.b03442e67598.I22eae0fdc7b78cf10a7dee6fe477fbf0c9a5e807@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/string.h | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 backport/backport-include/linux/string.h diff --git a/backport/backport-include/linux/string.h b/backport/backport-include/linux/string.h new file mode 100644 index 000000000000..ce4c99e34e0d --- /dev/null +++ b/backport/backport-include/linux/string.h @@ -0,0 +1,26 @@ +#ifndef __BACKPORT_LINUX_STRING_H +#define __BACKPORT_LINUX_STRING_H +#include_next +#include + +#ifndef memset_after +#define memset_after(obj, v, member) \ +({ \ + u8 *__ptr = (u8 *)(obj); \ + typeof(v) __val = (v); \ + memset(__ptr + offsetofend(typeof(*(obj)), member), __val, \ + sizeof(*(obj)) - offsetofend(typeof(*(obj)), member)); \ +}) +#endif + +#ifndef memset_startat +#define memset_startat(obj, v, member) \ +({ \ + u8 *__ptr = (u8 *)(obj); \ + typeof(v) __val = (v); \ + memset(__ptr + offsetof(typeof(*(obj)), member), __val, \ + sizeof(*(obj)) - offsetof(typeof(*(obj)), member)); \ +}) +#endif + +#endif /* __BACKPORT_LINUX_STRING_H */ From patchwork Fri May 24 17:07:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673382 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 509BE12EBC9 for ; Fri, 24 May 2024 17:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570587; cv=none; b=SfGFK7XimQQ16pualVfMoNJnU6HrnGaMZBLFaGCDXaJBksfq5xxjMCKn7ihx+QebsJzU3LBnYUHj0ev3Dl041KW267Zo2yOwwQYWUiBm8feUhnw/X68gG1+rgoGxtnvVFK/tjMbcKtSDpDyEc93HeQ0eWNKRonO+iGmdAFFLTcA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570587; c=relaxed/simple; bh=KsfYmOs9CW+e9iV/c3KUfIqzKIR00+UOaRH9rJOJGH8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kYMeFpGfYv6WP9w6xcbsrCKMHpkTMhwYU+a4Ph/B5ZMDW3fmkHtpFrdrIn5djmbC4Xkm46meCITFWD13bQnmOwi45eYjXpXu7OV9UTjh3KmdFaKuN6f7hWv2pmEDP4YCquoDZBE3rTu89LM3kLGTXHXayW6VTCtm5iE03b1Kr5g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=ZPDRSq/P; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="ZPDRSq/P" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=yjeX1oBoWECJfMBuNkBSCO4f8kJ+me7VSNS26Sq0NgI=; t=1716570586; x=1717780186; b=ZPDRSq/PVLGULgCdIhKeOaur3nuRvcKwcEDkPBipPS773+t yfjvbVDxKX4xaZPEodXqMn/qWCI+flOdNW4KWUoFRnh+CIWDqGkHOI1g6YELFiT+WdsEXp4y/86Tn SJavJpu7zwzdD19rXtIevDOytlM5xXi3BbmJeUMtX8d5lOr7/nbheUTEVo7oe0rDsdHPh7sDGvG5J qIDmyCz+lmjgZd9VXww6JgjtV4IZp58SjJRQPfY2XC2gsf3xcwvkRYkUICjkSBcrHhO/OKyQgEAC+ zxW9fb/S9vNn6FnMKpXHhMZRvp8pFZwsfbZscl4teByccSibTQPHosTze4IFyKfw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQJ-00000008Xuw-3Ywu; Fri, 24 May 2024 19:09:44 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 36/74] backports: support strscpy_pad in older kernels Date: Fri, 24 May 2024 19:07:48 +0200 Message-ID: <20240524190907.1dee9821fe79.I57f107eb082c9a5d4ba9377bbf6c777013d7e24a@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit This was added in kernel v5.2. Add support for it in older kernels. Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- backport/backport-include/linux/string.h | 5 +++++ backport/compat/backport-5.2.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/backport/backport-include/linux/string.h b/backport/backport-include/linux/string.h index ce4c99e34e0d..f6e6cdcf08b8 100644 --- a/backport/backport-include/linux/string.h +++ b/backport/backport-include/linux/string.h @@ -23,4 +23,9 @@ }) #endif +#if LINUX_VERSION_IS_LESS(5,2,0) +#define strscpy_pad LINUX_BACKPORT(strscpy_pad) +ssize_t strscpy_pad(char *dest, const char *src, size_t count); +#endif + #endif /* __BACKPORT_LINUX_STRING_H */ diff --git a/backport/compat/backport-5.2.c b/backport/compat/backport-5.2.c index 5624d5fa08e5..581bb9cfe7fd 100644 --- a/backport/compat/backport-5.2.c +++ b/backport/compat/backport-5.2.c @@ -479,3 +479,17 @@ int __nla_parse(struct nlattr **tb, int maxtype, extack, tb); } EXPORT_SYMBOL(__nla_parse); + +ssize_t strscpy_pad(char *dest, const char *src, size_t count) +{ + ssize_t written; + + written = strscpy(dest, src, count); + if (written < 0 || written == count - 1) + return written; + + memset(dest + written + 1, 0, count - written - 1); + + return written; +} +EXPORT_SYMBOL(strscpy_pad); From patchwork Fri May 24 17:07:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673383 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 5EA0C12E1EB for ; Fri, 24 May 2024 17:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570588; cv=none; b=VV07pxX6xczHB6A3n26vh1YGewjop9blYFZv7zECPgBW4aS/L7JDpAIhehT37HNmhbaCWWSN+orK6t3Io/LJh6YTlp6UkEG2ozEdo3bdPfwhc4TBuMzEmWC/TYZ7lBi6NEy8Hi9KYPef2EOxr8mUwewrcnefo6U3ET5m9Mly1s8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570588; c=relaxed/simple; bh=L7PP/uog8GWZiEftPzgMGj1eOn/56mCRFJ+e4aIa78A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YnTycaE9vMZHBfAA2XeIX1uzf5AX+/ez99V4vLwSm6a6JEn/cqnFQcbOOgoA/DWyMoo4zUeT7u0OCoUF/wnXkLZEuCKko9kueb7iGKmMTP7TRxslKAne8VWKqXPb7XkPY5toZLdurPtL529TYYkgmH/uzoYvObDuZvl3PXL4F/8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=d5Z+pOw6; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="d5Z+pOw6" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=+j09dzoHGoGC5bHoJSqCfNBk/nKJs3Onwkg/uo/YcUs=; t=1716570587; x=1717780187; b=d5Z+pOw6ILQNy6RXDfU7jWoTu+qVawvv3PHnnf6AuYrLTSu zThXjPp1vzAVgauvjeaIncwvEG8nYKUcRhi/0TiOK9rio+thypEoSRmYJysPY4RZyOzWefhl2vJ5D hXjmiRL/MQidzoX9le8Wmcq8Iiqc9hGDkbD+31Kh7V6gOZcX84nJhk6M+6Le2L5D4bzPPQmFWND37 Ks2/ELCwWacCZpoqurx2hnRf2qnsjVo9y9HXBGHxHeLq/QrWKMPh4e260nE9G6EElk7PGWeYnybqg UBohhny0qMKpuIclKw5ihYYQXOtXx2/TsCNwbJEqjVAHYvlrEhyaQKO0TE5UpFbA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQK-00000008Xuw-43D2; Fri, 24 May 2024 19:09:45 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Felix Fietkau Subject: [PATCH 37/74] headers: add skb_tcp_all_headers Date: Fri, 24 May 2024 19:07:49 +0200 Message-ID: <20240524190907.2429e3545959.Ia864c56f1dd70716e29a2f97f07f57932923ebb6@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Felix Fietkau Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg --- backport/backport-include/linux/tcp.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 backport/backport-include/linux/tcp.h diff --git a/backport/backport-include/linux/tcp.h b/backport/backport-include/linux/tcp.h new file mode 100644 index 000000000000..2483cbebf66c --- /dev/null +++ b/backport/backport-include/linux/tcp.h @@ -0,0 +1,14 @@ +#ifndef __BACKPORT_LINUX_TCP_H +#define __BACKPORT_LINUX_TCP_H + +#include_next +#include + +#if LINUX_VERSION_IS_LESS(6,0,0) +static inline int skb_tcp_all_headers(const struct sk_buff *skb) +{ + return skb_transport_offset(skb) + tcp_hdrlen(skb); +} +#endif + +#endif From patchwork Fri May 24 17:07:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673384 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 1FBA7376EB for ; Fri, 24 May 2024 17:09:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570592; cv=none; b=GZNWTVfEgoA0CMencLaKBDzRwJ1ELgpK+6mwkSqVZZWp+ETISv6DYPbPIcy0U6CGIjpVPV9nlBROSXP4YXA56dErDrNF2iXruGrdGWyhADeifMSd3dzoZqoY2rrwIObElv3XnJ5Srlk+G8ErwP49m7HVXo7dcWDGSwNuB5si41o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570592; c=relaxed/simple; bh=uliRjOQR0+/6G0ruJ6s5WFoFgLT2MUxA2bB83oc9uB4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Otz8EZpjat6HA8iFFzAtFDYKWczDFZmqy9ZKqVSF0LWHkg+GdWI67+g6O9bn9BAhLewKOSQKjXS5SbQByW4i0KTi/LgYhyTebvGFinfRwXQ3Qx87oDjHh6Zog3qgL0tShRJoIaQYN0Tth+usuvG5ttZPkd4RYBfdtf9l3UZKVos= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=arvQFNqN; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="arvQFNqN" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=WGOFHhKTTHEwF21Lzyq8RdgPJTJYzZGTkXS8shUd0T4=; t=1716570591; x=1717780191; b=arvQFNqNIgIzixZeov3s8CP3M1kjbsA8ArgOiRxAK30PM5i Sw8Ksorw9gHon2FMUZd52CeAwwQ8u/oTw1ha12cxOseEWF19hODmdDk584ZLpeToDEnJc6yi2YfvC UXHg1aSCx0F3TDAZyfvRH5SYER0J7m2fUGPzU0CFGW4D+ZrI7ivP99wFzsUzKIWvDuz8vxxy+5PF3 paUsddYPiAk9ryv/birhx/uE4VQm5Q4J9CFI5ey/UY35rhYfz4nv3vUSheWeIbBPdPxhiVmmNhkA0 wol6n1gMKuBop6Ceiw/yVVB+ngFVgh0dVCXb4RRLO+w7zaidYTM8anKmpDOgBUZQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQM-00000008Xuw-05tN; Fri, 24 May 2024 19:09:46 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 38/74] thermal: return errors w/o CONFIG_THERMAL Date: Fri, 24 May 2024 19:07:50 +0200 Message-ID: <20240524190907.ff076c34dfbe.I380a5ee9df3ecaceba5ffaf92b5ad41138b96567@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index d9b8153e9c87..76d4f231aa5a 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -3,6 +3,7 @@ #include_next #include +#ifdef CONFIG_THERMAL #if LINUX_VERSION_IS_LESS(5,9,0) #define thermal_zone_device_enable LINUX_BACKPORT(thermal_zone_device_enable) static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) @@ -12,5 +13,16 @@ static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return 0; } #endif /* < 5.9 */ +#else /* CONFIG_THERMAL */ +#if LINUX_VERSION_IS_LESS(5,9,0) +#define thermal_zone_device_enable LINUX_BACKPORT(thermal_zone_device_enable) +static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) +{ return -ENODEV; } + +#define thermal_zone_device_disable LINUX_BACKPORT(thermal_zone_device_disable) +static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) +{ return -ENODEV; } +#endif /* < 5.9 */ +#endif /* CONFIG_THERMAL */ #endif /* __BACKPORT_LINUX_THERMAL_H */ From patchwork Fri May 24 17:07:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673385 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 83E0012E1EB for ; Fri, 24 May 2024 17:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570593; cv=none; b=Dm39KtdXM4Hb0bvIZhkpKNpqJGOGix6baNLcqhEI/HRSiMprIfI1e622aQCfwHzwDfzdNx1hK0lAmL08jZIi96ks1YOuVJ7OhtoaMxF1MrjRZ91sb48p7SyJ249n8wE8MhqGvqCGj/8lNVyJZAXAmslSqLJeK+FoD4E8DgCDOkk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570593; c=relaxed/simple; bh=y8poYnG3DnYoyyCL4Xj4W7f2BG4FJ/bDp9zXXHk3uSo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s3ghV20srqH4+NFDUO0natu+4UE5zbliYPY8a2cmyyCpuE3ILMudZaxSdKlf0gv3jzKW4gBLpn3AFy/g9/YjvQLcdu+q4OMHyQjdQ1EQHTeYJzdsaVAIcCp1H0kmJXAKYJ72bS6vuvm/p7oqtgonJKop5GkX4PfVLjIcqxdC0hA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=uHVyphOM; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="uHVyphOM" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=U3Y5CiCnaytMHNjNQ0Es0H6ho3SC3U48BcRJCuHvadY=; t=1716570592; x=1717780192; b=uHVyphOMnGXuEuTnlZpfD1samYxvbtZYLKW00kD7HABdsvC pJw02CekjkoKY9PN/Q6B8n3h7RXOdcCtF0z2ZF1yFdnjyRs6S+v+lB+k3768Kg5Ti73H+MrwLai77 ZnJeb0TefEZDERgMZq49Te93kWVf9UldbgJ6PgF2+fitYlSljWXzPwi0wyfPCuf2KbeNL2xGu18Ib j3grUUEbGakOVWjXBG1bo26HgXwtwCdGvHZdKePzjQPGx1oKhR1T84j8ajNi+5gQUET84YQVMvGOf VlvymaX47cc2se+zl2DBkxWuHL3te0wp6kNqHWQ1v8Gfj4hvJFGy6+LnZQC5hdhg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQP-00000008Xuw-2CRD; Fri, 24 May 2024 19:09:50 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 39/74] backports: handle thermal_zone_device_priv() for kernels < 6.4 Date: Fri, 24 May 2024 19:07:51 +0200 Message-ID: <20240524190907.ba6770df16be.I6eb167fc3c298f366fbee88e246be20c58beb6f4@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman This function was added in v6.4-rc1. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 12 ++++++++++++ backport/compat/backport-6.4.c | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 76d4f231aa5a..2e0fcb6b3d28 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -13,6 +13,10 @@ static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return 0; } #endif /* < 5.9 */ + +#if LINUX_VERSION_IS_LESS(6,4,0) +void *thermal_zone_device_priv(struct thermal_zone_device *tzd); +#endif /* < 6.4.0 */ #else /* CONFIG_THERMAL */ #if LINUX_VERSION_IS_LESS(5,9,0) #define thermal_zone_device_enable LINUX_BACKPORT(thermal_zone_device_enable) @@ -23,6 +27,14 @@ static inline int thermal_zone_device_enable(struct thermal_zone_device *tz) static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return -ENODEV; } #endif /* < 5.9 */ + +#if LINUX_VERSION_IS_LESS(6,4,0) +#define thermal_zone_device_priv LINUX_BACKPORT(thermal_zone_device_priv) +static inline void *thermal_zone_device_priv(struct thermal_zone_device *tzd) +{ + return NULL; +} +#endif /* < 6.4.0 */ #endif /* CONFIG_THERMAL */ #endif /* __BACKPORT_LINUX_THERMAL_H */ diff --git a/backport/compat/backport-6.4.c b/backport/compat/backport-6.4.c index d26f46ebddde..af872e5de04d 100644 --- a/backport/compat/backport-6.4.c +++ b/backport/compat/backport-6.4.c @@ -3,6 +3,7 @@ #include #include #include +#include #if LINUX_VERSION_IS_GEQ(6,2,0) && defined(CONFIG_KUNIT) #include @@ -53,3 +54,11 @@ EXPORT_SYMBOL_GPL(drop_reasons_register_subsys); void drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys) {} EXPORT_SYMBOL_GPL(drop_reasons_unregister_subsys); + +#ifdef CONFIG_THERMAL +void *thermal_zone_device_priv(struct thermal_zone_device *tzd) +{ + return tzd->devdata; +} +EXPORT_SYMBOL_GPL(thermal_zone_device_priv); +#endif /* CONFIG_THERMAL */ From patchwork Fri May 24 17:07:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673386 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 F20B3376EB for ; Fri, 24 May 2024 17:09:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570595; cv=none; b=WqlCOrUinu7ZXGA/nJ5w+ZokKmm9cCNOB8sbqvolcZEhgJ6I+0rG9e3UTe+iTXxwrDmcc/h53czKLlSdYKAnsS5qeb29SZaVmCIi5A/CA6kKnCohmT3JzsTZp88ynCsxAmMouOtiwI6zSZ1XqCRpGKMKUV0bC+7ELQd3D+2lHiI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570595; c=relaxed/simple; bh=Ee7989dLOj4cWvlMWUJyIH670Ybqdv9VqniLMPtTjRE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hifWQbMHQmYSC6GgTQiQV1iex2r011zW6NcI3mApN2mA8PRxWpiZbTw6LzhQnqfmvy6tRP+khQ5y0T9kSqllkZ6bvm/HzmwzxtoTVZFOiwSCbB/zS3/n428kFPER4aInoQyD7PU/HA5XSB6wFsjOI7WHlT+wLgADHkRgHQJ9nmk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=pQXCzlnT; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="pQXCzlnT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=L8HPthczws/bS4VpOU288azrZ170QPZBwB9wbajCjF4=; t=1716570594; x=1717780194; b=pQXCzlnTi4v+u99ovI1MQUSSvTmY399VF6BOT5S00bY3BW7 YnMaNVS4/PrGnVXdBxLoAvvNVUT9+iXg/5QQdkpsVevr9wCy4ZCyj4naEHNcYN5Tg0Bh1MRW+nLxW hhostsQNXbLdsMlXgZDiQPR5lmvXmZNY9tuYowODzzQmjuLpxFgdA5yrfKr2k0IgLNRBKJ+KGQV/S wYGPSLBsPJhA8v5vBpUrqpwZUpToPOpbrwnq2VsVTtFXBmUiwXGQZ607yFBDBOyLwMNCyoQtgbBVs vnCMgovAO562hLlcJ7f80c2EWGfgU5ja9iEyg8kjFemui6gVSo2Xtv1Phau4lSxw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQR-00000008Xuw-0Z8Z; Fri, 24 May 2024 19:09:51 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 40/74] backports: handle thermal_trip for kernels < 6.0 Date: Fri, 24 May 2024 19:07:52 +0200 Message-ID: <20240524190907.394dd12cb9eb.I0ae8b3f6d3d2784b230050d7d173921228d3f81f@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman thermal_trip struct was removed in kernel 5.10 and added back in 6.0; in addition 6.0 got some other changes. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 34 +++++++++++++++++++++++ backport/compat/Makefile | 1 + backport/compat/backport-6.0.c | 19 +++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 backport/compat/backport-6.0.c diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 2e0fcb6b3d28..210292509ac3 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -14,6 +14,25 @@ static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return 0; } #endif /* < 5.9 */ +#if LINUX_VERSION_IS_LESS(6,0,0) && LINUX_VERSION_IS_GEQ(5,10,0) +struct thermal_trip { + int temperature; + int hysteresis; + enum thermal_trip_type type; +}; +#endif + +#if LINUX_VERSION_IS_LESS(6,0,0) +struct thermal_zone_device * +thermal_zone_device_register_with_trips(const char *type, + struct thermal_trip *trips, + int num_trips, int mask, void *devdata, + struct thermal_zone_device_ops *ops, + struct thermal_zone_params *tzp, + int passive_delay, + int polling_delay); +#endif /* <6,0,0 */ + #if LINUX_VERSION_IS_LESS(6,4,0) void *thermal_zone_device_priv(struct thermal_zone_device *tzd); #endif /* < 6.4.0 */ @@ -28,6 +47,21 @@ static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return -ENODEV; } #endif /* < 5.9 */ +#if LINUX_VERSION_IS_LESS(6,0,0) +#define thermal_zone_device_register_with_trips LINUX_BACKPORT(thermal_zone_device_register_with_trips) +static inline struct thermal_zone_device * +thermal_zone_device_register_with_trips(const char *type, + struct thermal_trip *trips, + int num_trips, int mask, void *devdata, + struct thermal_zone_device_ops *ops, + struct thermal_zone_params *tzp, + int passive_delay, + int polling_delay) +{ + return NULL; +} +#endif + #if LINUX_VERSION_IS_LESS(6,4,0) #define thermal_zone_device_priv LINUX_BACKPORT(thermal_zone_device_priv) static inline void *thermal_zone_device_priv(struct thermal_zone_device *tzd) diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 62dfc62f7b46..d55437d70ae7 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -16,6 +16,7 @@ compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o +compat-$(CPTCFG_KERNEL_6_0) += backport-6.0.o compat-$(CPTCFG_KERNEL_6_4) += backport-6.4.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o diff --git a/backport/compat/backport-6.0.c b/backport/compat/backport-6.0.c new file mode 100644 index 000000000000..7cb699fc0007 --- /dev/null +++ b/backport/compat/backport-6.0.c @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include +#include + +#ifdef CONFIG_THERMAL +struct thermal_zone_device * +thermal_zone_device_register_with_trips(const char *type, + struct thermal_trip *trips, + int num_trips, int mask, void *devdata, + struct thermal_zone_device_ops *ops, + struct thermal_zone_params *tzp, int passive_delay, + int polling_delay) +{ + return thermal_zone_device_register(type, num_trips, mask, devdata, ops, tzp, + passive_delay, polling_delay); +} +EXPORT_SYMBOL_GPL(thermal_zone_device_register_with_trips); +#endif /* CONFIG_THERMAL */ From patchwork Fri May 24 17:07:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673387 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 912FA12EBFA for ; Fri, 24 May 2024 17:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570597; cv=none; b=pZhq7MUbpIOIWqx1LW13i8AEyZ/cv1Ad60taPnWhJcVAyKO20LQdziXXSTxLe9K6AMoPrndyOW97vEhPqETM0yYgW64GoehiGUnGFAO0oYqz492hzgESFh9Dvex9wblmgpyptGtTl50zMoxTJUMcxR/w2YKeIFW7mpsP5GPr/oQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570597; c=relaxed/simple; bh=9m9U4l7wYrd0KILh8tlZ5w2ArvGB12amjyj2xK/vfQ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JuYyZqKny34lSzuqqPqlE3agl/AzfNr+p5AgOuBIV6PWRS7VCtPh/zbw7PY+LwYPoFIA/uk/U8wPfn6/P9leAZCqDhZSokCBz21tucqIbBOfOkdqr8RkoYX1eA7tOh4iQ+DnnMllr0y3Vo/dFNAgnE+vHRPDEEgsq3ab0YQMhfo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=HC33c1Rn; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="HC33c1Rn" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=eBiHiyxpOrObyZU1UR4cIBSGislCQOpMdEhTpUbITdI=; t=1716570595; x=1717780195; b=HC33c1Rn7SBdWMWRwnIVyD409jLmtX3hHAvhPEZ1evQbd3V Y6jTIPFGTr97iqfVHfTiO07oTW3YvazxdTqzFnHorc3s22rx3UvKSpsnKhdIaBu/QK8LY02d9NNmF s/nrCVFCqSc17EycH1sTRxIQ/IhghxmQ061ENgDojS6NnCgtwmohqwzTZaOswn2EFGeFPJtppswMu Nab4Tkrx1Sl8Ay4eG8GcRWwGK7UMW8EXrTQhjN+XijSi24w2Hjsho4jdD9OsO0me4GtNuYZnGy0Ae fBrdMElEgVVWjezGTMABlN8B9u92zGlWTQUz/2+80x7DOuhg1qN9KcS6P4SwH2vw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQS-00000008Xuw-2LQK; Fri, 24 May 2024 19:09:53 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 41/74] backport: move backport-6.4 forward to 6.5 Date: Fri, 24 May 2024 19:07:53 +0200 Message-ID: <20240524190907.026bded40a5d.I5dea5fdff090dacf29f0d046dabf1d8259e08405@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Move backport-6.4 to 6.5 and add some adjustments from iwlwifi in kunit and thermal. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 6 +++++- backport/compat/Makefile | 2 +- .../compat/{backport-6.4.c => backport-6.5.c} | 21 +------------------ 3 files changed, 7 insertions(+), 22 deletions(-) rename backport/compat/{backport-6.4.c => backport-6.5.c} (65%) diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 210292509ac3..39b7ca476a3c 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -34,7 +34,11 @@ thermal_zone_device_register_with_trips(const char *type, #endif /* <6,0,0 */ #if LINUX_VERSION_IS_LESS(6,4,0) -void *thermal_zone_device_priv(struct thermal_zone_device *tzd); +#define thermal_zone_device_priv LINUX_BACKPORT(thermal_zone_device_priv) +static inline void *thermal_zone_device_priv(struct thermal_zone_device *tzd) +{ + return tzd->devdata; +} #endif /* < 6.4.0 */ #else /* CONFIG_THERMAL */ #if LINUX_VERSION_IS_LESS(5,9,0) diff --git a/backport/compat/Makefile b/backport/compat/Makefile index d55437d70ae7..30f6180b3dea 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -17,7 +17,7 @@ compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o compat-$(CPTCFG_KERNEL_6_0) += backport-6.0.o -compat-$(CPTCFG_KERNEL_6_4) += backport-6.4.o +compat-$(CPTCFG_KERNEL_6_5) += backport-6.5.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o diff --git a/backport/compat/backport-6.4.c b/backport/compat/backport-6.5.c similarity index 65% rename from backport/compat/backport-6.4.c rename to backport/compat/backport-6.5.c index af872e5de04d..a27306aa6a6a 100644 --- a/backport/compat/backport-6.4.c +++ b/backport/compat/backport-6.5.c @@ -2,10 +2,8 @@ #include #include -#include -#include -#if LINUX_VERSION_IS_GEQ(6,2,0) && defined(CONFIG_KUNIT) +#if LINUX_VERSION_IS_GEQ(6,2,0) && IS_ENABLED(CONFIG_KUNIT) #include struct kunit_auto_cleanup { @@ -45,20 +43,3 @@ void kunit_add_cleanup(struct kunit *test, kunit_cleanup_t cleanup_func, } EXPORT_SYMBOL_GPL(kunit_add_cleanup); #endif /* LINUX_VERSION_IS_GEQ(6,2,0) */ - -void drop_reasons_register_subsys(enum skb_drop_reason_subsys subsys, - const struct drop_reason_list *list) -{} -EXPORT_SYMBOL_GPL(drop_reasons_register_subsys); - -void drop_reasons_unregister_subsys(enum skb_drop_reason_subsys subsys) -{} -EXPORT_SYMBOL_GPL(drop_reasons_unregister_subsys); - -#ifdef CONFIG_THERMAL -void *thermal_zone_device_priv(struct thermal_zone_device *tzd) -{ - return tzd->devdata; -} -EXPORT_SYMBOL_GPL(thermal_zone_device_priv); -#endif /* CONFIG_THERMAL */ From patchwork Fri May 24 17:07:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673388 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 5E6D1376EB for ; Fri, 24 May 2024 17:09:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570597; cv=none; b=p3RqC23/fWWmLIN75wevsLvOV6t8zi0cYJoXsNJxVoSIgeuXuEalvPTBbMg22FEHjBQnOgqEMgCCBeGaKZP+cbkhFbQ7R92Q67VuAPt/Vioi6SSumrIkaPYu/zfBDa9aNK8piVn6j5TY1t5uoSbtye28qK3gJLyvE57k/JVo5Gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570597; c=relaxed/simple; bh=ru7FRx5T2zjARZdCfVoFaduHxf5hbZkxa7Ba9hvZnOo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tc9Yc/JFzmCBcvcjYtyscLMQpllW6ipd8y8A0oLf0SQXqbFoa8YAGZ/lX+dPDVaOCaArfaxOTvu59dhIGUIu6BirQRni+o0eGOuGvi9keEnH4Ai0fX6wNhMU2lj5DuXmWQA0NSBPNaMl4hmJM6jlWCefPCUmFINZh/M9THhTLmk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=xoI5Dh/e; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="xoI5Dh/e" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=McFCxiVt0ZpiC5jPSgjipyQWJG0zPtRBUrv6/5Xcq5U=; t=1716570596; x=1717780196; b=xoI5Dh/eFhafC+T+rGc352A5Ejx6tsH3jYkIOHkc2dC7zBp SLlgPHz+jNbJ28YPrXJScVFql7Vsd+5+JgyNEn83kbU8hykWZWGEDeMSbX1ZfS+6gbKEAo+IJLvxK Es2u8e4IhWiYgyNlYnv1FQfYARwrSBpQcUuEF1FGw735XuGEs6GNrkPqRMSpu2iyL9YU7FZbEMF8P WKrYPO1oZ/kK3IR0KSIi0h+UoUx2AqZ5S3Sh+tZKuqzjh3Dzo08nPCAyuVZ2gaHQCImX0Oph0Hb9R 2Th4pQaoqNwzuS+0agsTRxHNVI6bvQI0b+SqmkX5IKL0aI11UMv+rAQdY4ThVrBw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQU-00000008Xuw-1728; Fri, 24 May 2024 19:09:54 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 42/74] backports: adjust thermal APIs to 6.9 Date: Fri, 24 May 2024 19:07:54 +0200 Message-ID: <20240524190907.b25de3dd9bcf.Ifa45e067fb399ab7fe131a183c462a8a19b867a4@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit - for_each_thermal_trip was added in 6.9, backport it for kernel versions that are < 6.9.0 and >= 6.0.0. Kernel versions < 6.0.0 have the trips internal to the thermal core, so no access to it, on the other hand, the local (driver allocated) trips have invalid temperature values anyway, so no point iterating those trips, so added an empty backport for these kernels. - struct thermal_trip has a few new fields, add these fields and extend the 6.0.0 to 6.9.0 - thermal_zone_device_register_with_trips is no longer supporting the mask argument, instead we have: - THERMAL_TRIP_FLAG_RW_TEMP as a flag of a thermal_trip Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 45 ++++++++++++++++--- backport/compat/Makefile | 2 +- .../compat/{backport-6.0.c => backport-6.9.c} | 4 +- 3 files changed, 42 insertions(+), 9 deletions(-) rename backport/compat/{backport-6.0.c => backport-6.9.c} (79%) diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 39b7ca476a3c..942883dc1f40 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -14,24 +14,57 @@ static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return 0; } #endif /* < 5.9 */ -#if LINUX_VERSION_IS_LESS(6,0,0) && LINUX_VERSION_IS_GEQ(5,10,0) +#if LINUX_VERSION_IS_LESS(6,9,0) && LINUX_VERSION_IS_GEQ(5,10,0) struct thermal_trip { int temperature; int hysteresis; + int threshold; enum thermal_trip_type type; + u8 flags; + void *priv; }; #endif -#if LINUX_VERSION_IS_LESS(6,0,0) +#if LINUX_VERSION_IS_LESS(6,9,0) +#define THERMAL_TRIP_FLAG_RW_TEMP BIT(0) struct thermal_zone_device * thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *trips, - int num_trips, int mask, void *devdata, + int num_trips, void *devdata, struct thermal_zone_device_ops *ops, struct thermal_zone_params *tzp, int passive_delay, int polling_delay); -#endif /* <6,0,0 */ +#endif /* <6,9,0 */ + +#if LINUX_VERSION_IS_LESS(6,6,0) && LINUX_VERSION_IS_GEQ(6,0,0) +static inline +int for_each_thermal_trip(struct thermal_zone_device *tz, + int (*cb)(struct thermal_trip *, void *), + void *data) +{ + int ret; + + for (trip = tz->trips; trip - tz->trips < tz->num_trips; trip++) { + ret = cb(trip, data); + if (ret) + return ret; + } + + return 0; +} +#endif /* < 6,6,0 && >= 6,0,0 */ + +/* for < 6,0,0 the trips are invalid anyway*/ +#if LINUX_VERSION_IS_LESS(6,0,0) +static inline +int for_each_thermal_trip(struct thermal_zone_device *tz, + int (*cb)(struct thermal_trip *, void *), + void *data) +{ + return 0; +} +#endif #if LINUX_VERSION_IS_LESS(6,4,0) #define thermal_zone_device_priv LINUX_BACKPORT(thermal_zone_device_priv) @@ -51,12 +84,12 @@ static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return -ENODEV; } #endif /* < 5.9 */ -#if LINUX_VERSION_IS_LESS(6,0,0) +#if LINUX_VERSION_IS_LESS(6,9,0) #define thermal_zone_device_register_with_trips LINUX_BACKPORT(thermal_zone_device_register_with_trips) static inline struct thermal_zone_device * thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *trips, - int num_trips, int mask, void *devdata, + int num_trips, void *devdata, struct thermal_zone_device_ops *ops, struct thermal_zone_params *tzp, int passive_delay, diff --git a/backport/compat/Makefile b/backport/compat/Makefile index 30f6180b3dea..bb6fb57edc7e 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -16,7 +16,7 @@ compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o -compat-$(CPTCFG_KERNEL_6_0) += backport-6.0.o +compat-$(CPTCFG_KERNEL_6_9) += backport-6.9.o compat-$(CPTCFG_KERNEL_6_5) += backport-6.5.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o diff --git a/backport/compat/backport-6.0.c b/backport/compat/backport-6.9.c similarity index 79% rename from backport/compat/backport-6.0.c rename to backport/compat/backport-6.9.c index 7cb699fc0007..6ae485da3975 100644 --- a/backport/compat/backport-6.0.c +++ b/backport/compat/backport-6.9.c @@ -7,12 +7,12 @@ struct thermal_zone_device * thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *trips, - int num_trips, int mask, void *devdata, + int num_trips, void *devdata, struct thermal_zone_device_ops *ops, struct thermal_zone_params *tzp, int passive_delay, int polling_delay) { - return thermal_zone_device_register(type, num_trips, mask, devdata, ops, tzp, + return thermal_zone_device_register(type, num_trips, 0, devdata, ops, tzp, passive_delay, polling_delay); } EXPORT_SYMBOL_GPL(thermal_zone_device_register_with_trips); From patchwork Fri May 24 17:07:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673389 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 89ACA12EBD4 for ; Fri, 24 May 2024 17:09:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570598; cv=none; b=jrboxh820JQ5+iyI/nCysHmh0AGibkiA3GnbIK74VI3ruPQNRehls6LV+1qgdDnMVft2JLBd7SQyEZFhggou1Zfj5DrGJp5nr8oxZES/rSrcJRGHuPyJQJgsZUGeHDwrW1YOO2VG7rNZxP05HPM0yGeLsRkOYedooP6WxzMyStg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570598; c=relaxed/simple; bh=+M4/RmqbM2b5wUp1FoMkbx2xaslXEhbRInfCNxRcB0A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YXem2svh+RmkJh6mGi9+U7KrJjbaqppmOnooqAYlf69nr1umy+dvDTwXYbo5SE9uPPwJ+2DSuPFFVN40kk6arC9PYVCznBdQtQ095zc2g33LOokdFhEH9KQ9Scy78TWNqP9ZkWlaiV7Pigzv/OWcGtLY6Xwzp8VSQTbQ6vbf5Gc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=pf0bg6Op; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="pf0bg6Op" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=A3IpyZa4XFQyZES7QShs9kMX8AzIgMleuBRu72f21Y8=; t=1716570597; x=1717780197; b=pf0bg6OphtA1n1mhV3gQKD+IgO3qH5F540U/18OKUZiSOva MAd6BtEj5u0kbCq2l+yBeJ9kOYFxcXdpTsgr7Dhi1uWPlqEDP47FjAwh5NWV8qNfUNOqjlK3xt+0x O0XMUMjeoQQDeJ0XX7Tkzi5/sMCXPqPu/mdXfbjJ1IqV11O4d3IxjjOLd1KzUOx8EpQNY86bA7t66 tuiAcYuAdGpGpf/JsbTLEBhZ5GSKJe5FNpnzhtF2TPdyDSTnzaGkCctoHrPj/4RSdan4ch9grpMVP j7go6i5y2vvroWVCvTmMJ0A+rcQy9gC1N7mdVYj39CP9xbLpHhSo0SLpPZOH+ErA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQU-00000008Xuw-46xt; Fri, 24 May 2024 19:09:55 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 43/74] backports: fix thermal backports Date: Fri, 24 May 2024 19:07:55 +0200 Message-ID: <20240524190907.66a66be05882.I3d068f89b7527c0baecb7d320d1b80ef378fca61@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit - backport struct thermal_trip also for kernel versions 5.10-, to have the flags field. - backport for_each_thermal_trip also for kernel versions [6.6, 6.9), Since for this kernels we use the backported thermal_trip struct Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- backport/backport-include/linux/thermal.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 942883dc1f40..546caca8108c 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -14,8 +14,8 @@ static inline int thermal_zone_device_disable(struct thermal_zone_device *tz) { return 0; } #endif /* < 5.9 */ -#if LINUX_VERSION_IS_LESS(6,9,0) && LINUX_VERSION_IS_GEQ(5,10,0) -struct thermal_trip { +#if LINUX_VERSION_IS_LESS(6,9,0) +struct backport_thermal_trip { int temperature; int hysteresis; int threshold; @@ -23,10 +23,11 @@ struct thermal_trip { u8 flags; void *priv; }; -#endif +#define thermal_trip backport_thermal_trip -#if LINUX_VERSION_IS_LESS(6,9,0) #define THERMAL_TRIP_FLAG_RW_TEMP BIT(0) + +#define thermal_zone_device_register_with_trips LINUX_BACKPORT(thermal_zone_device_register_with_trips) struct thermal_zone_device * thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *trips, @@ -37,15 +38,18 @@ thermal_zone_device_register_with_trips(const char *type, int polling_delay); #endif /* <6,9,0 */ -#if LINUX_VERSION_IS_LESS(6,6,0) && LINUX_VERSION_IS_GEQ(6,0,0) +#if LINUX_VERSION_IS_LESS(6,9,0) && LINUX_VERSION_IS_GEQ(6,0,0) +#define for_each_thermal_trip LINUX_BACKPORT(for_each_thermal_trip) static inline int for_each_thermal_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data) { + struct thermal_trip *trip; + struct thermal_trip *trips = (void *)tz->trips; int ret; - for (trip = tz->trips; trip - tz->trips < tz->num_trips; trip++) { + for (trip = trips; trip - trips < tz->num_trips; trip++) { ret = cb(trip, data); if (ret) return ret; @@ -53,7 +57,7 @@ int for_each_thermal_trip(struct thermal_zone_device *tz, return 0; } -#endif /* < 6,6,0 && >= 6,0,0 */ +#endif /* < 6,9,0 && >= 6,0,0 */ /* for < 6,0,0 the trips are invalid anyway*/ #if LINUX_VERSION_IS_LESS(6,0,0) From patchwork Fri May 24 17:07:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673390 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 842E5376EB for ; Fri, 24 May 2024 17:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570599; cv=none; b=j6tsNYJh5mtZUELEeIP91rI+bgzdaU34a3EqHXxRTbUkekwO030k66mgR3HXPBOQCt6RBuQFe9nP5jeHGo+fIabW94yPjxM54/JEh+X1o0jTY5834jznlERwOI2Erdnk5J4fF3XCP2a47ZpdtK/ZT/LeuLNW0hIarTAkovw0juk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570599; c=relaxed/simple; bh=w4y1rGezzL7GZmSt/I5k67cOzQQtjQnA31gVGNDTHOQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dv5J4/qhH2aaJDP5pFK6UDsN2qxvpeVNEcHgb6s4aXaGO9waY7u59UHZHBC9paFssD4Ef7zORFXS5kOB+Z4R7agYT7pWXshw4vFZ2JQYSV9so8wZpMe5qEBdBatElENRBewKlC+UbYk52ou5E7Zppcd5XM8eimYlUKlyvb0DODE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=Bk0aJaPf; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="Bk0aJaPf" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=XB2cjudwaVJyWuv8TI5SFCK10AtKjr3niFVIwgzb8bo=; t=1716570598; x=1717780198; b=Bk0aJaPfXTIoBw7Nvr9oMTzwNNYeIIC3glCM/iOCacktSUI O9rsl3hRptbAf61msRSMFs4dwXqqvOMHBeV7SXpRUGNaFIcSYuBwcVoMDJMkU75biWIoVZz1qs7xb /bywWsQ0ph5rMW15/yY9FXDQmjFA930NPC1cB4O/aWFsYG43h/Hg0heUAd+33UVfPgnhaq4lSBZo8 A/5PdeAJATUP1mA0Vl2/WBxKuJSpA41GhyGf2X5gB1GvPUyQEWHwNd6x67Av7CR6he7Y35N8FMqmk /bG7+rQuODIPdANm/yn+v8yJ/ZLXgxuA3PzTHE7WPsHjQw5tZCAYpg8fodSaKhxw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQW-00000008Xuw-0kLu; Fri, 24 May 2024 19:09:56 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 44/74] backports: add virtio_reset_device Date: Fri, 24 May 2024 19:07:56 +0200 Message-ID: <20240524190907.c51e0f2751bd.I3dd09cc0b68e7a93e003ef10216ec310d74e80de@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg We need this for hwsim. Signed-off-by: Johannes Berg --- backport/backport-include/linux/virtio.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport/backport-include/linux/virtio.h diff --git a/backport/backport-include/linux/virtio.h b/backport/backport-include/linux/virtio.h new file mode 100644 index 000000000000..98c844918251 --- /dev/null +++ b/backport/backport-include/linux/virtio.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_VIRTIO_H +#define __BACKPORT_LINUX_VIRTIO_H +#include_next + +#if LINUX_VERSION_IS_LESS(5,17,0) +#include +static inline void virtio_reset_device(struct virtio_device *dev) +{ + dev->config->reset(dev); +} +#endif + +#endif /* __BACKPORT_LINUX_VIRTIO_H */ From patchwork Fri May 24 17:07:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673391 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 7529612EBC9 for ; Fri, 24 May 2024 17:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570600; cv=none; b=ICaeZTrlqIVKkDu50sNzFv+LfvjmU8cCewGSsHBjhW6C48hCL9LKds7b274yiSxNHU56lDYWBuvZsrPaagT6vPOZ04JacrObHJCv3XHfaL4KRJai0Aq2hT3c7v5lFQ3fMLE3pYSVK2xRjBgxXZLQR4SxCXAle4368aJW3eARe1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570600; c=relaxed/simple; bh=9m+auf4oFx2U+5E3r7e+l2nJtfHmHZEJZFYToWEEi7g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mwAQxdC+nSoIsU4Aw/RDu8KK6/VxH8HvILiDaF0LElesA1e5FbCIuydyFg0ymxaMMpBtCeStYV0TGfB6TUgzfFONlYTYJKzeT8Zy9tfUGk1SZlEoFLlR2utlEzzAsOWbrU6a3NER8vxxBFrPt5atqNVOSzhcaj5r8CehtvCHc0w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=oRgypaWa; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="oRgypaWa" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=hB4tzG7+OdnIh2wmiU4xChAubMFyVQvx1cDuvJl0xvU=; t=1716570599; x=1717780199; b=oRgypaWaNT1+dsVqVqoYA1qFPreHFdCaR/PPPnhh+C6//Hg m8+JjJBkezvPjsZGGLhkbr9JOFDE9noqL6KK3yFYvDoYgVCL1MaNE51xXGmIDCvqWfHx5o2ctz3NN JXSNsY7tIriaW/6hro07B2pCFNG6FrS5T23p0+xP5312KnHBgd1k/rn/e4fkiKx9kdEue7l54D7Zs Sw19INsfq/j0+JyJZIL8O7uPb55FO/QbKO9QrviaPaAJKignUvwwRGRu50YnQq78vF+YNaUPJf41N QzXU4V7JhaOyXjlchtkZky8UMnMvZI09Nx2doFe9l7p7ZZeuG3zL5LzksgTzJcfA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQX-00000008Xuw-0ctC; Fri, 24 May 2024 19:09:57 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 45/74] backport: add gso.h Date: Fri, 24 May 2024 19:07:57 +0200 Message-ID: <20240524190907.ed1b5fb658ac.I80bd589db6d0b9547dd434492f30b96c5439bcef@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman In v6.5 gso declartions were moved into their own file. The commit is d457a0e329b0 ("net: move gso declarations and functions to their own files") Include the correct file depending on the kernel version. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/net/gso.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 backport/backport-include/net/gso.h diff --git a/backport/backport-include/net/gso.h b/backport/backport-include/net/gso.h new file mode 100644 index 000000000000..f9ad9fc888b2 --- /dev/null +++ b/backport/backport-include/net/gso.h @@ -0,0 +1,9 @@ +#ifndef __BACKPORT_GSO_H +#define __BACKPORT_GSO_H + +#if LINUX_VERSION_IS_GEQ(6,5,0) +#include_next +#else +#include +#endif /* < 6.5.0 */ +#endif /* __BACKPORT_GSO_H */ From patchwork Fri May 24 17:07:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673392 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 02E3012F368 for ; Fri, 24 May 2024 17:10:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570602; cv=none; b=f0ysPHjhGYm5bXSzdbExb5xNkNdvWrY6o3DQQdLN2KCIQZua+2NlqmOvGIGnvOk6kl0YWmS2K/MqAdDgksmSCrMrlOeBBxvQ6pqi0/GJptMwYeUgs4U2zC9CYVEb4zF1Kbtyij4dLa/vdLu5Mp2/16lUaqzo0NIoBnvrEVACCpg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570602; c=relaxed/simple; bh=PIHsxp865AdLGUrIcU+XTaD9fz66OPOJWMjRB2Y+Ls8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oRtoHVdW/YNjAGnazeYlOqU0uCjvAmBasN03f3mAlI/VEuDWg3CiXVK1xxhA8K4udvmAZ7Q7K/2f3Q8Hm4iUk9TWzcluYxDX5l2UdS7/oLskZWgnzitkI9vcTV0nJ6uYxwIQvZQZOYsENKbtShyg7mMgpE5h873/f4m/QbHe7iY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=joCOEvGV; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="joCOEvGV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=b4W+STmQLXNKMoVznW9RPzBQCdllgJuGZO4Ga+3EcoU=; t=1716570601; x=1717780201; b=joCOEvGVr9nSy2ehgcF1wTlc+XMBOIuWIsus7asUCDunCt2 0T62HO+bi9D9seQx/vQ733DyL6GNY4mVTmgKqFgIw586nB8qg26Q5BPKcPTleZCG1dKBqQ2w7mt8R SQa3ik5vogxAy7tn4tX1qnuLMe1lL0y9UFV+l1PMaX6LUvojlIf3GURDAugQOjBwo1Db6jhkw6T/v YN+kH+Oqh4XG9YZrFGHDOG2C7s/vFAuRxkROnG7WxtWJpzQrF9bml6OGLZyXslYq8iNO7aYivGnb6 Z3WtLYUfu68uyyQNt+9aETOqQPTxBRdWScoNHhkZ468LWwGfoyGOhQJH0XJu0xag==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQY-00000008Xuw-0Im1; Fri, 24 May 2024 19:09:58 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 46/74] backports: add skb_get_dsfield() Date: Fri, 24 May 2024 19:07:58 +0200 Message-ID: <20240524190907.d09ab5d1bfb6.Ia5da0970fd85b5844c99eae51c822dbe1e4ec81c@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg That may also require skb_protocol() and skb_vlan_tag_present() Signed-off-by: Johannes Berg --- backport/backport-include/net/inet_ecn.h | 66 ++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 backport/backport-include/net/inet_ecn.h diff --git a/backport/backport-include/net/inet_ecn.h b/backport/backport-include/net/inet_ecn.h new file mode 100644 index 000000000000..df83d3e179ec --- /dev/null +++ b/backport/backport-include/net/inet_ecn.h @@ -0,0 +1,66 @@ +#ifndef __BACKPORT_NET_INET_ECN_H +#define __BACKPORT_NET_INET_ECN_H +#include_next +#include +#include + +#ifndef skb_vlan_tag_present +#define skb_vlan_tag_present(__skb) ((__skb)->vlan_present) +#endif + +#if LINUX_VERSION_IS_LESS(5,7,10) && \ + !LINUX_VERSION_IN_RANGE(4,14,212, 4,15,0) && \ + !LINUX_VERSION_IN_RANGE(4,19,134, 4,20,0) && \ + !LINUX_VERSION_IN_RANGE(4,4,248, 4,5,0) && \ + !LINUX_VERSION_IN_RANGE(4,9,248, 4,10,0) && \ + !LINUX_VERSION_IN_RANGE(5,4,53, 5,5,0) +/* A getter for the SKB protocol field which will handle VLAN tags consistently + * whether VLAN acceleration is enabled or not. + */ +static inline __be16 skb_protocol(const struct sk_buff *skb, bool skip_vlan) +{ + unsigned int offset = skb_mac_offset(skb) + sizeof(struct ethhdr); + __be16 proto = skb->protocol; + + if (!skip_vlan) + /* VLAN acceleration strips the VLAN header from the skb and + * moves it to skb->vlan_proto + */ + return skb_vlan_tag_present(skb) ? skb->vlan_proto : proto; + + while (eth_type_vlan(proto)) { + struct vlan_hdr vhdr, *vh; + + vh = skb_header_pointer(skb, offset, sizeof(vhdr), &vhdr); + if (!vh) + break; + + proto = vh->h_vlan_encapsulated_proto; + offset += sizeof(vhdr); + } + + return proto; +} +#endif + +#if LINUX_VERSION_IS_LESS(5,16,0) +#define skb_get_dsfield LINUX_BACKPORT(skb_get_dsfield) +static inline int skb_get_dsfield(struct sk_buff *skb) +{ + switch (skb_protocol(skb, true)) { + case cpu_to_be16(ETH_P_IP): + if (!pskb_network_may_pull(skb, sizeof(struct iphdr))) + break; + return ipv4_get_dsfield(ip_hdr(skb)); + + case cpu_to_be16(ETH_P_IPV6): + if (!pskb_network_may_pull(skb, sizeof(struct ipv6hdr))) + break; + return ipv6_get_dsfield(ipv6_hdr(skb)); + } + + return -1; +} +#endif + +#endif /* __BACKPORT_NET_INET_ECN_H */ From patchwork Fri May 24 17:07:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673393 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 0AAE712EBC9 for ; Fri, 24 May 2024 17:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570604; cv=none; b=cBSl/TeMoDyX9cDsYuWLJsVOx4Mgoc5d+ap20ad06HgQBhVqglJAd26NX5IDOA7qrFSfsRakAvFMY/39hzjHO84PTdMwfIO6ndwrRMuoShZHWbILksMwT8Cb6AQGApCijiXxyMsi7vw4DUKF+vPbh4drB2JPdmdWsPOpqlmqXdw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570604; c=relaxed/simple; bh=eNAlsFtBLJN8GIYFIKAlUeJFbibgfaM2jxkwVu9btRw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fHQOygcWZErPCq+eKIDCNcujg7AzlbPU1Ju/emaEh0oa93AXQS4CeJTJzq9WeOXkqB+wSLJvsx7fM+FT3PYd8g3pFbyol0gJ2IbFH9BAN8MPXU06i8dXXCnWLE6LPssAn9OWXzkruxt9BzbIr1FFaGIEmMflpNWNDuAbWegX038= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=aHv/1cli; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="aHv/1cli" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=BvaDh8vgujN2svh5YgrX2cn9r9LXYktqKNnmJQneUZ4=; t=1716570603; x=1717780203; b=aHv/1cliCXLrjVkqc3NntpVHjVNZsz64M8fhBKRgrLXtw9t BPtZzYHSuPqItBvDeYESbdd3NWFOSeRcR1fUmBAn1dn7nMID9fHxIq7gukVgSTLWT7OawG8UClqHE oZs3Laqh3I6xh3EtS/vn/6g8SlFrUC9x7+qm47vxAw3+Gaac+rM6hnOOrM09Qj7hT71GM8j1YuTtv kWdAU9/lky5wsV1GgKMqZlqQcBDNOrq6uFr+K4D+agKYXyy0cfWwh8XM2qohiCFtzZPCrtZtdtpY9 i7HxXQRgoSFgxmAYvEBa8/a+Zdum5eyCKPB31xhuuWvQfOl6wIZt7/ht1FYWNZ8g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQZ-00000008Xuw-2jLn; Fri, 24 May 2024 19:10:00 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Luca Coelho Subject: [PATCH 47/74] backport: implement NLA_POLICY_RANGE for NLA_BINARY Date: Fri, 24 May 2024 19:07:59 +0200 Message-ID: <20240524190907.84d051bc3c68.Ife595e2dc94955bda3d7d3089ec6a219fde272c1@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luca Coelho The range checks for NLA_BINARY are supported since v5.10. Unwrap the macros and introduce a new function to test type. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 31 +++++++++++++++++++--- patches/0097-nla_policy_binary_range.cocci | 5 ++++ 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 patches/0097-nla_policy_binary_range.cocci diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index ad5882347440..7192153b860c 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -346,10 +346,33 @@ enum nla_policy_validation { } #endif /* < 4.20 */ -#ifndef NLA_POLICY_MIN_LEN -#define NLA_POLICY_MIN_LEN(_len) { \ - .type = NLA_BINARY \ +#if LINUX_VERSION_IS_LESS(5,10,0) +// pre-declare all the minimum lengths in use +#define MIN_LEN_VALIDATION(n) \ +static inline \ +int nla_validate_min_len_##n(const struct nlattr *attr, \ + struct netlink_ext_ack *extack) \ +{ \ + if (nla_len(attr) < n) \ + return -EINVAL; \ + return 0; \ } -#endif + +MIN_LEN_VALIDATION(2) +MIN_LEN_VALIDATION(16) +MIN_LEN_VALIDATION(42) + +// double-expansion to expand _min to the actual value +#define NLA_POLICY_BINARY_RANGE(_min, _max) _NLA_POLICY_BINARY_RANGE(_min, _max) +#define _NLA_POLICY_BINARY_RANGE(_min, _max) \ +{ \ + .type = NLA_BINARY, \ + .len = _max, \ + .validation_type = NLA_VALIDATE_FUNCTION, \ + .validate = nla_validate_min_len_ ## _min, \ +} +#else +#define NLA_POLICY_BINARY_RANGE(_min, _max) NLA_POLICY_RANGE(NLA_BINARY, _min, _max) +#endif /* < 5.10 */ #endif /* __BACKPORT_NET_NETLINK_H */ diff --git a/patches/0097-nla_policy_binary_range.cocci b/patches/0097-nla_policy_binary_range.cocci new file mode 100644 index 000000000000..cb3b8be52b51 --- /dev/null +++ b/patches/0097-nla_policy_binary_range.cocci @@ -0,0 +1,5 @@ +@@ +expression MIN, MAX; +@@ +-NLA_POLICY_RANGE(NLA_BINARY, MIN, MAX) ++NLA_POLICY_BINARY_RANGE(MIN, MAX) From patchwork Fri May 24 17:08:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673394 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 BD5DB376EB for ; Fri, 24 May 2024 17:10:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570605; cv=none; b=UVT1BSONcDc54OuL4F9hf/mpyv3uTRgzzxjMJRu/WJ0xAoOHzuKnLRXgMWDhDWUgG96KJBJ/uzbkuQV3uKVxsdF3ODPP7NJ0oAShWtqkbilMNp+UcZynCe/xvgFHog9NcGwMarGjpPBZpUT3Am3X0zSfgdqnD+kfK3zWlXBVj0o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570605; c=relaxed/simple; bh=WLBwGoOdIzwet5Fxh3wSJ3ansCcoyq89Kwdooa+rcGQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tq8gzp7DRv2O2EnZV/tFdfTEgpUNpbeT4eZv2575k/ZLY4LfDm2sNR7sq/pXQlrkZN/tmZvnd2ak1sejwKjxySJkDx0IQmcnpu5e9kYYsX+BUBwn+CZYRSeLbWVGT3I4LKlvEJpPxG6SOYJ1I+zw17DwgNdRsNUpoD1X3AX4nuw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=ZRWWZ9nM; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="ZRWWZ9nM" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=MyC4/fdcNERU60iWG1YjsVcSFeO+6GOGNz6Jf8q0Ihk=; t=1716570603; x=1717780203; b=ZRWWZ9nM4D0MpOTEEka9W1k2NoamZMUdJwUOZhVHsqvoH1j 0tYZjTjAuPgw/31bERZj/CxBU562agn7G5VNa4pCkppflSfFccZr1/wzew8rMuaZ+VZ6jgYYawFR6 dUHU5twRob8e+AJuzp+XAidhxUCQT/zmVwqzjt+US2ir97U50Xi/d6rYFpuRLURaZOH7GaLSgmxJJ tZ9XUlvn5hMgEvVpQDNKHSR8pSda9tFuiC7auPxzqFj4P2GX47YRcdr27RCn2BZbYtjAz/lcfwMvp c4b336d8ThZdWc6nUYV45fyxTPJEXiyHsVIdsCZ8XtXyJFR9s8Oho5c4r7aErTJQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQb-00000008Xuw-2BYv; Fri, 24 May 2024 19:10:01 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 48/74] backports: add NLA_POLICY_MIN_LEN() Date: Fri, 24 May 2024 19:08:00 +0200 Message-ID: <20240524190907.6a342d68b754.I7e4b8c603be22ac6eee54cbc7b229d3b630f8498@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index 7192153b860c..61c266d58196 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -264,6 +264,8 @@ nla_validate_nested_deprecated(const struct nlattr *start, int maxtype, return __nla_validate_nested(start, maxtype, policy, NL_VALIDATE_LIBERAL, extack); } + +#define NLA_POLICY_MIN_LEN(_len) { .type = NLA_MIN_LEN, .len = _len } #endif /* < 5.2 */ #if LINUX_VERSION_IS_LESS(5,6,0) From patchwork Fri May 24 17:08:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673395 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 8D15712EBD5 for ; Fri, 24 May 2024 17:10:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570605; cv=none; b=QVvTnmwTTLpwjm8lyTd0Dj2NuRZD3DKOLewFfcZQ48wsmc5sQHf6j3LrRY1v0oJx5xX4YanW79vCXbTj5p2RFFKkEvqbyIWVOGKCphDtvsNoBbIi5gH4mKsZC8SUvs5w//mghRLlAuZu8U0MGMWtVVo9nGz4BHT/rMtS2QUFyx4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570605; c=relaxed/simple; bh=p/AcCRwmbXnn+XfLNofz3xk1kZfQgLxIVhWfv0vBDpE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ogKi+CJnM87ZekiZJTPRc7TXGJKyj2LM/UV8ClhF84GraSRL8VbXeS7/LySmfIvH4NNqCQQSyPGYOuvDYA0xaJ3To6yNOqNdSAmZqvQg7usqjk6/8Fwu0MTbEXVfRImhLeBAgP/kv/pdg0WircgOI5wKFPpcQpJXIxCDKK0B6JY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=C3VIBAZd; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="C3VIBAZd" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Yr/M8SmMqYdfCo9kKUKw7kZZEV3B3s7pii4ds6xskdE=; t=1716570604; x=1717780204; b=C3VIBAZdSlcZ4YKSnoUYQkgu9SIiQd0L730z6lczFYrK2Fw s0hgOvH99SQTyBS7+unhlSwjMlxTo8kI8kestZj1eVQP2uOo1EGTq4sQHkvqZJOxrfgLDTTAhEsxQ TQAclxNnxB0JQlO65IGi20LVUEOCdxwX26lqyXzhUDI+oPYcYzPlyg6XparTfjDIjsYf+LkpcNgTS bJLAUK1Q8ID9LpXI0TOBMj1woJ0fBai4Wf75wh8er5mqmbEvRH7WRYhyOW06NCRUheGaNQgvKEli0 NjVcG9legaAV7xY6FQB8bCmx3svgkkgNRLA/c6pRuOollG0s14pwXRdhRD+QGFjQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQc-00000008Xuw-1ZWw; Fri, 24 May 2024 19:10:02 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 49/74] backports: add netlink length validation for 13 Date: Fri, 24 May 2024 19:08:01 +0200 Message-ID: <20240524190907.8d9f88bca281.Ie5f51a2a3b67734956f49ea9c1e1091f60400cdf@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This is needed for EHT. Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 1 + 1 file changed, 1 insertion(+) diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index 61c266d58196..782c063b7a9f 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -361,6 +361,7 @@ int nla_validate_min_len_##n(const struct nlattr *attr, \ } MIN_LEN_VALIDATION(2) +MIN_LEN_VALIDATION(13) MIN_LEN_VALIDATION(16) MIN_LEN_VALIDATION(42) From patchwork Fri May 24 17:08:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673396 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 783E6376EB for ; Fri, 24 May 2024 17:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570606; cv=none; b=kWVh6LctDDi1JTr4Gd2gDHUvfNwFci8ounzsAz2DCF42WAymXRMedcTj1TjJfw3ZuyBSeyr+IBy9oOT6wceRLdX8n46p++BQQNPG9kcJoX0Au3+sZDnp8yn9L+mDtEZhjVXLHuiupR7Kt+BcklFEH1vALVZ04tEhIDqSB7OciMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570606; c=relaxed/simple; bh=e6c0JiVGjsMA3KCSwMuC6F39GvQI4cIiA6DFZ7ZY9y0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TfYewd80QWp1ZUeXuE5+LBBdoFtDpf75tKYQE/T2T3qMl0Q4rQJSSsoalbpIJlDSmaqPOqL3zi/pj19CG8+Vhm5B9ftx2+ilOi71iCQxaXkaqsfxHMW0q55o6Q1LfANyrZbUYZUHbEZ9tYgnfH5fm2UVoa9hReOEjhjxt1xIV8U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=wGoukIbn; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="wGoukIbn" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=19XpGuhuhY1sB91YsRknKR6ggp9MphhDINmpz9DkYdg=; t=1716570605; x=1717780205; b=wGoukIbnPjU/PbrKql+jCsdSkLFafOH3wtnnF3aAcCowYl6 qbSnfXJbNPYq0Pu8NuGUFpgWHMy8vTPmahdMF5UN+HKOYE/LbjHvogenXd13eF9A6kiRwGhWeaEDL buBnXRQO39xOmwQbtEKHnhauucH7Tler6KrNwZDIruKcch6pdsWtnE3IeTmm2S/abcnZjNaBrcq5j RYEHpGXJdlzSE3tXT5vTbAjOy1t9N9bDpttVCac7J8+mgBEcuMF8DjHmJxsuJMsiChIIZeSyJIl7N BhT34BpsQ3OlRhUWfqyMAtv3rZt9Ayt/7lKKDyFaI+wdpwF/lWzhwoVYGopHol5w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQd-00000008Xuw-0rEB; Fri, 24 May 2024 19:10:03 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Felix Fietkau Subject: [PATCH 50/74] headers: add __vstring and __assign_vstr Date: Fri, 24 May 2024 19:08:02 +0200 Message-ID: <20240524190907.67ec030e44de.I027a0b45d32f671a7eaa83ff3b6213978df4a4b1@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Felix Fietkau Used within tracepoints on a few drivers Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg --- backport/backport-include/trace/trace_events.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 backport/backport-include/trace/trace_events.h diff --git a/backport/backport-include/trace/trace_events.h b/backport/backport-include/trace/trace_events.h new file mode 100644 index 000000000000..fd6a4f3c343d --- /dev/null +++ b/backport/backport-include/trace/trace_events.h @@ -0,0 +1,16 @@ +#include + +#if LINUX_VERSION_IS_LESS(6,0,0) +#undef VSTRING_MSG_MAX +#define VSTRING_MSG_MAX 512 + +#undef __vstring +#define __vstring(msg, fmt, va) __dynamic_array(char, msg, VSTRING_MSG_MAX) + +#undef __assign_vstr +#define __assign_vstr(msg, fmt, va) \ + WARN_ON_ONCE(vsnprintf(__get_dynamic_array(msg), VSTRING_MSG_MAX, \ + fmt, *va) >= VSTRING_MSG_MAX) +#endif /* <6.0 */ + +#include_next From patchwork Fri May 24 17:08:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673397 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 915E412EBD5 for ; Fri, 24 May 2024 17:10:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570608; cv=none; b=LCH+uf4yAFiV1uP5YeeRozU6wQ9VgX+OhOQvJ+tigCoPCJchtGRp5VViLPdgulUOmsg8tgl5fRj6Up/OfznN5oxeAXS3HjwfqJ7hkSZJeF2gY+wyEk/4kyV7AUypuzBhxvfNCGlMtd7naE2bj/jIp+cu1nPVPTHHMq4Ozq6YkZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570608; c=relaxed/simple; bh=HyYtRO0WzrjnKiXyDREMsN0R07+QlRO0nJxtgISLFYc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E+9zWMM9K8fzNH28d8SyLcjkqIXjTTxbmmKvYKU2BAx6aEcYYWjjMkS80w9G2BMCKuF1nrjBObVDhUvCjRth41AlCZgjA0uqp83EZMYNgiPB/9Z5kR6NsPU9zQufiij/Eh9fAS4GTQdppg6Ehhkakpx69eTlaNugrwpFqaQ4Nl0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=ImN0x3wG; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="ImN0x3wG" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=HGjW7pwT5cSepVGOgqp4qpDZyIE6zZ6zN2ByGky97Lo=; t=1716570606; x=1717780206; b=ImN0x3wGj7096RV3S3TgTphaqEMbCV7Cff7v52MXXrGBAAH yHdFeWtnLOd3S9EZbOI8SHs9sF9gPch7H8uOKF1j5ExBzi5CquAT05X0cbXSPHSLOJ26aB9eH5Cs2 Kb5glApi4z3T7eBrVZ7MJK+BgEaK/ZgDiOQqXUvnzbS7WJHQtqv33KF/5u4Y0D0KcWNIny6hb7hKk dTvO3TiiUVAJSkYMQpNS8gb6ni41UXTimfFUS0Nipl4r+84zJ6YlTYp8iYknr2lk9eSe/Z0kRNpmC gapenDSjlny8ZolCVy7bLOjS4eObLcM3+F7ofm3jGdjxaes7/rM5NcQxHNz/7nNA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQe-00000008Xuw-0Iiq; Fri, 24 May 2024 19:10:04 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Felix Fietkau Subject: [PATCH 51/74] headers: backport napi add functions Date: Fri, 24 May 2024 19:08:03 +0200 Message-ID: <20240524190907.3b3d786abe91.Iea3af0a6245c8b6eb0a7b5ffa8e6cf76f6b48fc2@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Felix Fietkau Deal with the removed weight argument Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index ebc137a3bf2f..96d47811f7d9 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -4,6 +4,24 @@ #include #include +#if LINUX_VERSION_IS_LESS(6,1,0) +static inline void backport_netif_napi_add(struct net_device *dev, + struct napi_struct *napi, + int (*poll)(struct napi_struct *, int)) +{ + netif_napi_add(dev, napi, poll, NAPI_POLL_WEIGHT); +} +#define netif_napi_add LINUX_BACKPORT(netif_napi_add) + +static inline void backport_netif_napi_add_tx(struct net_device *dev, + struct napi_struct *napi, + int (*poll)(struct napi_struct *, int)) +{ + netif_tx_napi_add(dev, napi, poll, NAPI_POLL_WEIGHT); +} +#define netif_napi_add_tx LINUX_BACKPORT(netif_napi_add_tx) +#endif /* < 6.1 */ + #if LINUX_VERSION_IS_LESS(4,15,0) static inline int _bp_netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev) From patchwork Fri May 24 17:08:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673398 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 6F924376EB for ; Fri, 24 May 2024 17:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570608; cv=none; b=fcjVi8X5LXrBun7qNwYOemXHTzMk6K8hVHhfphgcZ+FvKDvDNBdFzMOt4vg2iydrkkIwJNFEWpeUXlxmNl2jT7qMg6aFSVBX6wS7lgSZf4w8bTRfxI3yovADhjsv05bytT3qQs3yQe1G61e6nXhoPF5XqztIQgnxveK+KLq5Sng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570608; c=relaxed/simple; bh=OW3iAN9wb5d8ilu7NOmjNcyQWPZk0n9TlcMIY1lmq7g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mqvuAFad6MIt/G3FK3OuvDSLZE7cJOqwVqjIP1JBa+bQC+W48K7gt6idPtA2PpAGp7MloR5Nw1/nqGX5jBz+GEulx4gPKnqQPX8h95Ukg/uDKjNgcpZoj8ck+0UbYYE7yWttVPGqasSo1sny+gkDbG5ab1UbyfFYNulVpgMxWLw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=fjwqwg24; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="fjwqwg24" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=fMhc6rpUDT+fcU2vOL/fNNcfE5GCSBivhQgJnE+BqjU=; t=1716570607; x=1717780207; b=fjwqwg24XEUTkRFva9oUn74bGRTKQTB9WdRPllTO5+MHBkj YUEyIYB8rSWq85CQ49jAJCAI15M2E2AJS2Gz9czHt9G07RWhTPvm8PldlFBqq6iqTH1y3n8senFa7 QhDRKqkPB38QyUvBNqcN3O1KgtlTy8MTAaCLFWFcnKKoUReAWXLWMG0vVraYSk+XCMuw6eiBgodnV v0Fnuk/sxUziw4kWD8PgyWPdO5p7DDScGb1qSoOEkLJj3IfIZnFu0w2KiSx+TaIESemCMDNYY43sH I4izhgeTD15WHYbsnPRRP/uhnd6dfIELbBUCUjqeK3OSiZ6ABGJXilWeQ+80lqsg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQf-00000008Xuw-0Kg7; Fri, 24 May 2024 19:10:05 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 52/74] dependencies: limit IWLWIFI KUNIT 6.3+ Date: Fri, 24 May 2024 19:08:04 +0200 Message-ID: <20240524190907.0891b535df6c.If5049905d5f73c7b0af9b6c5cbedb5f96afc0ab6@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit As before KUnit APIs doesn't exist Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- dependencies | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dependencies b/dependencies index 1377b1b6f9a5..43286ed18e11 100644 --- a/dependencies +++ b/dependencies @@ -34,3 +34,5 @@ QCOM_QMI_HELPERS 4.16 # QRTR ATH11K 5.2 + +IWLWIFI_KUNIT_TESTS 6.3 From patchwork Fri May 24 17:08:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673399 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 369F212EBFA for ; Fri, 24 May 2024 17:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570609; cv=none; b=OcG7Ojr4ZDn5yuJDW00BwYnZwNfJQomK4aO4Vz6o3N5c/vjNKY35VOjjyIA/5os1DBZX2K76Rf+PrEN79kLhkd/pnoUjaF0ffQwtdtt6/9Zws6VxBrzIZdKgkK19eiTowG198ahZyVIKtCFio2sMifbvya5axAx88FqfYpSixqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570609; c=relaxed/simple; bh=GUiMoVGEUIr4puvL88BqGLhvbgcd+f1K2+QLd3U1vxE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=csqX6JnKaTS9vLcc7NCjT7MWsFuZgypr6DBR3gNSmvkXXQ75fyoR089sVyHO83PhnqwAJihsps637yRMIq1TaPNrF10QLjtBqDqSxwsoKrgkWxMK6V/VOVUkANPf4bbSwW4/fIFxCE4KnG0YE2FVn9TWs1w6iSHUnGfP1l7xieI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=KxK1xb88; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="KxK1xb88" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=7AQfP8+6lkDc7Wej61Ot907Ajhh13fey3BozZ8P+SyE=; t=1716570608; x=1717780208; b=KxK1xb88JGS4G3ssmxIyI+VnjpvzmTzdnmLhy6YTVAGFXiL jeC17DUbiFVjsTHH35D/+TivsTzJICDM5iCV7Ttjdv26U/HUycXzlikPDFJxKvb9j+HrzJ+hmmhov vV4B7d2g1wo9CxB2J7gtPpFQ8tsxjnDWLVqbJ6I+c9WAg3Ucwmy/JyJ7NNpswOqIMjVnSaJ9hkuYn x+GYRp2ZY0b75z+zM8wfFN2azquoknfcoUkON9cWuzMoCKZmihcTjVdrSC3nM+jTNuSeMwysHmRPE DeG4NWNjcRpMFyveq4CTjY3a1IawGq2356fFhe2yTD4OL+XBGmHKJErzCZtO888A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQf-00000008Xuw-4AVi; Fri, 24 May 2024 19:10:06 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 53/74] backports: add napi_schedule() Date: Fri, 24 May 2024 19:08:05 +0200 Message-ID: <20240524190907.7a4b3ef2a400.I78f3e2b2279ed65ee357cf5f22cf5b339cc7e6a5@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman napi_schedule() was introduced in v6.7 by the commit 0a779003213b ("netdev: make napi_schedule return bool on NAPI successful schedule") Adjust backports accordingly. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 96d47811f7d9..319a1a4eff05 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -176,4 +176,17 @@ struct net_device_path_ctx { }; #endif /* NET_DEVICE_PATH_STACK_MAX */ +#if LINUX_VERSION_IS_LESS(6,7,0) +static inline bool LINUX_BACKPORT(napi_schedule)(struct napi_struct *n) +{ + if (napi_schedule_prep(n)) { + __napi_schedule(n); + return true; + } + + return false; +} +#define napi_schedule LINUX_BACKPORT(napi_schedule) +#endif /* < 6.7.0 */ + #endif /* __BACKPORT_NETDEVICE_H */ From patchwork Fri May 24 17:08:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673400 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 F0A6F12F372 for ; Fri, 24 May 2024 17:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570610; cv=none; b=XAZD8+bTPlkkw0/nbL1qsug4Obg6rxDBZC3TDWqRtSkmk5PZ/r34tAMMt8o8ZlFd2PFGxc18CtaRnErP+0ar2UIpcf2YB2Npno3fIL6z96dALTlgTuco6mGLyagcoLkze5W4NMn1oFiRVlmU2C535jTVdqhY8yPno4KWmF53A6o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570610; c=relaxed/simple; bh=hibKhqLab2U86tjFP8qI7wBrSA9fM1vDiWradYql2L0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oGWH55lJS3xFAaPrObBAce84sjGLtGBOIqOQd7Eumf/ZUCaZ+p71+AwSaJinvBAE1FtxkBm1fnuemqnFs5lXfSWXh/YHjGSv8rssiLoBH1tQiIZI6NqhU63A7Nz8jjrlcToSJF1ed4UCEjb+qBXOniPhqz1VTot3XrdNvTci/eU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=dBAsHDwt; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="dBAsHDwt" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=7TTy4r7QjyqqXP2TnNoyHk1Rs33TZcTEl/RbJiybAAs=; t=1716570609; x=1717780209; b=dBAsHDwtydfdDvaXnO+qPXZ+pf+Zn5m4qrgisWWqsYbFnui c/TtEkZpMw82+rgotWaKi4ixx5oUH0YqtshTOeLOavu9DthRSF37nIOI1M7eaZLwLORTcfQXPvwMA UWQ6HfjWOChQPuH5lSUrJyNi17+PdIxf1IZ9ZAF0p9lH0QCQx9bO26UBB1z40xYuKcuUrIx1nIFYx hRPJ3EdoupNYcpZFATo+qaUOL4JEPxeTiGILbHiE83xMiPVnWCoCBAZZVbmuOHFyTypnx3ViJLMhg tQbi9Ph2C5FrduuWAOy4/0E+urLmRYf4CKt3HExgTIIzqemBVubRvNyKAf4v1gZA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQg-00000008Xuw-3S9Q; Fri, 24 May 2024 19:10:07 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 54/74] backports: add netif_rx() Date: Fri, 24 May 2024 19:08:06 +0200 Message-ID: <20240524190907.99866985a48c.I4b1f5287579f615582a608782b8513f2f5cb374c@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This got changed upstream to detect the context to get rid of netif_rx_ni(), so just copy the new upstream version with the detection. Signed-off-by: Johannes Berg --- backport/backport-include/linux/netdevice.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index 319a1a4eff05..f720b7537f4b 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -176,6 +176,23 @@ struct net_device_path_ctx { }; #endif /* NET_DEVICE_PATH_STACK_MAX */ +#if LINUX_VERSION_IS_LESS(5,18,0) +static inline int LINUX_BACKPORT(netif_rx)(struct sk_buff *skb) +{ + bool need_bh_off = !(hardirq_count() | softirq_count()); + int ret; + + if (need_bh_off) + local_bh_disable(); + ret = netif_rx(skb); + if (need_bh_off) + local_bh_enable(); + + return ret; +} +#define netif_rx LINUX_BACKPORT(netif_rx) +#endif /* < 5.18.0 */ + #if LINUX_VERSION_IS_LESS(6,7,0) static inline bool LINUX_BACKPORT(napi_schedule)(struct napi_struct *n) { From patchwork Fri May 24 17:08:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673401 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 03BC812EBFA for ; Fri, 24 May 2024 17:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570611; cv=none; b=LRaywEyQJIA+OxK/xTjJ27UnJycB4jiRQIBRLXzico5invGoZlKisP8KTGdhOC5JtDNbPUUUwnzDB42L8ZKNLF3RhBy6Cn2C8AOQzgWxaZVDXPvEfupFihaUu4QPjSbRfp9dp9QKUDN/Uie2gEFIwu+C7JqFKoVmv3e6XYDJYsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570611; c=relaxed/simple; bh=toZ1z/BtLKqi5oNXn/Xv/a/0DrMWLpTu7uD1XNWSRTU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nqL9IdQl1MLJosnEh9aAkxwTV9YmXNQbwEDaOIJFU+P3QCSTZKflhvIUlVn7gho7RK0oghQcCrzBf8XjKF7Zj3yx5kabQg7yDLtjdw5nXt/AIqOB+W/yP9kmFhQT7Ve28OuJs0XLFwTpCwSlxgdaGdcC5SXhBDb+iV/QFALcgyY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=ij0D9IuG; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="ij0D9IuG" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=9tV7Mizb3KPc6TPa6k6rgR85OxUdBZP73Ms38pc89UE=; t=1716570610; x=1717780210; b=ij0D9IuGB2ynJKRYGqqlnqwMBT7Vr8j1O9Ese9SL3Yk651b 0OUFCXIc6cjgGI07Pd9GWvMvKqyDjYlvjA4N7aZbYYe4Aroh6lWYT5mY/OyqxVp79GjOCsY7rcdMx kX7seP13Jx7k6NT8fM4dFx4VRaxz9UqSBm87rYE9krRRMQUeLIQ4lVR3sBlobX6lB5lR7By7hQJJI IN6a3fNY7PZFei52BkCCgNu1RO8anHRxyzg45qQfi9THzwkOdlqDAycaoByV6NVZ6Gf4rr1s5UGQm 5fylBZoFrve0BemdFNB3mC1Dooa+8u8sNsYILCtGDezo7Bd4asPNy0Ehk6ZEm7gg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQh-00000008Xuw-2PGI; Fri, 24 May 2024 19:10:07 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 55/74] backports: fix get_random_u32_below() version Date: Fri, 24 May 2024 19:08:07 +0200 Message-ID: <20240524190907.c339801c1af2.I04c1d4108a0c85e5fd474af0fd1b3bc0f4127ba4@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This got backported to 6.1.4. Signed-off-by: Johannes Berg --- backport/backport-include/linux/random.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h index 89e9ce022505..f7a50dbc8dd6 100644 --- a/backport/backport-include/linux/random.h +++ b/backport/backport-include/linux/random.h @@ -10,7 +10,7 @@ static inline u16 get_random_u16(void) } #endif -#if LINUX_VERSION_IS_LESS(6,2,0) +#if LINUX_VERSION_IS_LESS(6,1,4) static inline u32 get_random_u32_below(u32 ceil) { return prandom_u32_max(ceil); From patchwork Fri May 24 17:08:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673402 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 2479512C47A for ; Fri, 24 May 2024 17:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570612; cv=none; b=HAn719xj9PpB9bJ32DETx3NwUOmmue3L9kTGiy+9Gh6DL5zT6HhdKF6HRKnXv7tym2lTae9Xny6Umg1EEHi2QydYF1zaaEaK9dgiBVtb8htZE8wkqCoPnQv3T8M1Y+9p8HAzcJUUQkr3C+4NohNwHTLNVVQwflAAw32inlhwi6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570612; c=relaxed/simple; bh=U8ElcQ/Ty7K104y7KEy3kTm6lwwI7OAbweHES1J9pag=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=owByXMSkW1u7Bqz5WNw82fWjTAuAqNwdLtOTKXBGfCNuVw5cdU10TbmPlKVFJrfbHNxlb8LmIOYfD1NwDWm03aiKvJKZza+fOM5hT3IFuLtgjdxgFV6pRcz82CN/uDwdgGifF9T4ACAGzQmLip0wy8tkA9wu3R6gL0uirPrhaP4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=LmFYVFSz; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="LmFYVFSz" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=XVdw+cmrK3/ADNCzEd70kk6gs617TufVVFlasQ2gCNk=; t=1716570611; x=1717780211; b=LmFYVFSzKkZ8ipcwuKsf4a4NwEOp8FhM6w0BclL055K/5Yj QXIj+xbi5Pm6wUtDzNJqjGBUtcE+2YscqN9GLxx0nj4v3DK12yQio+VR1WvSo9I4RGdKyBKvgRH1m qImkH10BJsvkfn0rsDRfHWupZA1gkGHPZi6xSxihM39Uxo/pcxlUNvc3eJj8cClmzYrOjHc/XoIgs Uwzqdnz7GuncoJPIjQ2VwMu0IUYMJ7VxICO5Z2U3lGLfysvImjz4iK5W/6E8E5wvMi8wjaOVEWfh6 Ddw3cXYXh76Sq84TruSJriOIyq7aJUD9XAzitKdcox6W2xkdYhvhTptB54KDQVOQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQi-00000008Xuw-2SfJ; Fri, 24 May 2024 19:10:09 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 56/74] backports: add ktime_get_coarse_boottime_ns Date: Fri, 24 May 2024 19:08:08 +0200 Message-ID: <20240524190907.88fd9eae961f.Id1c6b53e4c57d92eb838e4c09ef8042cd42f150f@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg ... and simplify the code while at it. Signed-off-by: Johannes Berg --- backport/backport-include/linux/timekeeping.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index 80c625569d6e..87744572bce6 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -6,23 +6,18 @@ #include_next #if LINUX_VERSION_IS_LESS(5,3,0) -#define ktime_get_boottime_ns LINUX_BACKPORT(ktime_get_boottime_ns) -static inline u64 ktime_get_boottime_ns(void) -{ - return ktime_get_boot_ns(); -} +#define ktime_get_boottime_ns ktime_get_boot_ns +#define ktime_get_coarse_boottime_ns ktime_get_boot_ns #endif /* < 5.3 */ #if LINUX_VERSION_IS_LESS(4,18,0) extern time64_t ktime_get_boottime_seconds(void); -#endif /* < 4.18 */ -#if LINUX_VERSION_IS_LESS(4,18,0) #define ktime_get_raw_ts64 LINUX_BACKPORT(ktime_get_raw_ts64) static inline void ktime_get_raw_ts64(struct timespec64 *ts) { return getrawmonotonic64(ts); } -#endif +#endif /* < 4.18 */ #endif /* __BACKPORT_TIMEKEEPING_H */ From patchwork Fri May 24 17:08:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673403 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 1EC61376EB for ; Fri, 24 May 2024 17:10:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570613; cv=none; b=MShjyzllbQCYsUrw7ItXv4v/KvSanuHP4asoIeqdR3njF3u5uzfTld7cxHkzeraspCKUK4cxR3MpGnlbHe7J9rFq6wssNfxJ7qmwCVpXW9ko6SRd2K06+UJiqR4/KPQgb6AoASXZV7UWZYAJsijkmwk8jqQ46C/O0r9u3JjYuts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570613; c=relaxed/simple; bh=hT25Sd6xY2QNKFCfKZHSINhSdiN+OONsYVIj1JGzVlE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BWfyrj0pfJkUXJhumHAlZwDlaGiJHDQRlrf/r80tGwvHfCDDjFHWN4Ko/lr3VhxT0cee/RQtCv5d2sQdWvAYF1GQnUvbTO+aH5vt/C/qcxG7AdNifOxRRq/xyd6G9qp1DBBX9vIuEeHj3bkky1lqGDkbA8VxO1lTyLlRHg55aHA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=D/1NHRn7; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="D/1NHRn7" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=F4GJFwnTGZZCfq3zL0scBXnrH90MLCdkrDpJcM+C/bQ=; t=1716570612; x=1717780212; b=D/1NHRn71mQ1mhy0wtkEsbgjiHo41bwGcgIRgxAeKt/z58G CLgwrTfubBhYgkCp7tpDIvE0iypNaQSOFzJLVf8t6oOg4+haKLlqQ/V3rCngY4/Dip42Z82qBfxM2 wInQJ20qHdnh6NyfPUjppQE1bR1DIIMyT7sy1GQTtVq4YRHv2lkzaPX8am4ocEA+IgFzVFKpDJozp MGO1zmMjVZmbX9fDDtiIDzSe96PsTPGSd/rb1AVOzicyVQDLhQ2/wyKzOlCSYtyoaEjpZV1u/GY8T GFYHKKZSTCOj3+5HgMGgjwCHEIwiKbgKXloiuUnQ3Ykw/tv0aTaCCV3SVptIS/jg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQj-00000008Xuw-2DRN; Fri, 24 May 2024 19:10:10 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 57/74] backport: don't call thermal_zone_device_register for 6.0+ Date: Fri, 24 May 2024 19:08:09 +0200 Message-ID: <20240524190907.6300b3433e5a.I8f204514c641d4a58039ec6aa00029c5eca9e13e@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit the backport version ofthermal_zone_device_register_with_trips calls thermal_zone_device_register, but this was removed in 6.6, and thermal_zone_device_register_with_trips does exist in 6.0+, just has one more argument. So for kernels of version 6.0+, the backported version can call it with 0 as the extra argument. Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- backport/compat/backport-6.9.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backport/compat/backport-6.9.c b/backport/compat/backport-6.9.c index 6ae485da3975..5a370756b75e 100644 --- a/backport/compat/backport-6.9.c +++ b/backport/compat/backport-6.9.c @@ -12,8 +12,21 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_zone_params *tzp, int passive_delay, int polling_delay) { +#if LINUX_VERSION_IS_LESS(6,0,0) return thermal_zone_device_register(type, num_trips, 0, devdata, ops, tzp, passive_delay, polling_delay); +#else +#undef thermal_trip +#undef thermal_zone_device_register_with_trips + return thermal_zone_device_register_with_trips(type, + (struct thermal_trip *)(void *) trips, + num_trips, + 0, devdata, + ops, tzp, passive_delay, + polling_delay); +#define thermal_trip backport_thermal_trip +#define thermal_zone_device_register_with_trips LINUX_BACKPORT(thermal_zone_device_register_with_trips) +#endif /* < 6,6,0 */ } EXPORT_SYMBOL_GPL(thermal_zone_device_register_with_trips); #endif /* CONFIG_THERMAL */ From patchwork Fri May 24 17:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673404 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 02DFB12C47A for ; Fri, 24 May 2024 17:10:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570614; cv=none; b=bCwJQcsTj/yefy59I2y+6ixgv5ryyl8vLlxRIDR9TFTDBjyQfMgdqWnYLg4av6hX08tMWbl9oW22ZM2L3kADP1bw5YELkP2CSkHknep7TCc5PMHh9CMIdEDRcuqW6wYk9+J5yHnlS7dUgolCCQcJvmLE8Cvw6nBalWkm2eSWuK4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570614; c=relaxed/simple; bh=UN/f0fIsuNvOLyZ6Z+2YDXPzoQCNv5zgFXL8lBL5zEw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AnSiSoSQafiHtrJQ4uXWKHdZMkboW3sCoRJRj3gqphn8kjhVGFirJ4Wth1g26Ax5JU2CDlxzM57DlinPJ6tXtEVjR+LL2MUVrh5idV6MutQ2UePC8uzzmBWUygLw2p8DnBhKTPbeBei1lkTZWcwoBFjex6ZfPrE71WPEMMFIx78= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=rTy/2lrq; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="rTy/2lrq" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=h88yLeRC3DtfWUgpIg/gKyj2W6ais/BgeODHPzyZdYU=; t=1716570613; x=1717780213; b=rTy/2lrqwxsGQmennbSbVrvxHbqnC5eXS65lKjKeu+tRFAm EfaKxDPh5omBLhWPLsMZlFTIXOyhKp+hKrdOOAhLZ8f9CJQFsvh7hflhb2Rc4hxd5QoufRfsSdhWV OBpxDsi6mrMcmAYDXSrnIqW2MKBvkTthu5XZcMkH8bM7BILCg/+TDZkKE65WLCoaCDztsdvII3pR5 6tlXHrAtj6ZnlyePPt0mVWuYfZbH0Mcvyfj9c85CZejHAbo+aP0Qzcfr9tpVnVAYJy8YurJFBJTps GsZZ8TEyUpLnkFevuFSwuTdtmOX/TtTcfI6IV39Vgm9RZ4NnGzY4oXaXvZ1UwGKQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQk-00000008Xuw-2ydL; Fri, 24 May 2024 19:10:11 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 58/74] backports: update x509.asn1.[ch] Date: Fri, 24 May 2024 19:08:10 +0200 Message-ID: <20240524190907.930613172730.I6785155fcf6c1b377312eb2fdabae3b422cc17ca@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman In v5.18-rc1 a few functions were renamed: x509_note_pkey_algo() => x509_note_sig_algo() algo_oid => sig_algo Adjust for this change. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- backport/compat/verification/x509.asn1.c | 10 +++++----- backport/compat/verification/x509.asn1.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backport/compat/verification/x509.asn1.c b/backport/compat/verification/x509.asn1.c index e68864b6a1f5..590154e21da2 100644 --- a/backport/compat/verification/x509.asn1.c +++ b/backport/compat/verification/x509.asn1.c @@ -14,8 +14,8 @@ enum x509_actions { ACT_x509_note_not_after = 4, ACT_x509_note_not_before = 5, ACT_x509_note_params = 6, - ACT_x509_note_pkey_algo = 7, - ACT_x509_note_serial = 8, + ACT_x509_note_serial = 7, + ACT_x509_note_sig_algo = 8, ACT_x509_note_signature = 9, ACT_x509_note_subject = 10, ACT_x509_note_tbs_certificate = 11, @@ -31,8 +31,8 @@ static const asn1_action_t x509_action_table[NR__x509_actions] = { [ 4] = x509_note_not_after, [ 5] = x509_note_not_before, [ 6] = x509_note_params, - [ 7] = x509_note_pkey_algo, - [ 8] = x509_note_serial, + [ 7] = x509_note_serial, + [ 8] = x509_note_sig_algo, [ 9] = x509_note_signature, [ 10] = x509_note_subject, [ 11] = x509_note_tbs_certificate, @@ -59,7 +59,7 @@ static const unsigned char x509_machine[] = { [ 12] = _tag(UNIV, CONS, SEQ), [ 13] = _jump_target(74), // --> AlgorithmIdentifier [ 14] = ASN1_OP_ACT, - [ 15] = _action(ACT_x509_note_pkey_algo), + [ 15] = _action(ACT_x509_note_sig_algo), // Name [ 16] = ASN1_OP_MATCH_JUMP, [ 17] = _tag(UNIV, CONS, SEQ), diff --git a/backport/compat/verification/x509.asn1.h b/backport/compat/verification/x509.asn1.h index 77ec6085ae75..10648630ade4 100644 --- a/backport/compat/verification/x509.asn1.h +++ b/backport/compat/verification/x509.asn1.h @@ -14,8 +14,8 @@ extern int x509_note_issuer(void *, size_t, unsigned char, const void *, size_t) extern int x509_note_not_after(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_not_before(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_params(void *, size_t, unsigned char, const void *, size_t); -extern int x509_note_pkey_algo(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_serial(void *, size_t, unsigned char, const void *, size_t); +extern int x509_note_sig_algo(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_signature(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_subject(void *, size_t, unsigned char, const void *, size_t); extern int x509_note_tbs_certificate(void *, size_t, unsigned char, const void *, size_t); From patchwork Fri May 24 17:08:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673405 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 18041376EB for ; Fri, 24 May 2024 17:10:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570615; cv=none; b=OC/7CmSTTV3NbfgiPncHz59DJP2VaNeSx+FyCm/AhDou3LFa6AnG83qZu3AsOSIewuBI6eV/3dSZmNTAVWG1ztS8fHcaxyslUDug/69hXU22VjTfTcm/VhGr1rJo3jYcSJOGck6AKpEymFRXMk1a0cxBYj3HD/AVYb/J6rRidfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570615; c=relaxed/simple; bh=pGMdygXej2Kig3KKgsfYZrZcNjvM94SKsXazWo3bIrU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UGpkomeWSoR3j0qVgsv6CgiPNnrN58RI4FB/Sl18bOJ3jjW7fMS4vhZMaURxC2oPJbCvk+UyxYcpNIj2i1D8dCk0d5IGTGFS7ootIbnfx0je/GnfUSE0YVOq5GciwtvIFnvnWUHW1zGe8XLKqjdzs3ZrBiNyh9YnkQ6qzrSsQI8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=i8uv7hA0; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="i8uv7hA0" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=LUa3IUWtgGbCKZH1aXnM0KxPyTVzPfD4QGeGpotr/4Q=; t=1716570614; x=1717780214; b=i8uv7hA0DiB9s2gkdWhJufTdD81r23yCh9JkaVtTYJ7C73/ XTppK1wvZde69J9N5eHE2gg8Dawj2RfJi1Lmi0PkKAAIlpJVsDeK/dGh3uE/wLXvYooLPrclo64Ez SUuy6AvPEYYVFl3fDBgRogc2FC1iVwUb2tCaFVzhJObtA8Gth3yktlijdnyPFHlZqiAIJfhvbJflR 7lQrTu7Sm+WlSfWPh8fzl9OiIBU6hqDa9bbvXKPSP5xKqCCQ3Y+BUcewvXfRDhoGAY3lOwTJHVFCO wpUILJT3rvssIcd+X+WwvT0go8tRHKot91MMlpkS41gTxPDAWkkn6/NsqMDEwsVA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQl-00000008Xuw-2VMD; Fri, 24 May 2024 19:10:11 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 59/74] backports: bpgit: handle copied files properly in status() Date: Fri, 24 May 2024 19:08:11 +0200 Message-ID: <20240524190907.9e6de8b13f7b.I0331054c4f3fad9d33b9e51228dabd6a28bbf8fb@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg 'C' as the setatus also has two files, so need to continue as well to get the second file added to this line. Signed-off-by: Johannes Berg --- lib/bpgit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bpgit.py b/lib/bpgit.py index c48640871982..ed3b236933d5 100644 --- a/lib/bpgit.py +++ b/lib/bpgit.py @@ -50,7 +50,7 @@ def status(tree=None): of the form ('XY', 'filename') or - ('XY', 'filename_to', 'filename_from') [if X is 'R' for rename] + ('XY', 'filename_to', 'filename_from') [if X is 'R' for rename or 'C' for copy] ''' cmd = ['git', 'status', '--porcelain', '-z'] @@ -70,7 +70,7 @@ def status(tree=None): cur.append(i[:2]) assert i[2] == ' ' cur.append(i[3:]) - if i[0] == 'R': + if i[0] in ['R', 'C']: continue else: cur.append(i) From patchwork Fri May 24 17:08:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673406 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 EE5FB12C47A for ; Fri, 24 May 2024 17:10:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570616; cv=none; b=WIFa/L7jUj+YP4RSFjP9GQCKf+msxJ48nbryixrT5M5u587lMiB0QBI5QYEhip4En8l02GMWt5k4nO93h7GOb5dE0xDghIHKppoa0dM/BZjaUFPaMcDP23GSoc35EVR/xHNt4WJCEGGcySGmJ1DM6qwwYoIAiU9qkBd7Ed4sSz8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570616; c=relaxed/simple; bh=hnIv8k7AGSMrRO0Lkc9hX0SBCEdV+wob1YQfq4HIM4U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UNLgBAO76ztGVeCi+T/5r75sHjTbz+M48/bIV3ZJdHSYPu5zFSHhIe8shUCWw5KjPcWJeIQfObE4ryAjttQqh/mr7ERQXgnMtacvmfl5MYFxvDh6qy+GA6KF4BWZvukP50e10RCXGrBTHxtho6I2qXgqx+ow79tIw3y+KK7tvUI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=R3mHWN8z; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="R3mHWN8z" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=ZeuvC6wIFo8nkNse/4fxCqWveHds8KWLJUsSSlSlaFQ=; t=1716570615; x=1717780215; b=R3mHWN8z6ig5EUIVFJLiqSQml3iE8OPSQgSFOymghvduvDJ hZquOEfUcYwtUqoPiwtCfHrrn51btnlwHjRu/eGfHSUYiYvsm40qGY0Wx/MUA9GiM3T/KA/hlM2ns L3KEb7JAwTqHZU2AziW6Juie9sBTHM5ezaurazTf1+PWS7K8rJp1BDxrvtzN/92F4LDOWbJw33tiP MkvhCUH4NXSl57VKdDz0mEUueVV8eYfXfyopxjFyKXSLcZUtGEilY54RGr5YlO8Jv3rA+U1zOg6hz nKMpnHqFBGnYIS1JjjtTZkX4oK7aunmzVY9C9upxq7gQjJFvagh6ZWMORTyrMu/Q==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQm-00000008Xuw-39TT; Fri, 24 May 2024 19:10:13 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Luca Coelho Subject: [PATCH 60/74] backport: update pv trace fixes patch Date: Fri, 24 May 2024 19:08:12 +0200 Message-ID: <20240524190907.2a42037697dd.Iad456095473d72f9fa005814c81b0b45be8e49a5@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luca Coelho One argument was removed from a trace, so the old patch was not applying anymore. Update it. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg --- ...ivers_net_wireless_iwlwifi_iwl-debug.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch diff --git a/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch new file mode 100644 index 000000000000..870aa41f7745 --- /dev/null +++ b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch @@ -0,0 +1,64 @@ +--- a/drivers/net/wireless/intel/iwlwifi/iwl-debug.c ++++ b/drivers/net/wireless/intel/iwlwifi/iwl-debug.c +@@ -69,13 +69,16 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ + struct va_format vaf = { \ + .fmt = fmt, \ + }; \ +- va_list args; \ ++ va_list args1, args2; \ + \ +- va_start(args, fmt); \ +- vaf.va = &args; \ ++ va_start(args1, fmt); \ ++ va_copy(args2, args1); \ ++ vaf.va = &args2; \ + dev_ ##fn(dev, "%pV", &vaf); \ ++ va_end(args2); \ ++ vaf.va = &args1; \ + trace_iwlwifi_ ##fn(&vaf); \ +- va_end(args); \ ++ va_end(args1); \ + } + + __iwl_fn(warn) +@@ -94,13 +97,18 @@ void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, + va_list args; + + va_start(args, fmt); +- vaf.va = &args; + if (!trace_only) { ++ va_list args2; ++ ++ va_copy(args2, args); ++ vaf.va = &args2; + if (rfkill_prefix) + dev_err(dev, "(RFKILL) %pV", &vaf); + else + dev_err(dev, "%pV", &vaf); ++ va_end(args2); + } ++ vaf.va = &args; + trace_iwlwifi_err(&vaf); + va_end(args); + } +@@ -117,12 +125,18 @@ void __iwl_dbg(struct device *dev, + va_list args; + + va_start(args, fmt); +- vaf.va = &args; + #ifdef CONFIG_IWLWIFI_DEBUG + if (iwl_have_debug_level(level) && +- (!limit || net_ratelimit())) ++ (!limit || net_ratelimit())) { ++ va_list args2; ++ ++ va_copy(args2, args); ++ vaf.va = &args2; + dev_printk(KERN_DEBUG, dev, "%s %pV", function, &vaf); ++ va_end(args2); ++ } + #endif ++ vaf.va = &args; + trace_iwlwifi_dbg(level, function, &vaf); + va_end(args); + } From patchwork Fri May 24 17:08:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673407 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 DD0DF376EB for ; Fri, 24 May 2024 17:10:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570617; cv=none; b=fOPSzFL/MkibdwbKy5fSupfPoFmQoXcg8HLIEhWUSzf1gDTWy0Hl7dRzdi1UIkXEm71P2Y8I+PAeEQv4Jf6a2y6hRr1Wa0G8jGizoNltfW3bCFWvh42mFLnfx8FRs1V1LEZOGPXmjepNx3+cMzEEwZP4hH+Liycqnnlai5CgpeM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570617; c=relaxed/simple; bh=8lsGNZsm9BTTFoEFKvGJyMPZG2BkQeFNDmiUnRROoXw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XTjIG3e8vBMxHdmcMklN/ZVgCNpW6CiW0zQYNV9KzGNrSnMXxlA0nT72/C/0gLUOoSE4RbfgGvVCf1EHDcwPEx984Ae5fzFNd/PGQcYvcVZ4jdpBdRBsFPeduRc6w3OswuokAC+pHHEIt23MZAVObz4ZT6Nq96RC5Py+WCjnNRg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=RBbqfkNy; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="RBbqfkNy" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=0fWBtYETDJPVJek9p3r279LY8ycaW08DEQjHogvsjMM=; t=1716570615; x=1717780215; b=RBbqfkNyi9xdcE8epN+yOaYALfV7sUfM7m0/HpiAsUaTvCO 1d/kdQGkNCA4otZh+N54oFLwjteRXXyYJlHvuIi+BR32GG8jz/rtphvPPGHHkGPnhOMtO7BdIn6nu Gji3iJ/duoH3TwtTUR2NDA8EXrhCHiiESHTLwZ3RBqVRuaLX3mlOcFn5/xXbexFGBeG4NJL7l4hl0 nltL4nsIzHog0MJTeowxWNnST3CEblhYa5Df69wf6LOJF1iL2pJzgZ+azabJMoZIElqRmmyaMIKIk CZQrm5MSgS0j8ie1cSWCaYBWwe1/GkyNH8RgX7arIC2AJBYduR+BQe6UqmK1RTlQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQn-00000008Xuw-2RoB; Fri, 24 May 2024 19:10:13 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Luca Coelho Subject: [PATCH 61/74] backport: update iwl-debug patch Date: Fri, 24 May 2024 19:08:13 +0200 Message-ID: <20240524190907.b3a28adeee11.I6eec7e271e27203f0c7bc69672d5d375abd61f9e@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Luca Coelho Some code had to be moved around a bit. Update the patch. Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg --- ...ivers_net_wireless_iwlwifi_iwl-debug.patch | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch index 870aa41f7745..e8f943f46395 100644 --- a/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch +++ b/patches/0018-pv-trace-fixes/drivers_net_wireless_iwlwifi_iwl-debug.patch @@ -1,6 +1,8 @@ +diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-debug.c b/drivers/net/wireless/intel/iwlwifi/iwl-debug.c +index ae4c2a3d63d5..339062da2917 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-debug.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-debug.c -@@ -69,13 +69,16 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ +@@ -15,13 +15,16 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ struct va_format vaf = { \ .fmt = fmt, \ }; \ @@ -21,27 +23,7 @@ } __iwl_fn(warn) -@@ -94,13 +97,18 @@ void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, - va_list args; - - va_start(args, fmt); -- vaf.va = &args; - if (!trace_only) { -+ va_list args2; -+ -+ va_copy(args2, args); -+ vaf.va = &args2; - if (rfkill_prefix) - dev_err(dev, "(RFKILL) %pV", &vaf); - else - dev_err(dev, "%pV", &vaf); -+ va_end(args2); - } -+ vaf.va = &args; - trace_iwlwifi_err(&vaf); - va_end(args); - } -@@ -117,12 +125,18 @@ void __iwl_dbg(struct device *dev, +@@ -73,12 +76,18 @@ void __iwl_dbg(struct device *dev, va_list args; va_start(args, fmt); From patchwork Fri May 24 17:08:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673408 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 C333612C47A for ; Fri, 24 May 2024 17:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570618; cv=none; b=rlQLkpKWJzoLUl9YpwHas9UL0kb/PAPNhYdXTMiNUKtc0XBJ7tN5ZBuvMsxqpyb5ZmE3PPD1gt2vhPPC8Dud5YR8CIr9D4jpwjt5IabRLMplKYljTspEKjhD+EV2ocbvgDhwEUlb8dt5wP9XuaEvHOgD1UPY5W9o8adb74nKlhw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570618; c=relaxed/simple; bh=MalQ4ztxdDjvtGhSd95byt99ldMxgJse8pf97tRKVhg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pH15z928T0aSAiPl9ylSIMNE6Xgp9WqtN4PkNg9ec0/OiJU4FIl4SlvYjXHqcBeKsIpkaY9O69xqkFZN8KSPF0FQPH4vVchNiW/+3s1F6jPHxBa3YyOOeZcWAk3bSoPbD+aslB2vdk/EYKvhy2kGwuhQBtLNwl93plqqgmGlldE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=H+71q4lb; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="H+71q4lb" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=x9tBYo31cMiQTEgoVxaV3LaPEtLHNp9dvGSL0pIPYNU=; t=1716570616; x=1717780216; b=H+71q4lbeIVY2DZwkXSXXooqV74wUXxM0BFU+E35p8raKLS 7+kI4oagISRn0M+UrJ5RJd0TmXXZLC8ExPX54FxWP6P51wqEAoUdTu2K63F2ukyvjW+FhKzHd8Fo1 p8k2rSta23zBIkzafmSNA6P/7iCknTZ4SruYMjJE9GAUfUGOCzFdiqFavhx9yZvtG7suOcmZuK0PF wokHAhRm0eFX5yT3xRpE3271Hx8G47Rx3KQOtuBtGQrNcr0j+LqMOVbs6UhDZ8v4me8tb6ays5de8 jPN4nhYyiPvil3tdDlILf1AMePCDBrs0PhyxqQt7HC/Ve12iyWw1VjrcFwmSvaoQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQo-00000008Xuw-2Eb3; Fri, 24 May 2024 19:10:14 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Miri Korenblit Subject: [PATCH 62/74] patches: fix wireless.patch Date: Fri, 24 May 2024 19:08:14 +0200 Message-ID: <20240524190907.e9041a963b3a.I5f73b4c554ca85dc817dc46a57f5d6ef09a3b562@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Miri Korenblit Due to new includes, the context in the patch wasn't correct, so the patch xouldn't apply. Fix it Signed-off-by: Miri Korenblit Signed-off-by: Johannes Berg --- patches/0013-fix-makefile-includes/wireless.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/0013-fix-makefile-includes/wireless.patch b/patches/0013-fix-makefile-includes/wireless.patch index 91bddf547b52..73fd53628f65 100644 --- a/patches/0013-fix-makefile-includes/wireless.patch +++ b/patches/0013-fix-makefile-includes/wireless.patch @@ -7,6 +7,6 @@ linux/module.h include needed for 4.11 till 5.5 #include #include +#include + #include + #include - #include "core.h" - #include "reg.h" From patchwork Fri May 24 17:08:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673409 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 0346686AD6 for ; Fri, 24 May 2024 17:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570619; cv=none; b=YzZSuiFQbGmNYiuwUS1Yodgq6e1av8ipfIwANx7ZId8r8KFtedpbjuUM7Fu3o7ttCI34/P98k2f44z7lpq7aeI45IeZWc8hYt06Q+0ivsYWShDA6USbjGTThKxJxwdRr6VIWYUegZNh0Si5ZT2zwPU+hFEjlsNiNOoqdEicAjso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570619; c=relaxed/simple; bh=g/sQAnLndmW0MKjbjCqBFNSToU45cQEnuCLPmdqeWxg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FuOz1qzt9Kg+mGA4C8GNnVlZxIKkx9qOQ1UO7+7Rgg7dZoFtHDv5MDra4h9rCgXVgccu9OWRZkEkVXGBVZid3+xLTr6O6FXM54p5r1f6mPH5WgzfWd/OXxNktBxSy1lmzStH51UeSdCiBduINt5EGiCmX0m/j4VntqwA28Sm0GM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=C6oFBpzD; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="C6oFBpzD" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=ouomGQfX6m3cakEzgsWojoSqlCCPi++TLp56wOT2SdI=; t=1716570618; x=1717780218; b=C6oFBpzDjCjSVWLchszMKK8/K1vZVYGI6mKHIIp7dh6MRl3 Gw45dcYQrNGf1hNPPTT96WrdlfD3LGl/BTOUCvmNd+ZEUJVRD2STTxyUSwD243Xwxx+UvhphLyQJn krSNOG0vlXIVwZZry/T0Zxm9GKUpW2TLtjqwdD77fowEZ5/ioSL/yhmzhdy9xZDniCYESzpOV5WPM jGFk6dFkIoOU57jUtDyuA3wJPOfvwn862DittPoqJuRnngI9mA0vfW9hJatHUhBgCLuswMMCP3EFE EcZsNyBTKffU0Oy18n2Y23TsSjAf2uLbkb1gLaUgu37qjciLo+Wz2ilt/GbOs1EQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQp-00000008Xuw-1fql; Fri, 24 May 2024 19:10:15 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 63/74] backports: update 0028-select_queue/mac80211.patch Date: Fri, 24 May 2024 19:08:15 +0200 Message-ID: <20240524190907.47b2dd588aa1.Ie02c93aec74e8fa7125a1620808a6093c23cdeb3@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman The code in net/mac80211/iface.c changed, commit 107395f9cf44 ("wifi: mac80211: Drop support for TX push path") removed the code referenced by the patch. Fix mac80211.patch accordingly. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- patches/0028-select_queue/mac80211.patch | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/patches/0028-select_queue/mac80211.patch b/patches/0028-select_queue/mac80211.patch index 64a397b96280..d2f2c8c13da8 100644 --- a/patches/0028-select_queue/mac80211.patch +++ b/patches/0028-select_queue/mac80211.patch @@ -1,27 +1,5 @@ --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -697,9 +697,21 @@ static void ieee80211_uninit(struct net_ - ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); - } - -+#if LINUX_VERSION_IS_GEQ(5,2,0) - static u16 ieee80211_netdev_select_queue(struct net_device *dev, - struct sk_buff *skb, - struct net_device *sb_dev) -+#elif LINUX_VERSION_IS_GEQ(4,19,0) -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ struct net_device *sb_dev, -+ select_queue_fallback_t fallback) -+#else -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ void *accel_priv, -+ select_queue_fallback_t fallback) -+#endif - { - return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); - } @@ -721,9 +733,21 @@ static const struct net_device_ops ieee8 .ndo_get_stats64 = ieee80211_get_stats64, }; From patchwork Fri May 24 17:08:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673410 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 DE16A12C47A for ; Fri, 24 May 2024 17:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570620; cv=none; b=PkomCK2ygiDzlHT+3czLOtg0nruPnC5y06lnK5WOjc1LOQFwVRqAUFheZwiPb8iOsIZSonK/eMi28BU0rEyLx2zINNd+IQBk+q+B6DTc0Xtqtxz69CHeTWEKfOEt8TCVH+euCrb2DFa06eLP96rrHHTlwFN0V0U6QYf5kwLNTqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570620; c=relaxed/simple; bh=a3EcHnjaYTjlametxJXYng9sDpQG4/FxkMcueJTqb8I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VnwMCeYC8oZXo0IZDg1SA8w0p0iS3Ft6P8zjrHHL1pCl8HGPAbhAKJFoxwRjqmtVaEwYdW0pNOE9MF85XftrNHx2jbVugbdOyI5/olpIgZv2BaxjQ0MnNxOuTg3xTNSkXio2RoWZ+qnbuzQLSH5sJlJ9O2s8vtxmqj2jkLQEOSU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=O8+h2UEx; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="O8+h2UEx" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=axNx95e70acUJdskieHh/6daSMg3DNv4y3k95yPP7hM=; t=1716570618; x=1717780218; b=O8+h2UEx/qhOV4tGpMaf4m5/LOHxKbwZoHTHS8ejhDEhr6t CyKYgB4piZ22rnRg8yldxQXoP1q5RikLyOtTkdN1ktgboHJrdU95P4nAca+itNWtLw3LhGio5YZGh 30OVxqN60Q+en3HbKYJcGZfWXrIrzxAwxN4OsCTvSAp8PBzw4h5kbr4cY02LOpjRCtx3nRL2QPKwr YhktY2uGzZNoqONLFsGJTYkZequ8dcZikbBWT2jmlcb6ZuvKO90vFI/vAn8htixjbMVP2qceR0oQs yhRDjA8Wro5lDvJFuev4gfSY77M1iaCsatZPiV15JESam/IlrJSIXGI9xo0Iwrew==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQq-00000008Xuw-26UC; Fri, 24 May 2024 19:10:16 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 64/74] backports: update mac80211-status.patch to v6.0-rc1 Date: Fri, 24 May 2024 19:08:16 +0200 Message-ID: <20240524190907.6745cb611740.Ibfa4e1ca7cb70dcc4c687b543e379b40343de1ef@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Update for some changes in struct ieee80211_tx_status. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- patches/0097-skb-list/mac80211-status.patch | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/patches/0097-skb-list/mac80211-status.patch b/patches/0097-skb-list/mac80211-status.patch index 04d1a6af9457..7edff7f7ede4 100644 --- a/patches/0097-skb-list/mac80211-status.patch +++ b/patches/0097-skb-list/mac80211-status.patch @@ -5,12 +5,14 @@ support bulk free") makes use of the list attribute in the skb, but this is not available in kernel < 4.19, use the sk_buff_head instead on these kernel versions. +diff --git a/include/net/mac80211.h b/include/net/mac80211.h +index 47642b020706..1abda970a6e6 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1137,7 +1137,11 @@ struct ieee80211_tx_status { - struct ieee80211_tx_info *info; - struct sk_buff *skb; - struct rate_info *rate; +@@ -1178,7 +1178,11 @@ struct ieee80211_tx_status { + struct ieee80211_rate_status *rates; + u8 n_rates; + +#if LINUX_VERSION_IS_GEQ(4,19,0) struct list_head *free_list; +#else @@ -19,9 +21,11 @@ kernel versions. }; /** +diff --git a/net/mac80211/status.c b/net/mac80211/status.c +index e69272139437..549d50aac4b0 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c -@@ -1060,7 +1060,11 @@ static void __ieee80211_tx_status(struct +@@ -1075,7 +1075,11 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw, */ if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) { if (status->free_list) @@ -33,7 +37,7 @@ kernel versions. else dev_kfree_skb(skb); return; -@@ -1210,7 +1214,11 @@ free: +@@ -1228,7 +1232,11 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, ieee80211_report_used_skb(local, skb, false); if (status->free_list) From patchwork Fri May 24 17:08:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673411 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 CD8C286AD6 for ; Fri, 24 May 2024 17:10:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570621; cv=none; b=UjUPdpBnCVKAogNo1GkUa6d9dMUPmd0vYdEVqmj3ZmHVWbvxnKxn9HjceDAch87+ivp8J1hMNNvyoUuOkR1DQpV88MFAHl57LL5RgJclNd7CdP/WpcWeDA+zmowpEDFo0A4/eJ/amNAcrppxfvsVD84Tfj9tpWQ2TlgFtvo16HM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570621; c=relaxed/simple; bh=8g29JsbVzhBZGGAdgAE0nra5qs3jBONPsBdLYZZaeEs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KOs3/9ZVHYjDx77+e8KVuf12b2XyCXRfwjefCi64pJF8wKnpxmCNva0nQdCltjJrSW5Gp2CJ1hHVzHYcOO36AQKQPz//bCotIYnb8G62Ew2R0A3ikyAi/1QyXliPDAO51iXN5pJ5uwgH1B6ZrhIU/WyVTnyCMPYaMI5Wh2PAOxo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=PBNR5HIT; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="PBNR5HIT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=gP2bdSlYRyM+hmYMUCHWNTN86uLOTGJ+uYUnWZt4LuI=; t=1716570619; x=1717780219; b=PBNR5HIToyVaF3EJOz0IBO8ipRd0Nap8HK8maxJFewyRa7Y fAPzFu58nmLO7e5g97nI6+5vaMiIFWjUMlyd5KfpIcYDVhd80KA2MhnGcyHH+lcH5ioAizlkxuQUb TJLfnKLXn/92BmwmqxkuA7ifrTNwaRFBieUYJw21aZbTJnIJ7r3/pGqskheZZZCrMMXz2UpMI0ePE K95NX/Klpfp25KODaqfJ08LWGhJinvuKw/0vDSPF2VxylbZGM9KsV78iYYCCer80l7oHbrqNtOoG9 Ie75nvKYrEYJCLjRWOe4kUhFdpo3+Pf89Jk0R3nf8MDFcCJCRTgsGAWcRi5wO42w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQr-00000008Xuw-2HM1; Fri, 24 May 2024 19:10:17 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 65/74] patches: add spatch to adjust to changed ethtool ringparam API Date: Fri, 24 May 2024 19:08:17 +0200 Message-ID: <20240524190907.3b62f721f5c4.I18f41541a5b4c6f8285a78d32203e6dbc35a5105@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This changed in 5.17-rc1, so add the necessary ifdefs via a new spatch. Signed-off-by: Johannes Berg --- patches/0106-ethtool-ringparam.cocci | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 patches/0106-ethtool-ringparam.cocci diff --git a/patches/0106-ethtool-ringparam.cocci b/patches/0106-ethtool-ringparam.cocci new file mode 100644 index 000000000000..b131d52039ca --- /dev/null +++ b/patches/0106-ethtool-ringparam.cocci @@ -0,0 +1,45 @@ +@set@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .set_ringparam = fn, + ... +}; + +@@ +identifier set.fn; +identifier dev, rp, krp, extack; +@@ +int fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) + , struct kernel_ethtool_ringparam *krp, + struct netlink_ext_ack *extack ++#endif + ) +{ +... +} + +@get@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .get_ringparam = fn, + ... +}; + +@@ +identifier get.fn; +identifier dev, rp, krp, extack; +@@ +void fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) + , struct kernel_ethtool_ringparam *krp, + struct netlink_ext_ack *extack ++#endif + ) +{ +... +} From patchwork Fri May 24 17:08:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673412 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 BB46012C47A for ; Fri, 24 May 2024 17:10:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570622; cv=none; b=U/p1ZvEbFTSgraZu7imvkb8p0vxWCpD4Gjd/pcplZrK1Ot1GzrZ5UOsmhQPKIPS6vIu8QVqGgVEJEwMif7v1TBrOIkcQFYL3WoO1tA8ll3w91kFhB5yszGjSzttdMnY+UcGRNafRNHoNJDVbO/R/ug4o1uL+16V1/bmytB1raeU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570622; c=relaxed/simple; bh=xs/Ljy2zyKBhQdUeM6FNnjAmEvdE6J84L1C2oW7GN18=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JoO4Evy9Bez8F+HVwDLLX2AX5ZyfVM37hkCasRPICyKMUcVToBLbDKLuO9OgEEFDY+XO3BDIBbi7RXNuokmMtvMOZzHgcCQQmYzpF0xEiD0rRRt9I4zaqqVxkY11TSFXuRfDSOt2X9qzikn+snC/wQysh/jbAycc46EZwcss4kE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=pI2lQyLu; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="pI2lQyLu" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Sth4Riskf5zLmWEO/C24qJmnGMYeWnWc+PSkRAjJrzc=; t=1716570620; x=1717780220; b=pI2lQyLu7Os3/m3hKUiXr+raxCE1QByaEsqWAEBSjq8hiJp xxbhwbpxpyPNZmF3XSxvLiXTz69Y7iMWFrwxYnBjL2tvrie1Hs3wznzANVZWyNQm/WUuIO9zkGcXy 1O7DRGQxTusGvm7x6FosPG5/aUq5DB2TXiyilt2hhL/xXY6goMRaKaBQ28mZNFOuY0XMLik+/g/0U e6LGH4m2XqNVir8yKjoFEJvkOMCUpYMVOood6QfMVLYeQHIQhY25JVAycXN4Uu0mrp9lf3gIrWdPd 3TLKVyfQ7f+Qgm3ZXab78WMWLAgiRWTartymfj1WG36xRy2d8gRmKSnMGVtwRSYg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQs-00000008Xuw-1qWu; Fri, 24 May 2024 19:10:18 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 66/74] backports: add split_ops to nl80211 Date: Fri, 24 May 2024 19:08:18 +0200 Message-ID: <20240524190907.dad1104c296d.I98da0a61961b922d5bd507d894c5cd9b3086df66@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- patches/0109-add-genl_split_ops.cocci | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 patches/0109-add-genl_split_ops.cocci diff --git a/patches/0109-add-genl_split_ops.cocci b/patches/0109-add-genl_split_ops.cocci new file mode 100644 index 000000000000..02b8809a0003 --- /dev/null +++ b/patches/0109-add-genl_split_ops.cocci @@ -0,0 +1,43 @@ +@pre@ +identifier fam, f; +@@ +struct genl_family fam = { + .pre_doit = f, +... +}; + +@@ +identifier ops, skb, info; +identifier pre.f; +@@ +int f( ++#if LINUX_VERSION_IS_GEQ(6,2,0) + const struct genl_split_ops *ops, ++#else ++const struct genl_ops *ops, ++#endif + struct sk_buff *skb, + struct genl_info *info) + { ... } + +@post@ +identifier fam, f; +@@ +struct genl_family fam = { + .post_doit = f, +... +}; + +@@ +identifier ops, skb, info; +identifier post.f; +@@ +void f( ++#if LINUX_VERSION_IS_GEQ(6,2,0) + const struct genl_split_ops *ops, ++#else ++const struct genl_ops *ops, ++#endif + struct sk_buff *skb, + struct genl_info *info) + { ... } From patchwork Fri May 24 17:08:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673413 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 0BEC412C47A for ; Fri, 24 May 2024 17:10:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570625; cv=none; b=Wtl7Y5uFByos1uIJpRBXH2ZShJcHenkUQlRhdJX929qjJu+Ll3mJW1ggWg/F6vYLMoFCEApXgH1zZvlyr4Xo+FkyZ7//+TbCj0JxpjdlDSVI97SBTgF4rGI6bVh8RB/icKnyi4uHAYxQef7p1YHC+ENlNvUz0aRXVmRT0SqTGzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570625; c=relaxed/simple; bh=AWCV0erSnlqpa5+vQbRhqn2H3AUsYDJQWNEH6y0uiQ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uOWzZBG5+QTE888WIjdN9TlAXAHdaDLj5rr4BZVGFNqe08LJiwMWUPXE9mmYV+8GjFVlszBOvQ9tz7/xl0CuSzWW+s/ofEF8JIZjrkuyCQljSXf3q0tBFm45r1DbMDrO9vSXaYkeL3NMNk4HDAk++U1FVP4T3wZrcndwgMueoRQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=s1c9eZhY; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="s1c9eZhY" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=mjSQCEe+NnZdrSV7Yxblqc9SUYfGRDoO4H/mr7HiZ88=; t=1716570624; x=1717780224; b=s1c9eZhYGWB4fUw+ZzSWMPN5E7htfG6BTyJHnAD/awp3REa +2Jwy6ifM5yC1V7M4d/2NmlW6P+Yy9ovS4a2Qy1UiAKmD/jZnpKjamzenExeY+uU+hS4FP1k33ptO +f8h5bg1Q4o2spr+8B1741MNoe6hE4wVAZNj9zfTolKBWGVEXn0eNz/0DznLQCzzvxD8SfOk4TqVr 6qHxtSFa5M2d6sR917AYiF3OgRTTGEGxepKeO1HFnTH6gib8zioK37mnEOz9UCqJ19F+QJ5ya2dWb ZhAwHuYiBsCHEd9on4+ce0F1hms9or6aBz0omFu2hj2K84hoH0m5DyYGl2PV87MQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQt-00000008Xuw-1heW; Fri, 24 May 2024 19:10:19 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 67/74] backports: adjust timer functions Date: Fri, 24 May 2024 19:08:19 +0200 Message-ID: <20240524190907.255814c64761.Ief3d26a0ae877775fcb4e01a107439581918ec84@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Partially adjust to commit 292a089d78d3 ("treewide: Convert del_timer*() to timer_shutdown*()") Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- patches/0110-timers.patch | 48 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 patches/0110-timers.patch diff --git a/patches/0110-timers.patch b/patches/0110-timers.patch new file mode 100644 index 000000000000..70f98e5bdf00 --- /dev/null +++ b/patches/0110-timers.patch @@ -0,0 +1,48 @@ +diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +index 48e7376a5fea..0781dd07a377 100644 +--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c ++++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +@@ -371,7 +371,11 @@ void iwl_dbg_tlv_del_timers(struct iwl_trans *trans) + struct iwl_dbg_tlv_timer_node *node, *tmp; + + list_for_each_entry_safe(node, tmp, timer_list, list) { ++#if LINUX_VERSION_IS_GEQ(6,2,1) + timer_shutdown_sync(&node->timer); ++#else ++ del_timer_sync(&node->timer); ++#endif + list_del(&node->list); + kfree(node); + } +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +index 69634fb82a9b..00125b8143a8 100644 +--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +@@ -2835,7 +2835,11 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, + + /* synchronize all rx queues so we can safely delete */ + iwl_mvm_free_reorder(mvm, baid_data); ++#if LINUX_VERSION_IS_GEQ(6,2,1) + timer_shutdown_sync(&baid_data->session_timer); ++#else ++ del_timer_sync(&baid_data->session_timer); ++#endif + RCU_INIT_POINTER(mvm->baid_map[baid], NULL); + kfree_rcu(baid_data, rcu_head); + IWL_DEBUG_HT(mvm, "BAID %d is free\n", baid); +diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c +index 3b81e6df3f34..29c0dbd1b6c2 100644 +--- a/net/mac80211/mesh_pathtbl.c ++++ b/net/mac80211/mesh_pathtbl.c +@@ -512,7 +512,11 @@ static void mesh_path_free_rcu(struct mesh_table *tbl, + mpath->flags |= MESH_PATH_RESOLVING | MESH_PATH_DELETED; + mesh_gate_del(tbl, mpath); + spin_unlock_bh(&mpath->state_lock); ++#if LINUX_VERSION_IS_GEQ(6,2,1) + timer_shutdown_sync(&mpath->timer); ++#else ++ del_timer_sync(&mpath->timer); ++#endif + atomic_dec(&sdata->u.mesh.mpaths); + atomic_dec(&tbl->entries); + mesh_path_flush_pending(mpath); From patchwork Fri May 24 17:08:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673414 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 69D6686AD6 for ; Fri, 24 May 2024 17:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570626; cv=none; b=TZcO/ao6ZKtW1V2XL8Uv1qRK1+J1AAhGvRDSpMxbgXvofPl2qqP8OPeJRZHoopqVFspdCuIlTVfnbSWREFg3LOBwif9qoLysW3yv8cMyb8XCI48gjPab0EpTrjueCSOfO/fqaY65FEX1vwlEL0nRa3J+yMCINlXC7Bvp4GH3KrY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570626; c=relaxed/simple; bh=O1CppV8ZKuYkaBuBE7elQCibNoKJfowNPR0I74mHc/o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AIfEutwhpfREx/gZ8XmHGQ5QBxw61X/ieV3dfhkfHWxU43RE6WUyblW0h1oBIGQ3DhFCCx8oorGxwkmwXqq0kDLanC3HUV3tup7VZ/Sg7WsiFmPOEQglLlu/9yRayFITcEOOKVN+q2g4O282KX6zhf8EUNAyb19l3FVnXKHz6+8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=YHRECgLV; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="YHRECgLV" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=W9nm41t5muWeuzQIifuM8sjx5QDLFEelwiauFMpmioA=; t=1716570625; x=1717780225; b=YHRECgLVhnELsfUX3yEvP0dWkUhS3Uz62tybr6OsaNvBkOJ tWOnWmSSpSxrChjRaqqvpdruhjd9Jx9cnqKYv0IHw9VQhThbKm73WjLLiaiq+0KslN9r2yIpUeV1W Wa4Akx3I9vO80vm6mFegUYaawPFmVOL70RhdU3Jp1/CUdlrQEyIdCz6VrvmTwUHPJvFA+YnZ/MCvO GTxbljtBJBvMhK8ItZO8bymoWz3xRZnnim+LKhoJjbXaxhn9OPYYOoVfVwhR1cpM45fK9F+mvJkpm iX6Y9t2AwwXcYSHVS0XSVvYBxmhcpIilrJXq8RTKM6fkm+YRpyU9m71eSo6qejJw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQw-00000008Xuw-2cuj; Fri, 24 May 2024 19:10:23 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Gregory Greenman Subject: [PATCH 68/74] patches: adjust verify.patch to v6.5-rc7 Date: Fri, 24 May 2024 19:08:20 +0200 Message-ID: <20240524190907.1624959d1b73.I7b6f91abd199b394924149eacbad7120598ef7d6@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Gregory Greenman Patch e5221fa6a355 ("KEYS: asymmetric: Move sm2 code into x509_public_key") made some changes to inlude order in x509_public_key.c. Adjust verify.patch. Signed-off-by: Gregory Greenman Signed-off-by: Johannes Berg --- patches/verify.patch | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/patches/verify.patch b/patches/verify.patch index 370fd5f72530..85318b3f26ea 100644 --- a/patches/verify.patch +++ b/patches/verify.patch @@ -11,14 +11,17 @@ if (ret == -ENOMEM) --- a/compat/verification/x509_public_key.c +++ b/compat/verification/x509_public_key.c -@@ -9,11 +9,8 @@ +@@ -8,14 +8,11 @@ + #define pr_fmt(fmt) "X.509: "fmt + #include + #include +-#include +-#include + #include #include #include #include --#include --#include - #include - #include + #include -#include "asymmetric_keys.h" #include "x509_parser.h" From patchwork Fri May 24 17:08:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673415 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 ACE9612C47A for ; Fri, 24 May 2024 17:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570628; cv=none; b=jhOie+g9V/bpHZHaRt1NHQWAxhvLViMr/J8uV0lnKFHzKfP7TQUyXg9O/19hDg/YzpmZ4NScNQvhl9aD35DUNn5YZvtFnQokI/EtvFn30UOpYoGWfDp9LVLAnmmkOhGvG+ALOdEHqNK/OWxleQ46W1x2hJkNo2SNH6s4udWXIgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570628; c=relaxed/simple; bh=PqvWaNcO5cnNdid/0PBZ3MwQV/M54l7NNRaYEYT8DuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ifMcV9rQzGd3jAvoEmHYWOEUMhi4Edcqs0ngeNbkqiRIYSq4oqOjtvpdZLOBIP4779JFPbOY4V88u5RuD6ZzqeT57bzF+kiAxpu7ZVROmTUFRV2e3ohyVr7kQu7JS6pq8eJal4azgQbemDE5Xhz2DoBMFd2MxY/6l/5K6cfugNY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=J1Ekg52p; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="J1Ekg52p" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=nGQ9JmEjEkhCjSBebDRM7JV/FW5nO2B5mrT8hhMiJ08=; t=1716570626; x=1717780226; b=J1Ekg52p4pY21Bzfl7AM4szg2Jdqd2xghXLozveUTlIG/dd g8SclJVWiZ0euGG3Pc15ApAdMLpD6t5n+56Q35Lwan/cmJW0k9K/NKic9ZPPpv6JR1YmFwfGSQpAh A4pbwogPb1FWH7iCH5XVpcPUma1warqGIx8Tp2I7CcUoFsBbVFe7QJPHMfthDqoMUnjdJWr6U8dqw yEYCFUaQ7tp4sf9zsN4sNHt8H7gyfu4pubCtL0fny+PdpGjzbSobykP13ytR/t8hSX3GdDglZkLVo s+TVnpF6Lust3V9OeiASoJJWe4tITJ9N0mvpWnI+wwSfaXcaXLRmtuarYFjb2FCQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQy-00000008Xuw-07d2; Fri, 24 May 2024 19:10:24 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 69/74] rediff patches against 6.9 Date: Fri, 24 May 2024 19:08:21 +0200 Message-ID: <20240524190907.6646341eadf7.I6d0cc1bc85b62b898615611fad198edd3e252afc@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- patches/0099-netlink-range/mac80211.patch | 52 ++++++++++++++------ patches/0100-revert-small_ops/mac80211.patch | 11 +++-- patches/verify.patch | 15 ++++-- 3 files changed, 54 insertions(+), 24 deletions(-) diff --git a/patches/0099-netlink-range/mac80211.patch b/patches/0099-netlink-range/mac80211.patch index 662b73e91c8d..cf6d0b200b4a 100644 --- a/patches/0099-netlink-range/mac80211.patch +++ b/patches/0099-netlink-range/mac80211.patch @@ -1,6 +1,8 @@ +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c +index 569234bc2be6..c713f47c2302 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -413,10 +413,15 @@ static const struct nla_policy +@@ -422,10 +422,15 @@ static const struct nla_policy nl80211_fils_discovery_policy[NL80211_FILS_DISCOVERY_ATTR_MAX + 1] = { [NL80211_FILS_DISCOVERY_ATTR_INT_MIN] = NLA_POLICY_MAX(NLA_U32, 10000), [NL80211_FILS_DISCOVERY_ATTR_INT_MAX] = NLA_POLICY_MAX(NLA_U32, 10000), @@ -16,7 +18,27 @@ }; static const struct nla_policy -@@ -511,7 +516,11 @@ static const struct nla_policy nl80211_p +@@ -463,10 +468,19 @@ nl80211_sta_wme_policy[NL80211_STA_WME_MAX + 1] = { + [NL80211_STA_WME_MAX_SP] = { .type = NLA_U8 }, + }; + ++#if LINUX_VERSION_IS_GEQ(5,10,0) ++#if LINUX_VERSION_IS_GEQ(6,7,0) + static const struct netlink_range_validation nl80211_punct_bitmap_range = { + .min = 0, + .max = 0xffff, + }; ++#else ++static struct netlink_range_validation nl80211_punct_bitmap_range = { ++ .min = 0, ++ .max = 0xffff, ++}; ++#endif ++#endif + + static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { + [0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD }, +@@ -541,7 +555,11 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_MPATH_NEXT_HOP] = NLA_POLICY_ETH_ADDR_COMPAT, /* allow 3 for NUL-termination, we used to declare this NLA_STRING */ @@ -28,7 +50,7 @@ [NL80211_ATTR_REG_RULES] = { .type = NLA_NESTED }, [NL80211_ATTR_BSS_CTS_PROT] = { .type = NLA_U8 }, -@@ -657,16 +666,26 @@ static const struct nla_policy nl80211_p +@@ -687,16 +705,26 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { * The value of the Length field of the Supported Operating * Classes element is between 2 and 253. */ @@ -55,19 +77,17 @@ [NL80211_ATTR_MAC_HINT] = NLA_POLICY_EXACT_LEN_WARN(ETH_ALEN), [NL80211_ATTR_WIPHY_FREQ_HINT] = { .type = NLA_U32 }, [NL80211_ATTR_TDLS_PEER_CAPABILITY] = { .type = NLA_U32 }, -@@ -721,10 +740,15 @@ static const struct nla_policy nl80211_p - [NL80211_ATTR_TXQ_LIMIT] = { .type = NLA_U32 }, - [NL80211_ATTR_TXQ_MEMORY_LIMIT] = { .type = NLA_U32 }, - [NL80211_ATTR_TXQ_QUANTUM] = { .type = NLA_U32 }, +@@ -811,8 +839,13 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { + [NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN), + [NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG }, + [NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT }, +#if LINUX_VERSION_IS_GEQ(5,10,0) - [NL80211_ATTR_HE_CAPABILITY] = - NLA_POLICY_RANGE(NLA_BINARY, - NL80211_HE_MIN_CAPABILITY_LEN, - NL80211_HE_MAX_CAPABILITY_LEN), + [NL80211_ATTR_PUNCT_BITMAP] = + NLA_POLICY_FULL_RANGE(NLA_U32, &nl80211_punct_bitmap_range), +#else -+ [NL80211_ATTR_HE_CAPABILITY] = { .type = NLA_BINARY, -+ .len = NL80211_HE_MAX_CAPABILITY_LEN }, ++ [NL80211_ATTR_PUNCT_BITMAP] = ++ NLA_POLICY_RANGE(NLA_U32, 0, 0xffff), +#endif - [NL80211_ATTR_FTM_RESPONDER] = - NLA_POLICY_NESTED(nl80211_ftm_responder_policy), - [NL80211_ATTR_TIMEOUT] = NLA_POLICY_MIN(NLA_U32, 1), + + [NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS] = { .type = NLA_U16 }, + [NL80211_ATTR_HW_TIMESTAMP_ENABLED] = { .type = NLA_FLAG }, diff --git a/patches/0100-revert-small_ops/mac80211.patch b/patches/0100-revert-small_ops/mac80211.patch index d25e785cf57b..80d6dd5240bb 100644 --- a/patches/0100-revert-small_ops/mac80211.patch +++ b/patches/0100-revert-small_ops/mac80211.patch @@ -1,8 +1,10 @@ +diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c +index 33a82ecab9d5..b0c05fbf3560 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -15188,9 +15188,11 @@ static const struct genl_ops nl80211_ops +@@ -16403,9 +16403,11 @@ static const struct genl_ops nl80211_ops[] = { /* can be retrieved by unprivileged users */ - .internal_flags = NL80211_FLAG_NEED_WIPHY, + .internal_flags = IFLAGS(NL80211_FLAG_NEED_WIPHY), }, +#if LINUX_VERSION_IS_GEQ(5,10,0) }; @@ -12,13 +14,16 @@ { .cmd = NL80211_CMD_SET_WIPHY, .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, -@@ -15980,8 +15982,10 @@ static struct genl_family nl80211_fam __ +@@ -17243,9 +17245,13 @@ static struct genl_family nl80211_fam __ro_after_init = { .module = THIS_MODULE, .ops = nl80211_ops, .n_ops = ARRAY_SIZE(nl80211_ops), +#if LINUX_VERSION_IS_GEQ(5,10,0) .small_ops = nl80211_small_ops, .n_small_ops = ARRAY_SIZE(nl80211_small_ops), ++#endif ++#if LINUX_VERSION_IS_GEQ(6,1,0) + .resv_start_op = NL80211_CMD_REMOVE_LINK_STA + 1, +#endif .mcgrps = nl80211_mcgrps, .n_mcgrps = ARRAY_SIZE(nl80211_mcgrps), diff --git a/patches/verify.patch b/patches/verify.patch index 85318b3f26ea..b1fd2c895429 100644 --- a/patches/verify.patch +++ b/patches/verify.patch @@ -67,7 +67,7 @@ struct x509_certificate *signer; /* Certificate that signed this one */ --- a/include/crypto/backport-public_key.h +++ b/include/crypto/backport-public_key.h -@@ -52,34 +52,6 @@ extern void public_key_signature_free(st +@@ -56,25 +56,6 @@ extern void public_key_signature_free(struct public_key_signature *sig); extern struct asymmetric_key_subtype public_key_subtype; @@ -90,15 +90,20 @@ - const union key_payload *payload, - struct key *trusted); - --extern int query_asymmetric_key(const struct kernel_pkey_params *, -- struct kernel_pkey_query *); -- + #if IS_REACHABLE(CONFIG_ASYMMETRIC_KEY_TYPE) + extern int restrict_link_by_ca(struct key *dest_keyring, + const struct key_type *type, +@@ -93,12 +74,6 @@ static inline int restrict_link_by_ca(struct key *dest_keyring, + extern int query_asymmetric_key(const struct kernel_pkey_params *, + struct kernel_pkey_query *); + -extern int encrypt_blob(struct kernel_pkey_params *, const void *, void *); -extern int decrypt_blob(struct kernel_pkey_params *, const void *, void *); -extern int create_signature(struct kernel_pkey_params *, const void *, void *); -extern int verify_signature(const struct key *, - const struct public_key_signature *); - + #if IS_REACHABLE(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) int public_key_verify_signature(const struct public_key *pkey, const struct public_key_signature *sig); - + From patchwork Fri May 24 17:08:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673416 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 48B0286AD6 for ; Fri, 24 May 2024 17:10:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570629; cv=none; b=i3U79tgaSAQAdBwxgB95c6i7ljuNt6JYvHJ/ZZx71djIPnCiS2e3BH3EuMH36Lc2RqDWVxSBwV0sPV0vBOr9hJwzZAn785BD/b8joOkGct0cmw5tES8fLUOkZYrqjtbLUHdKVXHc7JdHW4kt3fdA76i7BcOJk+EI2DepnY7p5iQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570629; c=relaxed/simple; bh=EUaswkyLqyYHD9gMj3C+b48zVAirDz8QFpQVK8NUs34=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MDxSu8ZJ6LDzC4F/yvCqXt1s6CbQlx9R1a6rpO9laoCG2XOrinkBPQhoIvHVbxmeL2eJOynYXKRxKe/rBgUlMVvgc7bjC9QDb5EeE5hiXRKDRLa8ii/uZk0TzeRizgmL9AU/b9VHTASkd0+f02FidpIijb6tKd2WKhQAbXz3kws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=WUR92BUL; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="WUR92BUL" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=RPTbkZLm/TKnNkCjDByGa2ORx8d1nlqQiIxNyUu2j4E=; t=1716570628; x=1717780228; b=WUR92BULfDZlMCk19fcCxjRHkGX08AkVmbgSjyU6psUFGti SMR4uMg2pcbowA7Q7EZxfXw6wX0yxRKk0lHDUqL4X1OEODADc43qUpoE1+d4yEO0EylAQQgy3mlfv LLx0idVY5XTAePOkQOwVUJwm7zZx7thQe82uoN5Aw0h+k3JNC9NGZSPZgvBSK5f4iHvtKLydD3juF G2gDfgP+iD424htc7KkOzTqvf4EQ+ZLb5sB/577VW4hnVMStST7ANBk/dL5VgqIKLAgySm/b4vlkU Y7K/qxICNgBv4wGRO8vnJT+qh3tVXylfTXXc0j9bYfDclcxAzwXs3DGFuSjHfVGA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYQz-00000008Xuw-16HI; Fri, 24 May 2024 19:10:25 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 70/74] gentree: print spatch stdout/stderr on errors Date: Fri, 24 May 2024 19:08:22 +0200 Message-ID: <20240524190907.f5deeb33877f.I9b2f222b424bf47ec9778f8b5cfc1cf2e57cdca5@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- gentree.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gentree.py b/gentree.py index a80b0a8def29..03bff1a815c6 100755 --- a/gentree.py +++ b/gentree.py @@ -608,6 +608,7 @@ def apply_patches(args, desc, source_dir, patch_src, target_dir, logwrite=lambda sprocess.wait() if sprocess.returncode != 0: logwrite("Failed to process SmPL patch %s with %i" % (print_name, sprocess.returncode)) + logwrite(output) return 2 output = output.split('\n') if output[-1] == '': From patchwork Fri May 24 17:08:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673417 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 3C67712C47A for ; Fri, 24 May 2024 17:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570630; cv=none; b=OGVEMGrpDcWmJFGxofK1GDv6ljxHFl0VaXJEzOduu4oOR7i0aoNMAcEGIYE40yqlUNiFWrPU4UTF8n//u5vEYonwoP4s198RyxozAS90LSlbYRIAlrCxevzywPM1Ql5DZCtaK0n9eJ+35fh8p6Gw7zyn0rPcywHUcsebik7ELsU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570630; c=relaxed/simple; bh=d1BPhvRtWgz7rFn2VB/9ANhnpTVUa4npMC07vEPlE/k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GPAx04Emdh8qG317IF4Gy0PQznddyY4eKBpVA1c4C+YQz0g+Fao08+8Kv90e++N20ML7PP8QJY5jeVkqOxGcIvE+FfRKUZIE0PJQtwzo7gwH3zLezmflxjgNk0MW9xwdrIGB2iPp3VyNTz3UzgcnSkj2JUgNj0iFVQ8oljn0QKY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=K+38k0U3; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="K+38k0U3" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=A9ylCl4s6Ri5b4skZHVKWTbx0b2Mw78xfAGdbzJGVBI=; t=1716570629; x=1717780229; b=K+38k0U3tA/pWx2nTXwI8c36e5k/ydeSYIwEP25uFM7j5M+ 3ZIQUwdTYpIgjSLcqB0M4Cx6eCQve9gkOSx5Rz3ocUdo1Mo2fz7x3IGUGQUIMcPq4ahcw0+G2Glqn uSjMlyiv+3n+/oHa2Tz1wo/BE1xWprSqEBGWt1mIfKECpL8vYM4SxaFItvVcW1JaSl4qv1wyQXkIB pt8bj7Cy5YapWcjlmmnyG22m/1KorDhG9b0itxP1HyWRZfUeApMgD+zuEkNe1p7C1lmsZtRswv0Kp 1tnTzWeszn7DfxQrR3FVHqeCrzCX59XFbW24yQc6trWAUztW5v7HvR1kWqSRvQVg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYR0-00000008Xuw-39Gu; Fri, 24 May 2024 19:10:27 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 71/74] patches: ifdef resv_start_op in hwsim Date: Fri, 24 May 2024 19:08:23 +0200 Message-ID: <20240524190907.c75a60d4645e.I679603c448239607e8d576065c779b7fcae969da@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- patches/0085-hwsim-resv-start-op.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 patches/0085-hwsim-resv-start-op.patch diff --git a/patches/0085-hwsim-resv-start-op.patch b/patches/0085-hwsim-resv-start-op.patch new file mode 100644 index 000000000000..771e3f057b8d --- /dev/null +++ b/patches/0085-hwsim-resv-start-op.patch @@ -0,0 +1,12 @@ +--- a/drivers/net/wireless/virtual/mac80211_hwsim.c ++++ b/drivers/net/wireless/virtual/mac80211_hwsim.c +@@ -6177,7 +6177,9 @@ static struct genl_family hwsim_genl_family __ro_after_init = { + .module = THIS_MODULE, + .small_ops = hwsim_ops, + .n_small_ops = ARRAY_SIZE(hwsim_ops), ++#if LINUX_VERSION_IS_GEQ(6,1,0) + .resv_start_op = HWSIM_CMD_REPORT_PMSR + 1, // match with __HWSIM_CMD_MAX ++#endif + .mcgrps = hwsim_mcgrps, + .n_mcgrps = ARRAY_SIZE(hwsim_mcgrps), + }; From patchwork Fri May 24 17:08:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673418 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 C399D12EBD5 for ; Fri, 24 May 2024 17:10:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570632; cv=none; b=AW9TsbXblVDMR1TtrgbJWBTjtK2gupvc2qBOtCmWwNimdcKfTTPBAEmlhXJZp9/m3upPsqEJ6rh1dds5LUkDHnRmmEPpGq5h6w/xzBaCW4YchWkvIhVRtnA0sF+sCz4qOZxWJSRSKUj/2YfND+p/+LzvP5LdhtdIhcVN4RvA9BM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570632; c=relaxed/simple; bh=wpCXVhxr4IAm9yC+7GUbiofb8qWo66VoFMakST37Svw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tSae79OZS/SQ+s2BT5YnGCNSGrkAAFF84x+bsLhjk9n51LY5x0ENrbgMbAgtX7c2kcsAdah8ShgIyvshtCthFtobd48OTlUDnwqln0uxpn9Ye2IKKw6d1GZzoa0VY5xx79oQYM1N6tc9wXeKtOlYIaaXw43shi+LjRuXvaGpVPk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=KepORipF; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="KepORipF" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=rxuySBm4Dea+MYM3qghp9v7ljZHUVU7zg5J56OhFycw=; t=1716570630; x=1717780230; b=KepORipFj5gs5JQ7MXAV315JZX8g97DPnut5HPkIWwgqe8I BUrhbfw4k+z8YuH1De2g7v2wqQOZf9g66KNIbI94TD0F94uZF4GfxIZhPKLi6PJH4j0xm6Gu10HdJ Ijs1y2lcVNPoLRF5p6EINdr3qxFcd0QvYI9F269I474Z5Isvlpeo2p/SfoCEut450jO1lwZt83Ix7 X5js1umei2P46q8Hbi+TFPpZ2g/svkuRFBDPuS03vw+8kqzeY66sb1s0qYFg6KkVTvH4TaNaGLTKo POxr9C5npvBzDNNvp9HWWuvzg6hq3lLIvkFfV/25rzibJNseeDmx6TkD30Y9boTA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYR1-00000008Xuw-3rob; Fri, 24 May 2024 19:10:28 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 72/74] patches: add patch for class_create() in hwsim Date: Fri, 24 May 2024 19:08:24 +0200 Message-ID: <20240524190908.30870adf76f4.I5f967e020ac6400b14780e6fd8c757530b3efee9@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- patches/0086-hwsim-class-create.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 patches/0086-hwsim-class-create.patch diff --git a/patches/0086-hwsim-class-create.patch b/patches/0086-hwsim-class-create.patch new file mode 100644 index 000000000000..786a5966be0d --- /dev/null +++ b/patches/0086-hwsim-class-create.patch @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/virtual/mac80211_hwsim.c ++++ b/drivers/net/wireless/virtual/mac80211_hwsim.c +@@ -6564,7 +6566,11 @@ static int __init init_mac80211_hwsim(void) + if (err) + goto out_exit_netlink; + ++#if LINUX_VERSION_IS_GEQ(6,4,0) + hwsim_class = class_create("mac80211_hwsim"); ++#else ++ hwsim_class = class_create(THIS_MODULE, "mac80211_hwsim"); ++#endif + if (IS_ERR(hwsim_class)) { + err = PTR_ERR(hwsim_class); + goto out_exit_virtio; From patchwork Fri May 24 17:08:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673419 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 EC60B12C47A for ; Fri, 24 May 2024 17:10:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570633; cv=none; b=Q0FDBnCLzjEnyS6i1QblqjGKLKozgcfikvijNjQ4jNX3wN/g11k/j1Ys53CphZ+O7Qqc9uHcFay4b7FcoPLIvyQHyrJruP6ij/RTJLIuOzI+nbQ/Kv3PDfN2eZFGj2Rv1ARX5H/KbIvuxcvb5uH9P3Zr5uMFwXHoBVotLTPOa5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570633; c=relaxed/simple; bh=hRsbh7pb2wbDOvMluLeAu/wDsx3RJ1Ehin6zJqiGQ2g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hspF+2uwjyYGptwo/kj36Q7qSg7APxRCUz0sYCN+S30d6+nQv4fNA2Cy63kJd1aEaKh0QmfU1mOXsz+PdZo27trWAI2AHwUesvoXqTVEtD3/CqrU89saAg+mcEVltIFC+J57QUY2PAW1VJDGM+ZWx/bzvV/54Lut68jwckGkQpw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=BOCZ+Dvs; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="BOCZ+Dvs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=PFNtIaM0XVjpvHWiOzH44GTnIhHehWcrhikw5vW+Xzw=; t=1716570632; x=1717780232; b=BOCZ+Dvsx24sZkzBlkdRokfVqZLD/YuQQIIxs8nC4zVNtK4 7ZYRKunFn6G3czsOr8mexCFqDsDMK/dtl588svcslTvpmPw5fJ0WAglwUYAkU946Nl9EMYUgRa1IA CdbRZiPhh7+gXoN8148e5GlWLtFg7swfl9H7ZSlZRtrre3wz7lNsATN8lmrejz6Ejc93eYigBDcP0 DFve7D/xvR2PbR+GdegWLCkpcCWZYG2fd4q/7f/V5RWD1f9Hi9jsTLSu2/QdgQEroVHJCp4UnTQS0 8RYJYZFan1E8UCcy0J2y6J1g0FZpw+tZCyBqvP98RQAHsY69HaS3kiY6WqWb+MUA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYR3-00000008Xuw-1fxK; Fri, 24 May 2024 19:10:29 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 73/74] patches: add build system workaround for pre 5.17 Date: Fri, 24 May 2024 19:08:25 +0200 Message-ID: <20240524190908.b8ed0e43b711.I3fcefff149575b91306ca59617d6979dca20898b@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg Signed-off-by: Johannes Berg --- patches/0111-wireless-build-unquote.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 patches/0111-wireless-build-unquote.patch diff --git a/patches/0111-wireless-build-unquote.patch b/patches/0111-wireless-build-unquote.patch new file mode 100644 index 000000000000..ce4db030aa48 --- /dev/null +++ b/patches/0111-wireless-build-unquote.patch @@ -0,0 +1,17 @@ +This is needed because on earlier kernels the build system still quotes it. +commit 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf") +in 5.17 changed it. + +--- a/net/wireless/Makefile ++++ b/net/wireless/Makefile +@@ -34,8 +34,8 @@ $(obj)/shipped-certs.c: $(sort $(wildcard $(src)/certs/*.hex)) + echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \ + ) > $@ + +-$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR) \ +- $(sort $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR)/*.x509)) ++$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \ ++ $(sort $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)) + @$(kecho) " GEN $@" + $(Q)(set -e; \ + allf=""; \ From patchwork Fri May 24 17:08:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 13673420 Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 9E3FD12EBD5 for ; Fri, 24 May 2024 17:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570633; cv=none; b=krLWVyrhiw0dUaUKQdBWC+REwNWjqJdJmIspBEiCkSpiiF1KqtHfpytCEWTAZ7LhUtilQmvlMCGtsP9LGi8Ktyikf23OETyE/uUe5DSW+P7cTeRnnRpm/R+/1+ZIFoVRKFuv4IvvUVVFPf4exYi+4iPiEtaFf6J01bFnteVMH3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716570633; c=relaxed/simple; bh=8kdmxQrwj/ZJvr0y536kyNAHWnLXtk7hnV8Sw6mJA5Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iCwhmbNTn4btsoRc2nyiSQpKMcj+nsHvaYyTkVCaJAVit1/SgX/TxDEmyDQ4qepfKHOdWiWNsyyXnKCU89bWTdhYS2fFaQ5DL+/C9ie44rHrRnwfeUWixZ84UnzdHf8Gzed2UDSlT9jKhrD+Qcp1Chi2uKejHOGwFwPbw1Rsjwg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=vPCEyItJ; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="vPCEyItJ" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Nj8CyGqxRvLN9eXVsxNQJEJS2ycPoKmJNp3OFdC07Qg=; t=1716570632; x=1717780232; b=vPCEyItJkTP/3KJBOqDA3BvyuEHmsnNX8soA6Eex+cgwOra eD/0ncPq9JPxigt6RfaDkl74swp2eB/YWyx+FN8qDs9OzvTniKvFeqUW7qwva+YjVWV8s258EClRh Op30HHobI58FfCIw2HnlcCvJjK06su7mWVL7kcBGt4ofYguGxdVCTu5DeJKEg3SlJBD2itGuQ6OMm 2025yXRUZChkk5b3mWyQ3nOcikHMaxXwJF1JrqsZvs72AWV3G9+uKxZo8oweU0mQEK2gRdJ9+jjAq HDQndvBxPTo4dh/y+KPvpZFCzDeaS7u4TO1fTBrvxr12CzyFzuTynEtY10CRbKIA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sAYR4-00000008Xuw-1ot4; Fri, 24 May 2024 19:10:30 +0200 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 74/74] copy-list: minimal updates Date: Fri, 24 May 2024 19:08:26 +0200 Message-ID: <20240524190908.e47720d3b00e.I38c2d2390eb0ad24c675ec42c58051f86d279548@changeid> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240524170906.54680-76-johannes@sipsolutions.net> References: <20240524170906.54680-76-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: backports@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg These are needed, but it still won't really work, since patches don't apply. Signed-off-by: Johannes Berg --- copy-list | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/copy-list b/copy-list index 027e9c883b48..ce879409df45 100644 --- a/copy-list +++ b/copy-list @@ -14,10 +14,6 @@ COPYING LICENSES/ Documentation/process/license-rules.rst MAINTAINERS -include/linux/unaligned/ -include/linux/hashtable.h -include/linux/fixp-arith.h -include/linux/crc32poly.h # This just defines some macros, simply take it include/linux/bitfield.h @@ -26,7 +22,7 @@ include/linux/overflow.h include/linux/units.h # crypto_memneq -lib/memneq.c -> compat/memneq.c +lib/crypto/memneq.c -> compat/memneq.c # 802.11 drivers/net/wireless/Kconfig @@ -82,6 +78,7 @@ crypto/asymmetric_keys/pkcs7_verify.c -> compat/verification/pkcs7_verify.c crypto/asymmetric_keys/x509_cert_parser.c -> compat/verification/x509_cert_parser.c crypto/asymmetric_keys/x509_parser.h -> compat/verification/x509_parser.h crypto/asymmetric_keys/x509_public_key.c -> compat/verification/x509_public_key.c +crypto/asymmetric_keys/x509_loader.c -> compat/verification/x509_loader.c net/Makefile net/Kconfig