x86: Fix ptrdiff_t for x86_64
authorRichard Weinberger <richard@nod.at>
Fri, 2 Aug 2024 10:08:43 +0000 (12:08 +0200)
committerDaniel Leidert <dleidert@debian.org>
Wed, 30 Apr 2025 23:19:02 +0000 (01:19 +0200)
commit3f9870f33c3ffb8b27ec3d39c98a6c4d63ee0775
tree958cbb75ed134a6929c6314ce342aae3d04b7d02
parentc3cd6b637d84cbbc37ee6361f6904663ecbda05c
x86: Fix ptrdiff_t for x86_64

sbrk() assumes ptrdiff_t is large enough to enlarge/shrink the heap
by LONG_MIN/LONG_MAX.
So, use the long type, also to match the rest of the Linux ecosystem.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-By: Daniel Leidert <dleidert@debian.org>
Origin: https://source.denx.de/u-boot/u-boot/-/commit/c17b2a05dd50a3ba437e6373093a0d6a359cdee0
Bug: https://www.openwall.com/lists/oss-security/2025/02/17/2
Bug-Debian: https://bugs.debian.org/1098254
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2024-57258
Bug-Freexian-Security: https://deb.freexian.com/extended-lts/tracker/CVE-2024-57258

Gbp-Pq: Name CVE-2024-57258-3.patch
arch/x86/include/asm/posix_types.h