Your message dated Mon, 25 Jul 2022 09:50:10 +0000
with message-id <e1ofuj4-0000lw...@fasolo.debian.org>
and subject line Bug#1015228: fixed in psmisc 23.5-3
has caused the Debian Bug report #1015228,
regarding psmisc: killall directly uses syscall pidfd_send_signal not available 
on older kernel
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1015228: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1015228
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: psmisc
Version: 23.5-2
Severity: important
Tags: upstream

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

killall hasn't been working on my old server (uptime 318 days) for
a while now, so I tracked it down.  The problem is that the code
nowadays dirctly does a syscall of pidfd_send_signal, which is not
available in the older kernel (4.15.17) on the server.

The solution is to Not Do That Then. Calling a libc function would take 
care of old kernel blemishes.

I just commented out the code, it falls through to kill from libc
so that's OK:

 static int
 my_send_signal(
    const int pidfd,
    const pid_t pid,
     const int sig)
 {
-#ifdef __NR_pidfd_send_signal
-    if (pid > 0) /* Not PGID */
-        return syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
-#endif
+//#ifdef __NR_pidfd_send_signal
+//    if (pid > 0) /* Not PGID */
+//        return syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
+//#endif
     return kill(pid, sig);
 }

Obviously that patch is not right, but I didn't care. The right
thing to do is NOT depend on defined __NR_pidfd_send_signal which tells
us that the kernel header installation knows about that syscall, but
says nothing about whether the platform kernel does or not.  Probably
just try the syscall and if you get ENOSYS then try the kill instead.

Like this:

#ifdef __NR_pidfd_send_signal
    if (pid > 0) /* Not PGID */ {
        int ret = syscall(__NR_pidfd_send_signal, pidfd, sig, NULL, 0);
        if (ret >= 0 || errno != ENOSYS) 
           return ret;
        // fallthru if erred with no such syscall in kernel
    }
#endif
    return kill(pid, sig);



-- System Information:
Debian Release: bookworm/sid
Architecture: i386 (i686)

Kernel: Linux 4.15.17-roxy (PREEMPT)
Kernel taint flags: TAINT_CPU_OUT_OF_SPEC
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages psmisc depends on:
ii  libc6      2.33-8
ii  libtinfo6  6.3+20220423-2

psmisc recommends no packages.

psmisc suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: psmisc
Source-Version: 23.5-3
Done: Craig Small <csm...@debian.org>

We believe that the bug you reported is fixed in the latest version of
psmisc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1015...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Craig Small <csm...@debian.org> (supplier of updated psmisc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 25 Jul 2022 19:21:16 +1000
Source: psmisc
Architecture: source
Version: 23.5-3
Distribution: unstable
Urgency: medium
Maintainer: Craig Small <csm...@debian.org>
Changed-By: Craig Small <csm...@debian.org>
Closes: 1015228
Changes:
 psmisc (23.5-3) unstable; urgency=medium
 .
   * killall: Add fall through for pidfd_send_signal Closes: #1015228
   * Update standards version to 4.6.1, no changes needed.
Checksums-Sha1:
 dbefe77cb7f8cd10611ded476eedaa5f6347e4e7 1864 psmisc_23.5-3.dsc
 1e6bf725c3f33c6771369c86a2df5c7d17c692df 8360 psmisc_23.5-3.debian.tar.xz
 797c37ee6cca905e4ceb67b15476d79d50965822 6580 psmisc_23.5-3_amd64.buildinfo
Checksums-Sha256:
 f75f71769d3848944053a95055d3caf2db636727fc547b2a06d42a2da151e867 1864 
psmisc_23.5-3.dsc
 44c85173f5493785529aefff8a24645142c5ee9305b8974838ee868ef6f0761e 8360 
psmisc_23.5-3.debian.tar.xz
 7472e321b939aefc725f170c6db67bce7d5bf8f3c95ea39023ffc63edf9125d5 6580 
psmisc_23.5-3_amd64.buildinfo
Files:
 edb27271b76e56f1df8e81e2c80d5462 1864 admin optional psmisc_23.5-3.dsc
 6bf3838e566d49ac27cf5c645a2a13c5 8360 admin optional 
psmisc_23.5-3.debian.tar.xz
 dc54bddd863efe47e5eb75c2b65a5192 6580 admin optional 
psmisc_23.5-3_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXT3w9TizJ8CqeneiAiFmwP88hOMFAmLeYNwACgkQAiFmwP88
hOMDSQ/+KOhDh+BjZaFtQKBuhIWapOB9mkVPNhgo/H74NiPV2G797RauD1ZZJuNk
2J3aQV6YEaEN88YH9bf9mwx+/bit3eheIOUUElpww+bbz/aBQl2MyXpEZJDkMABd
KH4opbmDoQ7TC9jJQWq1K0whKv6xo5qSAZcmYQyOOB1M8aU08t0nFLSP2uyI/wGp
q3D5gJANLwA53NRmyWNZKU5lSKEMPihJw/8j5GxBqxsOkwCxn525f92F3BGYfL7p
/yYAruF2/DHyeFWnbqq3rgKXdAgPtjzNe13H6pshvPQyeBNvRj7x0ldSCKHJmQ/z
WkELkbm78vAw+MFsrCXhpJHKg18H64fBr9eK9t1EyhbV56B9trY40kNLx5IcehB/
6TIRBDTWTFvDfz3ddHFrVZxPGY0uWsx6ezKFFT1+7WSGtRF/fCgcEFYcSUPZGEpS
w+jQNpu362VvkQVtqI/bjZBxfXTUk5zoB6ZImvLgnzHGczxNEqt/1TtVja79l9aT
su80oxhxl/oXDGmIWZNBxUAaMR3Q7cD0jfmcSVpB1t5RPJT4oYesx7TIlb2+tajj
G7VePdaYgdACCJX0m4+k5rP721Mj2F1ufrcBP+qOffsQzLqaHY1Ke8x02DXtVTQq
YcYBYnrHfHKotjkImc/XUMcMbbl30KYG7NF0Y5h5n8+jRltENsA=
=YwgD
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to