Bug#885852: [sparc64] klibc-utils (2.0.4-10) regression, sigserv with fstype

2018-07-18 Thread John Paul Adrian Glaubitz
Hello!

Could we have the current version of the patch applied "as is" even
though it does not meet the quality standards yet?

Currently, klibc-utils is completely b0rked on sparc64 and anyone
dist-upgrading their sparc64 machine will immediately break the
machine upon next reboot.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913



Bug#885852: [sparc64] klibc-utils (2.0.4-10) regression, sigserv with fstype

2018-07-15 Thread James Clarke
On 15 Jul 2018, at 19:50, Ben Hutchings  wrote:
> 
> Control: tag -1 moreinfo
> 
> On Mon, 1 Jan 2018 22:59:59 + James Clarke  wrote:
> [...]
>> Please consider applying the patch forwarded upstream (linked in an
>> earlier control message) soon; this bug means that if the current
>> initramfs is updated, it will no longer boot, as run-init will segfault
>> in klibc. Given sparc64 is not a release architecture I can't make this
>> bug RC, otherwise I'd probably go for critical.
>> 
>> (To be clear, the issue is in 2.0.4-10 simply because that is the first
>> upload to happen since sparc64 has had PIE enabled by default in GCC)
> 
> How exactly did you test this patch?  It looks like it will cause
> pipe() to crash on success.  You put the first instruction of the PIC
> prologue into a branch delay slot, which overwrites the register
> holding the pointer used to store the system call return values.

I guess nothing I ran used pipe... but you're right, I was trying to be clever
with the branch delay slots (taking into account that some them already
clobbered %g4 for a position-dependent errno address calculation) and hadn't
noticed that pipe was using %g4 as a "caller"-saved register (it's clobbered by
userspace calls...). I shall put the nops back in and somehow give it a proper
test.

James



Bug#885852: [sparc64] klibc-utils (2.0.4-10) regression, sigserv with fstype

2018-07-15 Thread Ben Hutchings
Control: tag -1 moreinfo

On Mon, 1 Jan 2018 22:59:59 + James Clarke  wrote:
[...]
> Please consider applying the patch forwarded upstream (linked in an
> earlier control message) soon; this bug means that if the current
> initramfs is updated, it will no longer boot, as run-init will segfault
> in klibc. Given sparc64 is not a release architecture I can't make this
> bug RC, otherwise I'd probably go for critical.
> 
> (To be clear, the issue is in 2.0.4-10 simply because that is the first
> upload to happen since sparc64 has had PIE enabled by default in GCC)

How exactly did you test this patch?  It looks like it will cause
pipe() to crash on success.  You put the first instruction of the PIC
prologue into a branch delay slot, which overwrites the register
holding the pointer used to store the system call return values.

Ben.

-- 
Ben Hutchings
One of the nice things about standards is that
there are so many of them.



signature.asc
Description: This is a digitally signed message part


Bug#885852: [sparc64] klibc-utils (2.0.4-10) regression, sigserv with fstype

2018-01-01 Thread James Clarke
Control: severity -1 important

On Sat, Dec 30, 2017 at 03:48:07PM +0300, Anatoly Pugachev wrote:
> Package: klibc-utils
> Version: 2.0.4-10
> Severity: normal
>
> Dear Maintainer,
>
> Upgrading klibc-utils from 2.0.4-9 to 2.0.4-10 started to produce sigserv in 
> fstype
>
>* What exactly did you do (or not do) that was effective (or
>  ineffective)?
>
> using latest version 2.0.4-10 :
>
> $ dpkg -l klibc-utils
> ||/ Name   VersionArchitecture
>Description
> +++-==-==-==-=
> ii  klibc-utils2.0.4-10   sparc64 
>small utilities built with klibc for early boot
>
> $ /usr/lib/klibc/bin/fstype
> Segmentation fault (core dumped)
>
> $ sudo /usr/lib/klibc/bin/fstype /dev/vdiska2
> Segmentation fault
>
> I tried with upstream klibc.git repo, but getting sigserv as well, and since
> klibc.git does not have changed files almost a year now, not sure gdb 
> backtrace
> could be relevant, please see
> http://www.zytor.com/pipermail/klibc/2017-December/003965.html
>
>
>* What outcome did you expect instead?
>
> using older package version of 2.0.4-9 :
>
> # dpkg -i *.deb
> dpkg: warning: downgrading klibc-utils from 2.0.4-10 to 2.0.4-9
> (Reading database ... 68475 files and directories currently installed.)
> Preparing to unpack klibc-utils_2.0.4-9_sparc64.deb ...
> Unpacking klibc-utils (2.0.4-9) over (2.0.4-10) ...
> dpkg: warning: downgrading libklibc from 2.0.4-10 to 2.0.4-9
> Preparing to unpack libklibc_2.0.4-9_sparc64.deb ...
> Unpacking libklibc (2.0.4-9) over (2.0.4-10) ...
> Setting up libklibc (2.0.4-9) ...
> Setting up klibc-utils (2.0.4-9) ...
> root@ttip:~/1# exit
>
> mator@ttip:~/linux-2.6$ dpkg -L klibc-utils | grep fstype
> /usr/lib/klibc/bin/fstype
>
> mator@ttip:~/linux-2.6$ /usr/lib/klibc/bin/fstype
> stdin: Illegal seek
>
> mator@ttip:~$ dpkg -l klibc-utils
> ||/ Name   VersionArchitecture
>Description
> +++-==-==-==-=
> ii  klibc-utils2.0.4-9sparc64 
>small utilities built with klibc for early boot
>
> mator@ttip:~$ sudo /usr/lib/klibc/bin/fstype /dev/vdiska2
> FSTYPE=ext4
> FSSIZE=15002910720

