From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Sun, 22 Feb 2026 16:18:26 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vuBE1-004VsN-2t for lore@lore.pengutronix.de; Sun, 22 Feb 2026 16:18:26 +0100 Received: from [127.0.0.1] (helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vuBE2-0008DY-LO; Sun, 22 Feb 2026 16:18:26 +0100 Received: from h4.cmg2.smtp.forpsi.com ([185.129.138.189]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1vuBDx-000828-DJ for ptxdist@pengutronix.de; Sun, 22 Feb 2026 16:18:22 +0100 Received: from lenoch ([91.218.190.200]) by cmgsmtp with ESMTPSA id uBDwvrvmlqQnYuBDxvypRV; Sun, 22 Feb 2026 16:18:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=triops.cz; s=f2019; t=1771773501; bh=I8qW9hUTH9qiF6Z+Kt6127ly/aHNSrCF8GAL+vMWGyA=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type; b=sI4gMBUIYHOFzSXR1pQkr3doV5uLtYo5OXxhPOgZw9rvK6rIVbJjQ6aiSpNwMQlvW s9t/0bqIP848R9v01QH4E5rvQ3MX5YSmFk5rh83a54FENPBW15fqmqTCNO3O1iKm4+ /TENAuADzK9j9XeK582MuVmONTeA+EU6joLufBA0GJVoyGIWAS5u8w7vYhSZjCiTnA emw072fBJcpGLdbSb9PxMbisqcGSArYwDp6FIvjlkCuUEQPJRAw/N8xFnjLrSQTuyr jvj1hduO9tP46ESlmUEP+5MTJP5bDMtpDDn2/dZxinIrpBbxL48Eu7XIv193CU2Su7 7dXTtAG5KgNAQ== Date: Sun, 22 Feb 2026 16:18:19 +0100 From: Ladislav Michl To: ptxdist@pengutronix.de Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CMAE-Envelope: MS4xfMm6VhWcuy58GkYKGh47BRMAj+ekCy3fz9ghjPMjXDUoabN21gS40Kr+WPrizdXMAFhsXjQL1zYxLWCzWKaJlkXvX7R870ABPcOLfQQ7KaEZ8JriY0ML NE5IMzOZtoyPs+jM6aLBJc7KuN0vg/5LqtZTOP37XndsYMe/n8fIMA4d7P2Nb2nOB6LR2nvuKyrW6Q== X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH 1/3] cryptodev: fix compilation with Linux-6.18-rc1 X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false From: Ladislav Michl Signed-off-by: Ladislav Michl --- .../0004-Fix-build-for-Linux-6.18-rc1.patch | 50 +++++++++++++++++++ patches/cryptodev-linux-1.14/series | 3 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 patches/cryptodev-linux-1.14/0004-Fix-build-for-Linux-6.18-rc1.patch diff --git a/patches/cryptodev-linux-1.14/0004-Fix-build-for-Linux-6.18-rc1.patch b/patches/cryptodev-linux-1.14/0004-Fix-build-for-Linux-6.18-rc1.patch new file mode 100644 index 000000000..879f755e5 --- /dev/null +++ b/patches/cryptodev-linux-1.14/0004-Fix-build-for-Linux-6.18-rc1.patch @@ -0,0 +1,50 @@ +From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= +Date: Sat, 6 Sep 2025 20:36:38 +0000 +Subject: [PATCH] Fix build for Linux 6.18-rc1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's no longer required to use nth_page() when iterating pages within a +single scatterlist entry. + +Note I believe this code path in `sg_advance` is currently unreachable: +It is only called from `get_userbuf_srtp`, passing in a scatterlist +copied from one created by `__get_userbuf`, which only generates +entries such that `sg->offset + sg->length <= PAGE_SIZE`. +On the other hand, this code path in `sg_advance` requires that +`sg->offset + sg->length > sg->offset + consumed >= PAGE_SIZE`. + +See also: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f8f03eb5f0f91fddc9bb8563c7e82bd7d3ba1dd0 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce00897b94bc5c62fab962625efcf1ab824d3688 + +Signed-off-by: Joan Bruguera Micó +--- + util.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/util.c b/util.c +index 9eba4836ba6a..d42678169b2d 100644 +--- a/util.c ++++ b/util.c +@@ -21,6 +21,7 @@ + + #include + #include ++#include + #include "util.h" + + /* These were taken from Maxim Levitsky's patch to lkml. +@@ -44,8 +45,12 @@ struct scatterlist *sg_advance(struct scatterlist *sg, int consumed) + sg->length -= consumed; + + if (sg->offset >= PAGE_SIZE) { ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 18, 0)) ++ struct page *page = sg_page(sg) + (sg->offset / PAGE_SIZE); ++#else + struct page *page = + nth_page(sg_page(sg), sg->offset / PAGE_SIZE); ++#endif + sg_set_page(sg, page, sg->length, sg->offset % PAGE_SIZE); + } + diff --git a/patches/cryptodev-linux-1.14/series b/patches/cryptodev-linux-1.14/series index 12704929b..d832ab663 100644 --- a/patches/cryptodev-linux-1.14/series +++ b/patches/cryptodev-linux-1.14/series @@ -3,4 +3,5 @@ 0001-Fix-cryptodev_verbosity-sysctl-for-Linux-6.11-rc1.patch 0002-Exclude-unused-struct-since-Linux-6.5.patch 0003-Fix-uninitialized-session-pointers.patch -# b25ab355176e0ac9ad9433b6a050c0e4 - git-ptx-patches magic +0004-Fix-build-for-Linux-6.18-rc1.patch +# 3025afd546f1ec2e0afecd54c87e23d2 - git-ptx-patches magic -- 2.47.3