Skip to content

Commit effcbc8

Browse files
committed
Merge remote-tracking branch 'stable/linux-6.12.y' into rpi-6.12.y
2 parents 7ee4e32 + 18cd79c commit effcbc8

50 files changed

Lines changed: 616 additions & 403 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 83
4+
SUBLEVEL = 85
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

crypto/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ config CRYPTO_AUTHENC
222222
select CRYPTO_SKCIPHER
223223
select CRYPTO_MANAGER
224224
select CRYPTO_HASH
225-
select CRYPTO_NULL
226225
help
227226
Authenc: Combined mode wrapper for IPsec.
228227

@@ -1424,7 +1423,6 @@ config CRYPTO_USER_API_AEAD
14241423
depends on NET
14251424
select CRYPTO_AEAD
14261425
select CRYPTO_SKCIPHER
1427-
select CRYPTO_NULL
14281426
select CRYPTO_USER_API
14291427
help
14301428
Enable the userspace interface for AEAD cipher algorithms.

crypto/af_alg.c

Lines changed: 11 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,13 @@ static int af_alg_alloc_tsgl(struct sock *sk)
637637
/**
638638
* af_alg_count_tsgl - Count number of TX SG entries
639639
*
640-
* The counting starts from the beginning of the SGL to @bytes. If
641-
* an @offset is provided, the counting of the SG entries starts at the @offset.
640+
* The counting starts from the beginning of the SGL to @bytes.
642641
*
643642
* @sk: socket of connection to user space
644643
* @bytes: Count the number of SG entries holding given number of bytes.
645-
* @offset: Start the counting of SG entries from the given offset.
646644
* Return: Number of TX SG entries found given the constraints
647645
*/
648-
unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
646+
unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes)
649647
{
650648
const struct alg_sock *ask = alg_sk(sk);
651649
const struct af_alg_ctx *ctx = ask->private;
@@ -660,25 +658,11 @@ unsigned int af_alg_count_tsgl(struct sock *sk, size_t bytes, size_t offset)
660658
const struct scatterlist *sg = sgl->sg;
661659

662660
for (i = 0; i < sgl->cur; i++) {
663-
size_t bytes_count;
664-
665-
/* Skip offset */
666-
if (offset >= sg[i].length) {
667-
offset -= sg[i].length;
668-
bytes -= sg[i].length;
669-
continue;
670-
}
671-
672-
bytes_count = sg[i].length - offset;
673-
674-
offset = 0;
675661
sgl_count++;
676-
677-
/* If we have seen requested number of bytes, stop */
678-
if (bytes_count >= bytes)
662+
if (sg[i].length >= bytes)
679663
return sgl_count;
680664

681-
bytes -= bytes_count;
665+
bytes -= sg[i].length;
682666
}
683667
}
684668

@@ -690,19 +674,14 @@ EXPORT_SYMBOL_GPL(af_alg_count_tsgl);
690674
* af_alg_pull_tsgl - Release the specified buffers from TX SGL
691675
*
692676
* If @dst is non-null, reassign the pages to @dst. The caller must release
693-
* the pages. If @dst_offset is given only reassign the pages to @dst starting
694-
* at the @dst_offset (byte). The caller must ensure that @dst is large
695-
* enough (e.g. by using af_alg_count_tsgl with the same offset).
677+
* the pages.
696678
*
697679
* @sk: socket of connection to user space
698680
* @used: Number of bytes to pull from TX SGL
699681
* @dst: If non-NULL, buffer is reassigned to dst SGL instead of releasing. The
700682
* caller must release the buffers in dst.
701-
* @dst_offset: Reassign the TX SGL from given offset. All buffers before
702-
* reaching the offset is released.
703683
*/
704-
void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
705-
size_t dst_offset)
684+
void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst)
706685
{
707686
struct alg_sock *ask = alg_sk(sk);
708687
struct af_alg_ctx *ctx = ask->private;
@@ -726,19 +705,11 @@ void af_alg_pull_tsgl(struct sock *sk, size_t used, struct scatterlist *dst,
726705
* Assumption: caller created af_alg_count_tsgl(len)
727706
* SG entries in dst.
728707
*/
729-
if (dst) {
730-
if (dst_offset >= plen) {
731-
/* discard page before offset */
732-
dst_offset -= plen;
733-
} else {
734-
/* reassign page to dst after offset */
735-
get_page(page);
736-
sg_set_page(dst + j, page,
737-
plen - dst_offset,
738-
sg[i].offset + dst_offset);
739-
dst_offset = 0;
740-
j++;
741-
}
708+
if (dst && plen) {
709+
/* reassign page to dst */
710+
get_page(page);
711+
sg_set_page(dst + j, page, plen, sg[i].offset);
712+
j++;
742713
}
743714

744715
sg[i].length -= plen;

0 commit comments

Comments
 (0)