Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbdGLWgn (ORCPT ); Wed, 12 Jul 2017 18:36:43 -0400 Received: from mail-eopbgr10097.outbound.protection.outlook.com ([40.107.1.97]:36208 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752652AbdGLWge (ORCPT ); Wed, 12 Jul 2017 18:36:34 -0400 Authentication-Results: xmission.com; dkim=none (message not signed) header.d=none;xmission.com; dmarc=none action=none header.from=virtuozzo.com; Date: Wed, 12 Jul 2017 15:36:04 -0700 From: Andrei Vagin To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Linus Torvalds , Al Viro , Oleg Nesterov , Thomas Gleixner , Greg KH , Andrey Vagin , Serge Hallyn , Pavel Emelyanov , Cyrill Gorcunov , Peter Zijlstra , Willy Tarreau , linux-arch@vger.kernel.org, linux-api@vger.kernel.org, Linux Containers , Michael Kerrisk Subject: Re: [PATCH 8/8] signal: Remove kernel interal si_code magic Message-ID: <20170712223557.GA21885@outlook.office365.com> References: <87efu22set.fsf@xmission.com> <20170630123906.8865-8-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20170630123906.8865-8-ebiederm@xmission.com> User-Agent: Mutt/1.8.0 (2017-02-23) X-Originating-IP: [4.16.175.162] X-ClientProxiedBy: CY4PR08CA0084.namprd08.prod.outlook.com (2603:10b6:910:73::49) To VI1PR08MB0752.eurprd08.prod.outlook.com (2a01:111:e400:5a04::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0891b703-64db-4e7f-87e5-08d4c9766a52 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:VI1PR08MB0752; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0752;3:mf/PaxWwGS2tltvIVRkQe265uTd7FxKMZDdXSr+gXvNkIFdsnyDFLBidVi5kR6PmOQRfvyfb1h5du84Sd5DUgtZe/NCuRUpMNSuPh3936qAp2lILYF/ltsh0DC47Ubi3S746TQuFC1CM6iLqeeLzrQvL8DwmaEqmNHDW5EyZdws/mW5s1kcTu1C+SvRkl9hXryZDQw4l9GQNTFMpfYE1zN5WQmRPGPAz8QI5XDG29cIiD4V/ZTLPKdyNIqwtV/isWApf31KihZhANKkz928JfBsYeRqU0ebn4BcJFdFiK/0vyX7wEbvxOQjvLzoq8Xp/7zgn/hqNCyUcrD3g4fhQDQZmppPfvAzHSGdYB2c5vFi3GydsPVqx19CvgFRM7/1faB+4ElqMTHjdML2xoLkeGCBZ0aQ5pp1OWw6drEPZaGtmPUdj747V/uPZizbeJ6Em3jopM3+5E1tphzqBRfZXRXM+kWcz9V+zVX4bw7JtpyTRfP/ORCyz+4633b2NyqAbq6TrbuBXq7ghMoPfuUYTPl+5xlRu96NbqKdV96Fi4NGkwSGhgTXbQXiq+f77QQrB1+IYIxcn5EjHQPT1+UymMyni0fP6x7FfmB7Qr1miC9DhXqrMFixdyR7fQp11dxPngwPH/P0ZWTqTqkmEHfA7BKouIuj4IbHDj1k908y8d1azijuXWXtu6xpL5vr1HRQIzarZzVQESYZWTg3s09yuCo/CVltWvJpmw8aWaiLfLjo= X-MS-TrafficTypeDiagnostic: VI1PR08MB0752: X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0752;25:558jF3LEYZOHjE/Ude53uIPSua1p5RxYXxjtZW3uECjhwnYARfz/Ig2JGQYmt+6IKSsmMe/OsqZiCQgprpnD7gpO8XIiz5/DLL4kO6MQJ3P6JdxTDhc0eH6iU9wVt08qQvxE3yjfsA1xKzm0385SetIs3x56UNLe7MN8tTdfPyAMXm8u301Hk8u6XIFmajmDi7v0Au1Od3X8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3Op6C2zr7M6sj1B3u8Sp788Aeln6A9UsWAubPDYbUl/KGDfBf5BLXnJWzasdediwb80snuvOg0OG5rhW4DWex3LoXWmBVJMawj4WTEf+XpqWES7lBio4G6SE9LXmppKB2W618mXgk8CFX7XeoHPD7GinT6L6aHGBDnr2L79J4X56Z1jA/b7JQFHGeiFLIHxCJdG2iWaHh+VPJszk/huizgNFqB9uFuUV1QefkWlsD/rbn2dyCxw4BPL0ArnfZjFekfmrZcFGIFI1PiTeyRWPd/Fy7/Al/AUlq5pQSfB7uMAX4iQmR19wZjaKzv0j481icq6/zrb8c0J3OvWxM6opotmMJAC0wr0xgfBw0sqD7gk/MwQsKJ6kLxlXrnw= X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0752;20:1kFMmoqQFcpzTVgpyhsJJ+coG/OjG3By8C6n/vSF9GbkTktU4hoRzux6jw5BtuPXLTCo9qiTR/P9nO3HRIT/oL0hOJMxnZXeRm2igJwaKo34Hb7mQfzX/VSI07qYT90Ja6uv1Tf3MgguqwzDRSoZgtxGJsBuPKr7Dvt8Et3tyO346mI8PBJBhMUjmzXBMJOGKfyOxsYjr/FQZL/PF2tJmfL612qjG96HIUkNJMIKzV0MH48cIZMNsWTKZ8DUQrFj9hxyl6HgvNlrYVrof/p7kIy19WKPE/IeNKVZLWYw4iVKvYizXhrKAWKvbr3uapw+7GAuo4b+vNm8lGpQJ20xKhs5ApxF4QReysYwjtC7WfEUTiL7UlUA+P8vrNh6Fy1DAH903KO5KT+2MD/vBn5vm6dhSotS3N7RNV7SipmXdqQ= X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(788757137089)(148574349560750)(167848164394848); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6041248)(20161123562025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:VI1PR08MB0752;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:VI1PR08MB0752; X-Microsoft-Exchange-Diagnostics: =?koi8-r?Q?1;VI1PR08MB0752;4:pnzHZqUj0mJDI6Jh4ZDf2OWgrmRu2cxt85TNf47WR3Ak?= =?koi8-r?Q?UzhPrzFKS7Ngpw7QIuVZ4/f6dtpkgTksp0hLlsxLdXxH9E96bdwZ6oKO5H1V8z?= =?koi8-r?Q?o0vqXPdHmUcC+Qx9f4JxRD9cdrUgyVyN/7p1stEenqtn6I5I2KL5iC2uApnecm?= =?koi8-r?Q?RVcHDTzsp44lJgBhs9oRgjj5fMl6MQxowKBaMIQhLX8/tASN2JEIAw1SEVrikq?= =?koi8-r?Q?Hd6ldFwLwAtOzur/f8yn3JvPMLOu/qyOwA3bsBmOKVbWeHL0qnUxJGHA0bapTv?= =?koi8-r?Q?OLql+pXvmuVqYe7Ugq2cZIaavduxzUoMHk91qbPh0oOvLYAIAtJMeKA7Q6n2qf?= =?koi8-r?Q?JG9VxflaVq/ldiJrwbTDa4KckLFBHRVbM2BVwSWd3LkTzONi8okGpbNWOq/Oor?= =?koi8-r?Q?1PE2WKn0PSaYPIHXgnSeIJL2A5IJNfRJCRNKmuYEDYXrW5Ql878AM6b/Oei1d5?= =?koi8-r?Q?/lYIXmIJ0M4xnsJdwfAHvFT0JsfvHE5nCl6KgAt5RM3i30Da8gyczNaRvBiSEf?= =?koi8-r?Q?W9sMevXg3bRBooJ1D4OWJU7l0TxVpqlrXFQ1tBH9Z13WLwYTMhgDTp/TNs2ASL?= =?koi8-r?Q?FXJjQI76zBC1UfNBurnVpV2Vmgudc705+AyPC5ZVbopHgdcOnRpj5LVYDXvY/K?= =?koi8-r?Q?EffjeGYoCsFWmZ3XaNMlRnh4Hdz90SC4Ubk+2EpWMy3PDcC9odHZeBNLTUaHbF?= =?koi8-r?Q?LAYfn04lwK/M9GwG4hWhfwVh56Ydwbxz32O4F8pERfWx70Bt/Wnk+ZiVTOkkhS?= =?koi8-r?Q?g31YTyqBHWYfKhBxI1Q72wdVLC3P9cNMbjPVpAeMJZTXvBvqoEbLqF5DRto0cL?= =?koi8-r?Q?lCWBwzMhDWb4jWuIzHantHIDE1K6xs+RYgi7iewKJQKn4mYaFWZOP/jY1Y9LQy?= =?koi8-r?Q?XGtg5rsTpHtPrmwOWqDS/ipBr1nu3nFdancdWWrK7QvYMFFjl/i/h1v1q0LCc4?= =?koi8-r?Q?NpV5OiwDyAHXJC/rRCKjHtlu4xSOOaYIV81Yhf0j/GO9bssRk2lVmUzHKuGnQ6?= =?koi8-r?Q?pN7eARFCZ7u76LYh+uvIKlYJXw4YIRySxhIOilirvAhczdBVLoUSF8hcE9xeNo?= =?koi8-r?Q?3d9SuN5IZt1u48n8YURiBh1v2DagL9xr0c8o8Pmaw5B8JzQiIA/vPJaW2NCR6t?= =?koi8-r?Q?p9iR3hq9s03EhTjAgHLG/fqtbEN92n0OwbCw6Pkl8DfFW1jipAqsMJNAt5kElg?= =?koi8-r?Q?kRds8nm7CCQWUSqhIS4OrXDB1plHVYgqq2yH652WJCDV4JPeUoTPqAio2mtP2d?= =?koi8-r?Q?OFVmORN4pFiwGDUNgzz2Gqjs1UuVBxDrtaVReE5waaG7Xq0xPDOdSYXcD336?= X-Forefront-PRVS: 036614DD9C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(7370300001)(4630300001)(6009001)(39410400002)(39400400002)(39840400002)(39450400003)(24454002)(25786009)(7736002)(1076002)(50986999)(4001350100001)(54356999)(76176999)(4326008)(8676002)(81166006)(6246003)(33656002)(38730400002)(110136004)(2906002)(3846002)(6116002)(42186005)(53416004)(23686003)(6506006)(53936002)(37156001)(54906002)(9686003)(55016002)(50466002)(66066001)(47776003)(5660300001)(229853002)(83506001)(6916009)(2950100002)(6666003)(478600001)(7416002)(305945005)(7350300001)(86362001)(189998001)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB0752;H:outlook.office365.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?koi8-r?Q?1;VI1PR08MB0752;23:J4k2Yf58MuA9RJW2dQW7/VfTVOGr+ReB5FpUs8MEn7y?= =?koi8-r?Q?g21Z4xhtlIuuJh7vBtPjdWDwNAwAUwKwvfuBshJ3WlqdtnVjikI7RsXPk4opOj?= =?koi8-r?Q?K7xI5CswOeh/uzJD5zvG14L/TcWcPDol7F5ZL1SZOrpW0nvzumyrV9eE+ySn29?= =?koi8-r?Q?jSTg8h1qYLT//ObhhBHqITRdUsY1k0VXrZU+ciN4GruEed5KdNlSqZDS4/ETDJ?= =?koi8-r?Q?RXnB+LvIUTq6ZmccFcuyCo1uRm8z6A2aAVKNl+aS2fwcXBonnOd9A4c999c7w/?= =?koi8-r?Q?P+k2YC9YABZJ04Tji81ejfM0fohAXQHWyfpkPhLTqvTFtAdCal28Lhks5L2rHi?= =?koi8-r?Q?RtpPvphS501sbDdUtTe6wMnKRvCkRZhF058RN93J5gJD1mkiUvO0Id8dmdthiE?= =?koi8-r?Q?aQ4v9ilylclqR9vqvpiR+HDiMy0bKjA+6OVgpBbeY1cDvbpJfqLY0H+Jp/LoZ0?= =?koi8-r?Q?adJt+alRX4YF/a0toPZnWgHvcfU0fTOVgLl+3kns0M5QjNlJkqt/8BYO0OcFWO?= =?koi8-r?Q?fKxPLul6wGMNcSd/UQ3NI6Nizbh7x+7QaGSGVu1MswEqo0W8/nck00xS4BDhQV?= =?koi8-r?Q?3+FeWrpmL7ihbMc59XNe5R3z0kJcPXsUdHSo6yMnNBJJSBnr1JMvWU0ArdLIql?= =?koi8-r?Q?yNrsAXvd5V/cN5hVzKeOMOICCjkqgyTXOwprpYojar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g/QyRv3GdUJXTlBlg0lgO48vG8IshnOtLz8mxGZw/ICKUr0ji+9irPlr+GDgKUqqRZOWE62u33jyfb6eDMUiX+Q+Fj2lkWj/vbtbc0aOj/ps+JS9wsknmtVRvjUXQsft9hW+NZf+XNojD1l/ObV91Zio9OKd66m0S4yyKw7r8UAaMy87YCzvA0QXGYpAuPUXfu3gVI9wYhttn0wBCriLlkyuX04vieGVMMZpCVDDLCShTicVpH3ZO3ygAo838oEXIA26pSJCNpdFkltP3enFCsoNDcuDn3HN09W02MrhjrolGtY9Fv2w+TT0= X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0752;20:5SejJmJPmYtqvEBUHwpsYX/I9x42SVBkt1Bb33uXAtqZb8UkZzMk4mRYHOsMe4XAp0QdZSbPIPVVyYooRGj0PKy3Kt74K+ms98l+jfh2imxi2Fz003A2ad/u22antFU4+7uweZrG8Eh0vcnc0/6eSZdbP9lTJ7O/OgNKQc/sjcc= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2017 22:36:15.8191 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0752 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5213 Lines: 121 On Fri, Jun 30, 2017 at 07:39:06AM -0500, Eric W. Biederman wrote: > struct siginfo is a union and the kernel since 2.4 has been hiding a union > tag in the high 16bits of si_code using the values: > __SI_KILL > __SI_TIMER > __SI_POLL > __SI_FAULT > __SI_CHLD > __SI_RT > __SI_MESGQ > __SI_SYS > > While this looks plausible on the surface, in practice this situation has > not worked well. > > - Injected positive signals are not copied to user space properly > unless they have these magic high bits set. > > - Injected positive signals are not reported properly by signalfd > unless they have these magic high bits set. > > - These kernel internal values leaked to userspace via ptrace_peek_siginfo > > - It was possible to inject these kernel internal values and cause the > the kernel to misbehave. > > - Kernel developers got confused and expected these kernel internal values > in userspace in kernel self tests. > > - Kernel developers got confused and set si_code to __SI_FAULT which > is SI_USER in userspace which causes userspace to think an ordinary user > sent the signal and that it was not kernel generated. > > - The values make it impossible to reorganize the code to transform > siginfo_copy_to_user into a plain copy_to_user. As si_code must > be massaged before being passed to userspace. > > So remove these kernel internal si codes and make the kernel code simpler > and more maintainable. > > To replace these kernel internal magic si_codes introduce the helper > function siginfo_layout, that takes a signal number and an si_code and > computes which union member of siginfo is being used. Have > siginfo_layout return an enumeration so that gcc will have enough > information to warn if a switch statement does not handle all of union > members. > > A couple of architectures have a messed up ABI that defines signal > specific duplications of SI_USER which causes more special cases in > siginfo_layout than I would like. The good news is only problem > architectures pay the cost. > > Update all of the code that used the previous magic __SI_ values to > use the new SIL_ values and to call siginfo_layout to get those > values. Escept where not all of the cases are handled remove the > defaults in the switch statements so that if a new case is missed in > the future the lack will show up at compile time. > > Modify the code that copies siginfo si_code to userspace to just copy > the value and not cast si_code to a short first. The high bits are no > longer used to hold a magic union member. > > Fixup the siginfo header files to stop including the __SI_ values in > their constants and for the headers that were missing it to properly > update the number of si_codes for each signal type. > > The fixes to copy_siginfo_from_user32 implementations has the > interesting property that several of them perviously should never have > worked as the __SI_ values they depended up where kernel internal. > With that dependency gone those implementations should work much > better. > > The idea of not passing the __SI_ values out to userspace and then > not reinserting them has been tested with criu and criu worked without > changes. > > Signed-off-by: "Eric W. Biederman" > --- > arch/alpha/include/uapi/asm/siginfo.h | 2 +- > arch/arm64/kernel/signal32.c | 23 +++---- > arch/blackfin/include/uapi/asm/siginfo.h | 30 +++++---- > arch/frv/include/uapi/asm/siginfo.h | 2 +- > arch/ia64/include/uapi/asm/siginfo.h | 20 +++--- > arch/ia64/kernel/signal.c | 17 +++--- > arch/mips/include/uapi/asm/siginfo.h | 6 +- > arch/mips/kernel/signal32.c | 19 +++--- > arch/parisc/kernel/signal32.c | 31 +++++----- > arch/powerpc/kernel/signal_32.c | 20 +++--- > arch/s390/kernel/compat_signal.c | 32 +++++----- > arch/sparc/include/uapi/asm/siginfo.h | 4 +- > arch/sparc/kernel/signal32.c | 16 ++--- > arch/tile/include/uapi/asm/siginfo.h | 4 +- > arch/tile/kernel/compat_signal.c | 18 +++--- > arch/tile/kernel/traps.c | 1 - > arch/x86/kernel/signal_compat.c | 21 +++---- > fs/fcntl.c | 2 +- > fs/signalfd.c | 22 +++---- > include/asm-generic/siginfo.h | 22 ++++--- > include/uapi/asm-generic/siginfo.h | 102 ++++++++++++++----------------- > kernel/compat.c | 2 - > kernel/exit.c | 6 +- > kernel/ptrace.c | 6 +- > kernel/signal.c | 72 ++++++++++++++++------ > 25 files changed, 254 insertions(+), 246 deletions(-) > <...> > diff --git a/arch/tile/kernel/traps.c b/arch/tile/kernel/traps.c > index 54804866f238..4433d1dc28e6 100644 > --- a/arch/tile/kernel/traps.c > +++ b/arch/tile/kernel/traps.c > @@ -188,7 +188,6 @@ static int special_ill(tile_bundle_bits bundle, int *sigp, int *codep) > > /* Make it the requested signal. */ > *sigp = sig; > - *codep = code | __SI_FAULT; Are you sure that we don't need to set codep here? > return 1; > } >