Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Andreas Schneider
35c8e51833 Fix sources
[skip changelog]
2025-07-08 15:02:47 +02:00
Andreas Schneider
2c16f865ad Update to version 2.1.1748459687
- Fixes CVE-2024-25176
- resolves: rhbz#2376988
2025-07-08 15:02:36 +02:00
Andreas Schneider
49f5e0e465 Update to version 2.1.1744318430 2025-07-08 15:02:15 +02:00
Andreas Schneider
ea98931f60 Re-add LuaJIT-test-cleanup.tar.gz to sources
[skip changelog]
2025-07-08 15:02:10 +02:00
Andreas Schneider
d92b249a97 Update sources
[skip changelog]
2025-07-08 15:02:08 +02:00
Andreas Schneider
f79e02a628 Update to version 2.1.1731485912
- Fix bcsave assertion on s390x
- resolves: rhbz#2323980
2025-07-08 15:02:06 +02:00
Andreas Schneider
a11e53a561 Update to version 2.1.1724232689 2025-07-08 15:02:04 +02:00
5 changed files with 41 additions and 15 deletions

4
.gitignore vendored
View file

@ -8,3 +8,7 @@
/LuaJIT-2.1.1707061634.tar.gz
/LuaJIT-2.1.1713773202.tar.gz
/LuaJIT-2.1.1720049189.tar.gz
/LuaJIT-2.1.1724232689.tar.gz
/LuaJIT-2.1.1731485912.tar.gz
/LuaJIT-2.1.1744318430.tar.gz
/LuaJIT-2.1.1748459687.tar.gz

View file

@ -1,4 +1,4 @@
From fb784d1f941d485f677525b234a33c86883bc3a3 Mon Sep 17 00:00:00 2001
From dee73f516f0da49e930dcfa1dd61720dcb69b7dd Mon Sep 17 00:00:00 2001
From: Ilya Leoshkevich <iii@linux.ibm.com>
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 cf11a60f7bbfccd59cb9fef602f09ffb7c0849bc Mon Sep 17 00:00:00 2001
From 035f133798adb856391928600f7cb6b4f81578ab Mon Sep 17 00:00:00 2001
From: Ilya Leoshkevich <iii@linux.ibm.com>
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 <iii@linux.ibm.com>
---
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 +
@ -2258,14 +2260,14 @@ Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
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 ++++++++++++++++++++++++++++++++++++++++
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 224d21e703..38b94851f0 100644
index 99642be7b3..1f5d78faaf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -243,6 +243,9 @@ else
@ -2287,7 +2289,7 @@ index 224d21e703..38b94851f0 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
@ -2385,7 +2399,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 @@
@ -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);
@ -2709,10 +2723,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 +4038,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 +4061,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.

View file

@ -2,7 +2,7 @@
%global luajit_version_major 2
%global luajit_version_minor 1
%global luajit_version_patch 1720049189
%global luajit_version_patch 1748459687
%global luajit_version %{luajit_version_major}.%{luajit_version_minor}.%{luajit_version_patch}

View file

@ -1,2 +1,2 @@
SHA512 (LuaJIT-2.1.1720049189.tar.gz) = 8bc8e4c2bdcc75e57a293fd278d1b188d0f440bd83924a7e6f06dda4a1c7d31eec6cf36f165be08a871a09a8c33640dae53ae845f4250d3c6329a340aa00006f
SHA512 (LuaJIT-2.1.1748459687.tar.gz) = 826ecb3ed7b0f8731f5d679d4a45de1531553e6d5e35eed5fdcd88fc0a7fb00d4bb73ed54f34c603f8d25ba3a3c4019910de3046971e36614ef14e65bc43deed
SHA512 (LuaJIT-test-cleanup.tar.gz) = a49baef3f27a157b3a2289dc3b10eec20befa5231a491a03d3393f280c6f73fa39893abb8e7e47c54e0341305ee3b320b8eb43af423c579781f108a040b62b57

View file

@ -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 LuaJIT-test-cleanup.tar.gz"
popd || cleanup_and_exit 1