Control: tags -1 confirmed d-i On 2021-05-31 01:07:11 +0200, Thorsten Glaser wrote: > Package: release.debian.org > Severity: normal > User: release.debian....@packages.debian.org > Usertags: unblock > X-Debbugs-Cc: t...@mirbsd.de > > Please unblock package klibc > > [ Reason ] > The NMU contains a fix for #943425 (save/restore correct set of > registers across *{set,long}jmp) which is RC on s390x, which is > a release architecture. > > [ Impact ] > klibc-built binaries on s390x can malfunction. > > [ Tests ] > The mksh testsuite catches this. Today’s mksh upload’s buildd log > on s390x shows that the fix works. An S/390 expert provided the > correct set of registers to save/restore. I’ve compared it to the > glibc implementation afterwards, and it matches, so I believe it > to be correct. > > [ Risks ] > klibc is rather critical; it’s part of booting and installing (so > this also needs an udeb unblock). The patch affects s390x only, > as far as I can tell, but I believe it necessary there. > > [ Checklist ] > [x] all changes are documented in the d/changelog > [x] I reviewed all changes and I approve them > [x] attach debdiff against the package in testing > > [ Other info ] > This will need an udeb unblock; what do I need to do for this?
By adding Cryil (as d-i RM) and debian-boot@l.d.o to CC. Done now. Cheers > > unblock klibc/2.0.8-6.1 > diff -Nru klibc-2.0.8/debian/changelog klibc-2.0.8/debian/changelog > --- klibc-2.0.8/debian/changelog 2021-04-30 03:05:23.000000000 +0200 > +++ klibc-2.0.8/debian/changelog 2021-05-27 00:12:10.000000000 +0200 > @@ -1,3 +1,11 @@ > +klibc (2.0.8-6.1) unstable; urgency=medium > + > + * Non-maintainer upload. > + * {set,long}jmp [s390x]: save/restore the correct FPU registers > + (f8‥f15 not f1/f3/f5/f7) (Closes: #943425) > + > + -- Thorsten Glaser <t...@mirbsd.de> Thu, 27 May 2021 00:12:10 +0200 > + > klibc (2.0.8-6) unstable; urgency=medium > > * Upload to unstable > diff -Nru > klibc-2.0.8/debian/patches/0041-klibc-set-long-jmp-s390x-save-restore-the-correct-re.patch > > klibc-2.0.8/debian/patches/0041-klibc-set-long-jmp-s390x-save-restore-the-correct-re.patch > --- > klibc-2.0.8/debian/patches/0041-klibc-set-long-jmp-s390x-save-restore-the-correct-re.patch > 1970-01-01 01:00:00.000000000 +0100 > +++ > klibc-2.0.8/debian/patches/0041-klibc-set-long-jmp-s390x-save-restore-the-correct-re.patch > 2021-05-27 00:11:57.000000000 +0200 > @@ -0,0 +1,57 @@ > +Description: {set,long}jmp [s390x]: save/restore the correct registers > + The s390x ABI actually has FPU registers f8‥f15, not f1/f3/f5/f7, > + to be saved. (Closes: Debian #943425) > +Author: mirabilos <t...@debian.org> > +Forwarded: https://lists.zytor.com/archives/klibc/2021-May/004620.html > + > +--- a/usr/include/arch/s390/klibc/archsetjmp.h > ++++ b/usr/include/arch/s390/klibc/archsetjmp.h > +@@ -16,7 +16,7 @@ struct __jmp_buf { > + > + struct __jmp_buf { > + uint64_t __gregs[10]; /* general registers r6-r15 */ > +- uint64_t __fpregs[4]; /* fp registers f1, f3, f5, f7 */ > ++ uint64_t __fpregs[8]; /* fp registers f8-f15 */ > + }; > + > + #endif /* __s390x__ */ > +--- a/usr/klibc/arch/s390/setjmp.S > ++++ b/usr/klibc/arch/s390/setjmp.S > +@@ -38,10 +38,14 @@ longjmp: > + > + setjmp: > + stmg %r6,%r15,0(%r2) # save all general registers > +- std %f1,80(%r2) # save fp registers f4 and f6 > +- std %f3,88(%r2) > +- std %f5,96(%r2) > +- std %f7,104(%r2) > ++ std %f8,80(%r2) # save fp registers f8 to f15 > ++ std %f9,88(%r2) > ++ std %f10,96(%r2) > ++ std %f11,104(%r2) > ++ std %f12,112(%r2) > ++ std %f13,120(%r2) > ++ std %f14,128(%r2) > ++ std %f15,136(%r2) > + lghi %r2,0 # return 0 > + br %r14 > + > +@@ -54,10 +58,14 @@ setjmp: > + longjmp: > + lgr %r1,%r2 # jmp_buf > + lgr %r2,%r3 # return value > +- ld %f7,104(%r1) # restore all saved registers > +- ld %f5,96(%r1) > +- ld %f3,88(%r1) > +- ld %f1,80(%r1) > ++ ld %f15,136(%r1) # restore all saved registers > ++ ld %f14,128(%r1) > ++ ld %f13,120(%r1) > ++ ld %f12,112(%r1) > ++ ld %f11,104(%r1) > ++ ld %f10,96(%r1) > ++ ld %f9,88(%r1) > ++ ld %f8,80(%r1) > + lmg %r6,%r15,0(%r1) > + br %r14 # return to restored address > + > diff -Nru klibc-2.0.8/debian/patches/series klibc-2.0.8/debian/patches/series > --- klibc-2.0.8/debian/patches/series 2021-04-30 02:38:31.000000000 +0200 > +++ klibc-2.0.8/debian/patches/series 2021-05-27 00:09:21.000000000 +0200 > @@ -10,3 +10,4 @@ > 0037-klibc-calloc-Fail-if-multiplication-overflows.patch > 0039-klibc-cpio-Fix-possible-integer-overflow-on-32-bit-s.patch > 0040-klibc-cpio-Fix-possible-crash-on-64-bit-systems.patch > +0041-klibc-set-long-jmp-s390x-save-restore-the-correct-re.patch -- Sebastian Ramacher
signature.asc
Description: PGP signature