From 19104fbe8ff6a3b43c83c976dfa4a976c1186e8b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 22 Aug 2024 12:54:36 +0200 Subject: [PATCH 01/10] Update to version 2.1.1724232689 --- .gitignore | 1 + luajit-2.1-s390x-support.patch | 24 ++++++++++++++++-------- sources | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 6acad74..2fcaf74 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /LuaJIT-2.1.1707061634.tar.gz /LuaJIT-2.1.1713773202.tar.gz /LuaJIT-2.1.1720049189.tar.gz +/LuaJIT-2.1.1724232689.tar.gz diff --git a/luajit-2.1-s390x-support.patch b/luajit-2.1-s390x-support.patch index 003b161..1c7ef47 100644 --- a/luajit-2.1-s390x-support.patch +++ b/luajit-2.1-s390x-support.patch @@ -1,4 +1,4 @@ -From fb784d1f941d485f677525b234a33c86883bc3a3 Mon Sep 17 00:00:00 2001 +From db9c993d2ffcf09b3995b8949bb8f5026e610857 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Thu, 31 Aug 2023 11:18:32 +0200 Subject: [PATCH 1/2] Add s390x architecture support to DynASM @@ -2232,7 +2232,7 @@ index ec99e501f6..d460b31440 100644 #error "No support for this architecture (yet)" #endif -From cf11a60f7bbfccd59cb9fef602f09ffb7c0849bc Mon Sep 17 00:00:00 2001 +From e0728b5f0616088db6f7856b5eaba91625e23577 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Fri, 11 Aug 2023 13:51:19 +0200 Subject: [PATCH 2/2] Add s390x architecture support @@ -2258,14 +2258,14 @@ Signed-off-by: Ilya Leoshkevich src/lj_frame.h | 14 + src/lj_target.h | 2 + src/lj_target_s390x.h | 80 + - src/vm_s390x.dasc | 4261 ++++++++++++++++++++++++++++++++++++++++ - 14 files changed, 4515 insertions(+) + src/vm_s390x.dasc | 4269 ++++++++++++++++++++++++++++++++++++++++ + 14 files changed, 4523 insertions(+) create mode 100644 src/jit/dis_s390x.lua create mode 100644 src/lj_target_s390x.h create mode 100644 src/vm_s390x.dasc diff --git a/src/Makefile b/src/Makefile -index 224d21e703..38b94851f0 100644 +index 43238912ab..900068bd98 100644 --- a/src/Makefile +++ b/src/Makefile @@ -243,6 +243,9 @@ else @@ -2385,7 +2385,7 @@ index b83c865a47..37966c483a 100644 #error "Missing CPU detection for this architecture" #endif diff --git a/src/lj_arch.h b/src/lj_arch.h -index 026e741f44..b0669d2447 100644 +index e626439816..d0525293b1 100644 --- a/src/lj_arch.h +++ b/src/lj_arch.h @@ -31,6 +31,8 @@ @@ -2709,10 +2709,10 @@ index 0000000000..dfd395d9c2 +#endif diff --git a/src/vm_s390x.dasc b/src/vm_s390x.dasc new file mode 100644 -index 0000000000..222c0d1c34 +index 0000000000..f1e03bfc21 --- /dev/null +++ b/src/vm_s390x.dasc -@@ -0,0 +1,4261 @@ +@@ -0,0 +1,4269 @@ +|// Low-level VM code for IBM z/Architecture (s390x) CPUs in LJ_GC64 mode. +|// Bytecode interpreter, fast functions and helper functions. +|// Copyright (C) 2005-2016 Mike Pall. See Copyright Notice in luajit.h @@ -4024,6 +4024,10 @@ index 0000000000..222c0d1c34 + |//-- Base library: catch errors ---------------------------------------- + | + |.ffunc_1 pcall ++ | lg L:RB, SAVE_L ++ | sllg RA, NARGS:RD, 3 ++ | la RA, 0(RA, BASE) ++ | clg RA, L:RB->maxstack; jh ->fff_fallback + | la RA, 16(BASE) + | aghi NARGS:RD, -1 + | lghi PC, 16+FRAME_PCALL @@ -4043,6 +4047,10 @@ index 0000000000..222c0d1c34 + | j ->vm_call_dispatch + | + |.ffunc_2 xpcall ++ | lg L:RB, SAVE_L ++ | sllg RA, NARGS:RD, 3 ++ | la RA, 0(RA, BASE) ++ | clg RA, L:RB->maxstack; jh ->fff_fallback + | lg LFUNC:RA, 8(BASE) + | checktp_nc LFUNC:RA, LJ_TFUNC, ->fff_fallback + | lg LFUNC:RB, 0(BASE) // Swap function and traceback. diff --git a/sources b/sources index 9bb2e89..7eb15d8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (LuaJIT-2.1.1720049189.tar.gz) = 8bc8e4c2bdcc75e57a293fd278d1b188d0f440bd83924a7e6f06dda4a1c7d31eec6cf36f165be08a871a09a8c33640dae53ae845f4250d3c6329a340aa00006f +SHA512 (LuaJIT-2.1.1724232689.tar.gz) = 84da68ba3cc8d4d834b4206362cdd55ac437c5d20b754eaca0f4c028bc957504889a624b8d6efbfc9b5efea8b43e44e04ac6086c68f2f8e14a251e61b26363bb SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57 From 59d1e202ba80c8b343c999de9d4fe0261313c83a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 14 Nov 2024 14:31:23 +0100 Subject: [PATCH 02/10] Update to version 2.1.1731485912 - Fix bcsave assertion on s390x - resolves: rhbz#2323980 --- luajit-2.1-s390x-support.patch | 30 ++++++++++++++++++++++-------- luajit.spec | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/luajit-2.1-s390x-support.patch b/luajit-2.1-s390x-support.patch index 1c7ef47..f6b2e77 100644 --- a/luajit-2.1-s390x-support.patch +++ b/luajit-2.1-s390x-support.patch @@ -1,4 +1,4 @@ -From db9c993d2ffcf09b3995b8949bb8f5026e610857 Mon Sep 17 00:00:00 2001 +From dee73f516f0da49e930dcfa1dd61720dcb69b7dd Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Thu, 31 Aug 2023 11:18:32 +0200 Subject: [PATCH 1/2] Add s390x architecture support to DynASM @@ -11,7 +11,8 @@ missing pieces in the ecosystem support is LuaJIT. The s390x support for LuaJIT was initially developed by @ketank-new, @mundaym and @niravthakkar. It found its way into moonjit and luajit2 forks, as well as Fedora distro (as a patch). There were also smaller -contributions by @preetikhorjuvenkar, @Bisht13, @velemas and @iii-i. +contributions by @preetikhorjuvenkar, @Bisht13, @velemas, +@AlekseiNikiforovIBM, and @iii-i. This is a cumulative patch of the DynASM changes from this work. It contains all the contributions squashed together, plus minor stylistic @@ -2232,7 +2233,7 @@ index ec99e501f6..d460b31440 100644 #error "No support for this architecture (yet)" #endif -From e0728b5f0616088db6f7856b5eaba91625e23577 Mon Sep 17 00:00:00 2001 +From 035f133798adb856391928600f7cb6b4f81578ab Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Fri, 11 Aug 2023 13:51:19 +0200 Subject: [PATCH 2/2] Add s390x architecture support @@ -2247,6 +2248,7 @@ Signed-off-by: Ilya Leoshkevich --- src/Makefile | 4 + src/host/buildvm_asm.c | 53 + + src/jit/bcsave.lua | 1 + src/jit/dis_s390x.lua | 1 + src/lib_jit.c | 2 + src/lj_arch.h | 19 + @@ -2259,13 +2261,13 @@ Signed-off-by: Ilya Leoshkevich src/lj_target.h | 2 + src/lj_target_s390x.h | 80 + src/vm_s390x.dasc | 4269 ++++++++++++++++++++++++++++++++++++++++ - 14 files changed, 4523 insertions(+) + 15 files changed, 4524 insertions(+) create mode 100644 src/jit/dis_s390x.lua create mode 100644 src/lj_target_s390x.h create mode 100644 src/vm_s390x.dasc diff --git a/src/Makefile b/src/Makefile -index 43238912ab..900068bd98 100644 +index 99642be7b3..1f5d78faaf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -243,6 +243,9 @@ else @@ -2287,7 +2289,7 @@ index 43238912ab..900068bd98 100644 ifneq (,$(findstring LJ_TARGET_PS3 1,$(TARGET_TESTARCH))) TARGET_SYS= PS3 diff --git a/src/host/buildvm_asm.c b/src/host/buildvm_asm.c -index e7c5de708a..060ce22c5b 100644 +index 1b261206a8..7a1e0ce183 100644 --- a/src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c @@ -87,6 +87,54 @@ static void emit_asm_reloc_text(BuildCtx *ctx, uint8_t *cp, int n, @@ -2364,6 +2366,18 @@ index e7c5de708a..060ce22c5b 100644 #else emit_asm_words(ctx, ctx->code+ofs, next-ofs); #endif +diff --git a/src/jit/bcsave.lua b/src/jit/bcsave.lua +index 483788192a..8a6a1d18b4 100644 +--- a/src/jit/bcsave.lua ++++ b/src/jit/bcsave.lua +@@ -101,6 +101,7 @@ local map_arch = { + mips64el = { e = "le", b = 64, m = 8, f = 0x80000007, }, + mips64r6 = { e = "be", b = 64, m = 8, f = 0xa0000407, }, + mips64r6el = { e = "le", b = 64, m = 8, f = 0xa0000407, }, ++ s390x = { e = "be", b = 64, m = 22, }, + } + + local map_os = { diff --git a/src/jit/dis_s390x.lua b/src/jit/dis_s390x.lua new file mode 100644 index 0000000000..3c63033bf4 @@ -2570,10 +2584,10 @@ index 17d26b52e6..df51c0eb48 100644 #error "Missing calling convention definitions for this architecture" #endif diff --git a/src/lj_err.c b/src/lj_err.c -index 414ef477a4..b183605a48 100644 +index b0ceaa2fa8..4a3d868a22 100644 --- a/src/lj_err.c +++ b/src/lj_err.c -@@ -448,6 +448,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, int actions, +@@ -442,6 +442,9 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, int actions, if (version != 1) return _URC_FATAL_PHASE1_ERROR; cf = (void *)_Unwind_GetCFA(ctx); diff --git a/luajit.spec b/luajit.spec index bb35473..9d7b5a2 100644 --- a/luajit.spec +++ b/luajit.spec @@ -2,7 +2,7 @@ %global luajit_version_major 2 %global luajit_version_minor 1 -%global luajit_version_patch 1720049189 +%global luajit_version_patch 1731485912 %global luajit_version %{luajit_version_major}.%{luajit_version_minor}.%{luajit_version_patch} From 6375dbc3e09c11af33cbb10dc963f285a5f1a675 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 14 Nov 2024 14:50:43 +0100 Subject: [PATCH 03/10] Update sources [skip changelog] --- .gitignore | 1 + sources | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2fcaf74..ba241c0 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /LuaJIT-2.1.1713773202.tar.gz /LuaJIT-2.1.1720049189.tar.gz /LuaJIT-2.1.1724232689.tar.gz +/LuaJIT-2.1.1731485912.tar.gz diff --git a/sources b/sources index 7eb15d8..501259a 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (LuaJIT-2.1.1724232689.tar.gz) = 84da68ba3cc8d4d834b4206362cdd55ac437c5d20b754eaca0f4c028bc957504889a624b8d6efbfc9b5efea8b43e44e04ac6086c68f2f8e14a251e61b26363bb -SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57 +SHA512 (LuaJIT-2.1.1731485912.tar.gz) = cc6a487ad33051198997e29915088803eb91f90b1bb353b28a84fafba78816e9ffc0094e2d1119e2a8116005a8600af8d6ed7069fde7685d115c9bf74db7970c From 4f3ef8f24cdb89286b9feb973fbf321bd61c90b4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 14 Nov 2024 16:10:45 +0100 Subject: [PATCH 04/10] Re-add LuaJIT-test-cleanup.tar.gz to sources [skip changelog] --- sources | 1 + 1 file changed, 1 insertion(+) diff --git a/sources b/sources index 501259a..01f7d22 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (LuaJIT-2.1.1731485912.tar.gz) = cc6a487ad33051198997e29915088803eb91f90b1bb353b28a84fafba78816e9ffc0094e2d1119e2a8116005a8600af8d6ed7069fde7685d115c9bf74db7970c +SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57 From 272698d73dd1e476c143db52b2f53081120fadc1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 16:20:31 +0000 Subject: [PATCH 05/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 2b4fcf685a3cb158fc73d9f43c4c28c4ff79c0e4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 14 Apr 2025 15:41:47 +0200 Subject: [PATCH 06/10] Update to version 2.1.1744318430 --- .gitignore | 1 + luajit.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ba241c0..ece4909 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /LuaJIT-2.1.1720049189.tar.gz /LuaJIT-2.1.1724232689.tar.gz /LuaJIT-2.1.1731485912.tar.gz +/LuaJIT-2.1.1744318430.tar.gz diff --git a/luajit.spec b/luajit.spec index 9d7b5a2..e017d8c 100644 --- a/luajit.spec +++ b/luajit.spec @@ -2,7 +2,7 @@ %global luajit_version_major 2 %global luajit_version_minor 1 -%global luajit_version_patch 1731485912 +%global luajit_version_patch 1744318430 %global luajit_version %{luajit_version_major}.%{luajit_version_minor}.%{luajit_version_patch} diff --git a/sources b/sources index 01f7d22..5aa1129 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (LuaJIT-2.1.1731485912.tar.gz) = cc6a487ad33051198997e29915088803eb91f90b1bb353b28a84fafba78816e9ffc0094e2d1119e2a8116005a8600af8d6ed7069fde7685d115c9bf74db7970c +SHA512 (LuaJIT-2.1.1744318430.tar.gz) = 08fbc5e13451510e5f29860513ea860117112250082d24323daaeab9560f443bb2caa736242f6f7c82d91d35533d290e98f0c591fecc1a54eca27689459c0ab1 SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57 From 0abdb434efe9d2031b0e4ade62896e35da84734f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 8 Jul 2025 14:18:21 +0200 Subject: [PATCH 07/10] Update to version 2.1.1748459687 - Fixes CVE-2024-25176 --- .gitignore | 1 + luajit.spec | 2 +- sources | 3 +-- update_tarball.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ece4909..d428390 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /LuaJIT-2.1.1724232689.tar.gz /LuaJIT-2.1.1731485912.tar.gz /LuaJIT-2.1.1744318430.tar.gz +/LuaJIT-2.1.1748459687.tar.gz diff --git a/luajit.spec b/luajit.spec index e017d8c..d3d2dd2 100644 --- a/luajit.spec +++ b/luajit.spec @@ -2,7 +2,7 @@ %global luajit_version_major 2 %global luajit_version_minor 1 -%global luajit_version_patch 1744318430 +%global luajit_version_patch 1748459687 %global luajit_version %{luajit_version_major}.%{luajit_version_minor}.%{luajit_version_patch} diff --git a/sources b/sources index 5aa1129..11e9ce2 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (LuaJIT-2.1.1744318430.tar.gz) = 08fbc5e13451510e5f29860513ea860117112250082d24323daaeab9560f443bb2caa736242f6f7c82d91d35533d290e98f0c591fecc1a54eca27689459c0ab1 -SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57 +SHA512 (LuaJIT-2.1.1748459687.tar.gz) = 826ecb3ed7b0f8731f5d679d4a45de1531553e6d5e35eed5fdcd88fc0a7fb00d4bb73ed54f34c603f8d25ba3a3c4019910de3046971e36614ef14e65bc43deed diff --git a/update_tarball.sh b/update_tarball.sh index 5b76e91..75f45f2 100644 --- a/update_tarball.sh +++ b/update_tarball.sh @@ -39,7 +39,7 @@ echo "LUAJIT_VERSION=${LUAJIT_VERSION_NEW}" mv "${LUAJIT_PKGNAME}-${LUAJIT_VERSION}.tar.gz" "${LUAJIT_PKGDIR}/${LUAJIT_PKGNAME}-${LUAJIT_VERSION_NEW}.tar.gz" echo -echo ">>> New tarball ${LUAJIT_PKGNAME}-${LUAJIT_VERSION_NEW}.tar.gz" +echo ">>> New tarball, run: fedpkg new-sources ${LUAJIT_PKGNAME}-${LUAJIT_VERSION_NEW}.tar.gz" popd || cleanup_and_exit 1 From a991d71a64d4227c8f3adb198ca0f76551955cf8 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 8 Jul 2025 14:38:44 +0200 Subject: [PATCH 08/10] Fix sources [skip changelog] --- sources | 1 + update_tarball.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sources b/sources index 11e9ce2..deb5a69 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (LuaJIT-2.1.1748459687.tar.gz) = 826ecb3ed7b0f8731f5d679d4a45de1531553e6d5e35eed5fdcd88fc0a7fb00d4bb73ed54f34c603f8d25ba3a3c4019910de3046971e36614ef14e65bc43deed +SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57 diff --git a/update_tarball.sh b/update_tarball.sh index 75f45f2..3219a08 100644 --- a/update_tarball.sh +++ b/update_tarball.sh @@ -39,7 +39,7 @@ echo "LUAJIT_VERSION=${LUAJIT_VERSION_NEW}" mv "${LUAJIT_PKGNAME}-${LUAJIT_VERSION}.tar.gz" "${LUAJIT_PKGDIR}/${LUAJIT_PKGNAME}-${LUAJIT_VERSION_NEW}.tar.gz" echo -echo ">>> New tarball, run: fedpkg new-sources ${LUAJIT_PKGNAME}-${LUAJIT_VERSION_NEW}.tar.gz" +echo ">>> New tarball, run: fedpkg new-sources ${LUAJIT_PKGNAME}-${LUAJIT_VERSION_NEW}.tar.gz LuaJIT-test-cleanup.tar.gz" popd || cleanup_and_exit 1 From 0a26f58b25196761656096cf8168e4ef0b8d9a8d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 21:01:13 +0000 Subject: [PATCH 09/10] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From eb9b55cb85680c3c0c7e7406529b633de52539a0 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 3 Nov 2025 11:34:41 +0100 Subject: [PATCH 10/10] Update to version 2.1.1761727121 --- .gitignore | 1 + luajit.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d428390..bb04c3c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /LuaJIT-2.1.1731485912.tar.gz /LuaJIT-2.1.1744318430.tar.gz /LuaJIT-2.1.1748459687.tar.gz +/LuaJIT-2.1.1761727121.tar.gz diff --git a/luajit.spec b/luajit.spec index d3d2dd2..94714c8 100644 --- a/luajit.spec +++ b/luajit.spec @@ -2,7 +2,7 @@ %global luajit_version_major 2 %global luajit_version_minor 1 -%global luajit_version_patch 1748459687 +%global luajit_version_patch 1761727121 %global luajit_version %{luajit_version_major}.%{luajit_version_minor}.%{luajit_version_patch} diff --git a/sources b/sources index deb5a69..020c63f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (LuaJIT-2.1.1748459687.tar.gz) = 826ecb3ed7b0f8731f5d679d4a45de1531553e6d5e35eed5fdcd88fc0a7fb00d4bb73ed54f34c603f8d25ba3a3c4019910de3046971e36614ef14e65bc43deed +SHA512 (LuaJIT-2.1.1761727121.tar.gz) = 67f5ca8952a8d7b0f0c92783aa67c1ede86f46483466fd834974f413e6f16980d3255bb6c16d3a5af009e36e0cbe1e7facbcc9d7fc63f8278f1e4683d9488b1b SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57