From: Greg Kroah-Hartman Date: Mon, 1 May 2023 23:56:34 +0000 (+0900) Subject: 5.15-stable patches X-Git-Tag: v5.15.111~145 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e12a183a95c3f9e6aade3ce5c0b85d0a3f2d172;p=thirdparty%2Fkernel%2Fstable-queue.git 5.15-stable patches added patches: wireguard-timers-cast-enum-limits-members-to-int-in-prints.patch --- diff --git a/queue-5.15/series b/queue-5.15/series index c51475458d7..03c019d263e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -6,3 +6,4 @@ asoc-intel-bytcr_rt5640-add-quirk-for-the-acer-iconi.patch selftests-mount-fix-mount_setattr_test-builds-failed.patch asm-generic-io.h-suppress-endianness-warnings-for-re.patch x86-cpu-add-model-number-for-intel-arrow-lake-proces.patch +wireguard-timers-cast-enum-limits-members-to-int-in-prints.patch diff --git a/queue-5.15/wireguard-timers-cast-enum-limits-members-to-int-in-prints.patch b/queue-5.15/wireguard-timers-cast-enum-limits-members-to-int-in-prints.patch new file mode 100644 index 00000000000..886e4bb4cdc --- /dev/null +++ b/queue-5.15/wireguard-timers-cast-enum-limits-members-to-int-in-prints.patch @@ -0,0 +1,68 @@ +From 2d4ee16d969c97996e80e4c9cb6de0acaff22c9f Mon Sep 17 00:00:00 2001 +From: "Jiri Slaby (SUSE)" +Date: Tue, 13 Dec 2022 15:52:08 -0700 +Subject: wireguard: timers: cast enum limits members to int in prints + +From: Jiri Slaby (SUSE) + +commit 2d4ee16d969c97996e80e4c9cb6de0acaff22c9f upstream. + +Since gcc13, each member of an enum has the same type as the enum. And +that is inherited from its members. Provided "REKEY_AFTER_MESSAGES = +1ULL << 60", the named type is unsigned long. + +This generates warnings with gcc-13: + error: format '%d' expects argument of type 'int', but argument 6 has type 'long unsigned int' + +Cast those particular enum members to int when printing them. + +Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36113 +Cc: Martin Liska +Signed-off-by: Jiri Slaby (SUSE) +Signed-off-by: Jason A. Donenfeld +Link: https://lore.kernel.org/all/20221213225208.3343692-2-Jason@zx2c4.com/ +Signed-off-by: Jakub Kicinski +Cc: Chris Clayton +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/wireguard/timers.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireguard/timers.c ++++ b/drivers/net/wireguard/timers.c +@@ -46,7 +46,7 @@ static void wg_expired_retransmit_handsh + if (peer->timer_handshake_attempts > MAX_TIMER_HANDSHAKES) { + pr_debug("%s: Handshake for peer %llu (%pISpfsc) did not complete after %d attempts, giving up\n", + peer->device->dev->name, peer->internal_id, +- &peer->endpoint.addr, MAX_TIMER_HANDSHAKES + 2); ++ &peer->endpoint.addr, (int)MAX_TIMER_HANDSHAKES + 2); + + del_timer(&peer->timer_send_keepalive); + /* We drop all packets without a keypair and don't try again, +@@ -64,7 +64,7 @@ static void wg_expired_retransmit_handsh + ++peer->timer_handshake_attempts; + pr_debug("%s: Handshake for peer %llu (%pISpfsc) did not complete after %d seconds, retrying (try %d)\n", + peer->device->dev->name, peer->internal_id, +- &peer->endpoint.addr, REKEY_TIMEOUT, ++ &peer->endpoint.addr, (int)REKEY_TIMEOUT, + peer->timer_handshake_attempts + 1); + + /* We clear the endpoint address src address, in case this is +@@ -94,7 +94,7 @@ static void wg_expired_new_handshake(str + + pr_debug("%s: Retrying handshake with peer %llu (%pISpfsc) because we stopped hearing back after %d seconds\n", + peer->device->dev->name, peer->internal_id, +- &peer->endpoint.addr, KEEPALIVE_TIMEOUT + REKEY_TIMEOUT); ++ &peer->endpoint.addr, (int)(KEEPALIVE_TIMEOUT + REKEY_TIMEOUT)); + /* We clear the endpoint address src address, in case this is the cause + * of trouble. + */ +@@ -126,7 +126,7 @@ static void wg_queued_expired_zero_key_m + + pr_debug("%s: Zeroing out all keys for peer %llu (%pISpfsc), since we haven't received a new one in %d seconds\n", + peer->device->dev->name, peer->internal_id, +- &peer->endpoint.addr, REJECT_AFTER_TIME * 3); ++ &peer->endpoint.addr, (int)REJECT_AFTER_TIME * 3); + wg_noise_handshake_clear(&peer->handshake); + wg_noise_keypairs_clear(&peer->keypairs); + wg_peer_put(peer);