Please consider applying the patch forwarded upstream (linked in an
earlier control message) soon; this bug means that if the current
initramfs is updated, it will no longer boot, as run-init will segfault
in klibc. Given sparc64 is not a release architecture I can't make this
bug RC, otherwise I'd probably go for critical.

(To be clear, the issue is in 2.0.4-10 simply because that is the first
upload to happen since sparc64 has had PIE enabled by default in GCC)

Regards,
James



Bug#885852: [sparc64] klibc-utils (2.0.4-10) regression, sigserv with fstype

2017-12-30 Thread Anatoly Pugachev
Package: klibc-utils
Version: 2.0.4-10
Severity: normal

Dear Maintainer,

Upgrading klibc-utils from 2.0.4-9 to 2.0.4-10 started to produce sigserv in 
fstype 

   * What exactly did you do (or not do) that was effective (or
 ineffective)?

using latest version 2.0.4-10 :

$ dpkg -l klibc-utils   
||/ Name   VersionArchitecture  
 Description
+++-==-==-==-=
ii  klibc-utils2.0.4-10   sparc64   
 small utilities built with klibc for early boot

$ /usr/lib/klibc/bin/fstype
Segmentation fault (core dumped)

$ sudo /usr/lib/klibc/bin/fstype /dev/vdiska2
Segmentation fault

I tried with upstream klibc.git repo, but getting sigserv as well, and since
klibc.git does not have changed files almost a year now, not sure gdb backtrace
could be relevant, please see 
http://www.zytor.com/pipermail/klibc/2017-December/003965.html


   * What outcome did you expect instead?

using older package version of 2.0.4-9 :  

# dpkg -i *.deb
dpkg: warning: downgrading klibc-utils from 2.0.4-10 to 2.0.4-9
(Reading database ... 68475 files and directories currently installed.)
Preparing to unpack klibc-utils_2.0.4-9_sparc64.deb ...
Unpacking klibc-utils (2.0.4-9) over (2.0.4-10) ...
dpkg: warning: downgrading libklibc from 2.0.4-10 to 2.0.4-9
Preparing to unpack libklibc_2.0.4-9_sparc64.deb ...
Unpacking libklibc (2.0.4-9) over (2.0.4-10) ...
Setting up libklibc (2.0.4-9) ...
Setting up klibc-utils (2.0.4-9) ...
root@ttip:~/1# exit

mator@ttip:~/linux-2.6$ dpkg -L klibc-utils | grep fstype
/usr/lib/klibc/bin/fstype

mator@ttip:~/linux-2.6$ /usr/lib/klibc/bin/fstype
stdin: Illegal seek

mator@ttip:~$ dpkg -l klibc-utils
||/ Name   VersionArchitecture  
 Description
+++-==-==-==-=
ii  klibc-utils2.0.4-9sparc64   
 small utilities built with klibc for early boot

mator@ttip:~$ sudo /usr/lib/klibc/bin/fstype /dev/vdiska2
FSTYPE=ext4
FSSIZE=15002910720



-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'unreleased'), (500, 'experimental')
Architecture: sparc64

Kernel: Linux 4.15.0-rc5-5-gbeacbc68ac3e (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages klibc-utils depends on:
ii  libklibc  2.0.4-10

klibc-utils recommends no packages.

klibc-utils suggests no packages.

-- no debconf information