Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp838178ybd; Wed, 26 Jun 2019 06:51:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwVzPDrios6H7ysvOz3n3ewvNHVyhYh1U9vW3WNDJwuZAE37MT5JTK2auUVI+t/OQYm6Rs X-Received: by 2002:a17:90a:2247:: with SMTP id c65mr4797309pje.24.1561557102644; Wed, 26 Jun 2019 06:51:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561557102; cv=none; d=google.com; s=arc-20160816; b=ICAavCpHLqYyL1ByTFMs8l9s/u0a9MzavorMORk7BTiAtxdO8gYBeEIoaA2QFjTG/d Yqq1dxQkn/WMDdNPbBQs0ZZdyJ665yntOac4QI7Pjk8s8Eq1t0n6eSojc8D6+q7Q+e7z ROm5h6x68VYe1H6Px2mqe826oo/UegyQDXkacpL71Yeb7k5MrTcqp4v5RMhTOhWDMZiR K/wu2nRI3Y6b6grscy52FMVZPdIf8FruHXq1kh2svU5+FA3o6T7QkqcHFFrPy+96Vh1O K32Nb/sGRpIs1rudtGVHtUgeT9JNe2S4xtWj4Bikrl/DyXs9FGRYRTxtSiX3D1NWDbqP S4mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:user-agent:openpgp:in-reply-to :content-disposition:mime-version:references:message-id:cc:to:from :date:dkim-signature; bh=q9rA/NfcGBQU65ajNFj9+Mg9uUBNenWP09+IQ0w822s=; b=i6uyJsaPXolh10zS8YA4eBESRdzm/RPKP4NYbWN/o226284FJ4nIsTgFpPanq1GUFH Zg9k4Z5W9oCW0qP3EFjo7Z8TdK0LzOYnNfF+rxSZ/JRVn/FDhSPC9qxdf/VGVk3Gh+xW 3/WRwUQUIJs7ptRDSyeEnQKPOJYnqHs9LhMenUr502bmDpnUhCiasecK7RO8n0Tgw/Wr TT12R6y5Jjcy08ikpg5Nddhb3dZa99SAkrm/tFK2tYDXvucqIsNzznPwme4LZM01TTEn Kx0bz7GRcqLD91m9SbtP7nk1j8UyOeXMATOVhsNCTGVu9PFh2uj1x5JBTzs3DrxgUR8a /qbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=JdbL0h3Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cs.msu.ru Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c139si4149532pfb.140.2019.06.26.06.51.27; Wed, 26 Jun 2019 06:51:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@cs.msu.ru header.s=dkim header.b=JdbL0h3Q; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cs.msu.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727830AbfFZNuH (ORCPT + 99 others); Wed, 26 Jun 2019 09:50:07 -0400 Received: from mx.cs.msu.ru ([188.44.42.42]:39415 "EHLO mail.cs.msu.ru" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726628AbfFZNuE (ORCPT ); Wed, 26 Jun 2019 09:50:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.msu.ru; s=dkim; h=Subject:In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=q9rA/NfcGBQU65ajNFj9+Mg9uUBNenWP09+IQ0w822s=; b=JdbL0h3Qa5tGTc+cDi9syiZzmv 8hR5pwh81hv9AMS/ddTzfy+i0cfTRTquL0wz9rKm0AkH/8ibFfFtkMzrtwLyII5kkm6hf4BDc9SwS yxZu72hIR4Uqf4p8T9j6W+IcpnYp9+Lqou4LXAFsFbYPKHSox/pcqzxSYQGCsP70qFkfl5E/ezUG8 TFBhpreLF5okYDNTgTRG8iQ7bfDGT08Px5Dr0J1J4264nBp8xxTjwkigmJTgU2RxCtA16zdVd0uad x1p6X1HCE5fT0dF03i4OsAWym19br2LajYz2cMJ8/A1Hjsf3idDPIxD/H71gy5HBWuLWAtIp56rsD zX+tFHAQ==; Received: from [37.204.119.143] (port=58022 helo=cello) by mail.cs.msu.ru with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92 (FreeBSD)) (envelope-from ) id 1hg8J2-000KTm-6M; Wed, 26 Jun 2019 16:49:48 +0300 Date: Wed, 26 Jun 2019 16:49:41 +0300 From: Arseny Maslennikov To: Theodore Ts'o Cc: Greg Kroah-Hartman , Jiri Slaby , Ingo Molnar , Peter Zijlstra , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, "Vladimir D. Seleznev" , Rob Landley , "Eric W. Biederman" , Pavel Machek Message-ID: <20190626134941.GA3668@cello> References: <20190625161153.29811-1-ar@cs.msu.ru> <20190625161153.29811-5-ar@cs.msu.ru> <20190625213215.GB3116@mit.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="mYCpIKhGyMATD0i+" Content-Disposition: inline In-Reply-To: <20190625213215.GB3116@mit.edu> OpenPGP: url=http://grep.cs.msu.ru/~ar/pgp-key.asc User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 37.204.119.143 X-SA-Exim-Mail-From: ar@cs.msu.ru X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.cs.msu.ru X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_ALL autolearn=no autolearn_force=no version=3.4.2 Subject: Re: [PATCH v2 4/7] linux/signal.h: Ignore SIGINFO by default in new tasks X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on mail.cs.msu.ru) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 25, 2019 at 05:32:15PM -0400, Theodore Ts'o wrote: > On Tue, Jun 25, 2019 at 07:11:50PM +0300, Arseny Maslennikov wrote: > > This matches the behaviour of other Unix-like systems that have SIGINFO > > and causes less harm to processes that do not install handlers for this > > signal, making the keyboard status character non-fatal for them. > >=20 > > This is implemented with the assumption that SIGINFO is defined > > to be equivalent to SIGPWR; still, there is no reason for PWR to > > result in termination of the signal recipient anyway =E2=80=94 it does = not > > indicate there is a fatal problem with the recipient's execution > > context (like e.g. FPE/ILL do), and we have TERM/KILL for explicit > > termination requests. >=20 > So this is a consequence of trying to overload SIGINFO with SIGPWR. Pretty much. > At least on some legacy Unix systems, the way SIGPWR worked was that > init would broadcast SIGPWR to all userspace process (with system > daemons on an exception list so they could get shutdown last). > Applications which didn't have a SIGPWR handler registered, would just > exit. Those that did, were expected to clean up in preparation with > the impending shutdown. After some period of time, then processes > would get hard killed and then system daemons would get shut down and > the system would cleanly shut itself down. >=20 > So SIGPWR acted much like SIGHUP, and that's why the default behavior > was "terminate". Now, as far as I know, we've not actually used in > that way, at least for most common distributions, but there is a sane > reason why things are they way there are, and in there are people who > have been using SIGPWR the way it had originally been intended, there > is risk in overloading SIGINFO with SIGPWR --- in particular, typing > ^T might cause some enterprise database to start shutting itself down. := -) Only if that enterprise database: 1) has a controlling terminal (a strange condition for a daemon, IMHO) 2) that terminal has the status character set in the struct termios. >=20 > (In particular it might be worth checking Linux ports of Oracle and > DB2.) A quick google got me this document: https://docs.oracle.com/cd/B28359_01/server.111/b32009.pdf It only ever mentions CHLD, CONT, INT, PIPE, TERM, URG and IO. I have no real experience with neither DB2 nor Oracle DB, though, and no way to get hold of that kind of software, so I don't know where to look further. If we'd like to be really sure no one's hurt we'll need someone with actual expertise here. --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE56JD3UKTLEu/ddrm9dQjyAYL01AFAl0Td+cACgkQ9dQjyAYL 01C+9Q//QnhdAMuhEYr16Lcyx+FX+ZuTVpxDBHa6pogsPcLTd0K+J4XxxPp2+jC/ blxZ91l6mqNHkoESH7zXRyiZSHigh2HeFyymiE+89qtkf9ZO387f3vRjOtyu+UAz jOujhiWETPCrUb1Yfw6tzCHP4odH7mnTaIydNw7OYuWyyIvkRQXnv0HQJalouzqf F5hxr/1F0gMTomIr/dgc7bunQGFt3CzshZauHtdAPe7rainc3vbVvNqRHi9zJkL4 rkqK+S9Z++l3+EP/K4rgFNU2sQ12wgOJKMR90cuRN+tnfEZp5hOZcsDlr6LWA6tD 9BH7J5yCP8oNCecksvjDN49ZriS8aEoA/P6ojyjgVKDK5HipvCY+5LojaHjzDL23 7PmWi7VY9JVHkmFM3bCoU1oX4iVTh5CnyBj593M96S+wcR0i+v7j9o8J8rtd4rwk Y9uM16BI4EcC+nNGefMS3e+qPVTn94WuzjH4myCTgGJPsO7wVZ4EYwBhioFT2tCs EeHXbVVcZiwlPVp+mb4ZDO71hhpVYsrxOFYAXPGHAyeXwtoXbYxIJoOUROqxN7LV qrZylTRi0ItP2NQpDMWbX9XcqOGcEs5+vlouLE/Hneoqkzx50xPFxdpjnthplCUN Dm7MxjPFqgdfHW4W0jfxITJrMX+vkxsrrSM1ClYE8lw06FHfV2A= =fn7K -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--