Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163AbcKIDmZ (ORCPT ); Tue, 8 Nov 2016 22:42:25 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44217 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751012AbcKIDmY (ORCPT ); Tue, 8 Nov 2016 22:42:24 -0500 X-Originating-IP: 50.39.170.172 Date: Tue, 8 Nov 2016 19:42:09 -0800 From: Josh Triplett To: Arnd Bergmann Cc: Andrew Morton , Kees Cook , Johannes Weiner , Ingo Molnar , Andy Lutomirski , Petr Mladek , Thomas Garnier , Ard Biesheuvel , Nicolas Pitre , Zefan Li , Li Bin , "Eric W. Biederman" , Dmitry Vyukov , Ralf Baechle , Alex Thorlton , Michal Hocko , Mateusz Guzik , Cyrill Gorcunov , John Stultz , Al Viro , Zach Brown , Anna Schumaker , Dave Hansen , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Nicolas Pitre Subject: Re: [PATCH 0/2] Support compiling out the prctl syscall Message-ID: <20161109034209.i5ok4cy2apjp3mpk@x> References: <3032452.SC5nD8WpIB@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3032452.SC5nD8WpIB@wuerfel> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1234 Lines: 27 On Wed, Nov 09, 2016 at 01:26:53AM +0100, Arnd Bergmann wrote: > On Tuesday, November 8, 2016 4:17:47 PM CET Josh Triplett wrote: > > Some embedded systems can do without the prctl syscall, saving some space. > > > > This also avoids regular increases in tinyconfig size as people add more > > non-optional functionality to prctl (observed via the 0-day kernel > > infrastructure). > > > > The first patch moves prctl and all its helpers into a separate source file, > > kernel/prctl.c, to allow making it optional via the Makefile without any > > ifdefs. The second patch adds the Kconfig option to make prctl optional. > > > > Josh Triplett (2): > > kernel: Move prctl and helpers from kernel/sys.c to new kernel/prctl.c > > kernel: Support compiling out the prctl syscall > > > > Both of these look really nice to me. Another syscall that comes to > mind as a candidate to be made optional is ptrace, and I've added > Nicolas Pitre to Cc here, as he has looked into this before. I've looked at that as well; it's a rather more complex patch, as several other bits of the kernel hook into ptrace or otherwise depend on ptrace. (And ptrace_may_access will need to stick around even when ptrace doesn't.) - Josh Triplett