From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756455Ab1GRAFu (ORCPT ); Sun, 17 Jul 2011 20:05:50 -0400 Received: from terminus.zytor.com ([198.137.202.10]:49826 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752970Ab1GRAFt (ORCPT ); Sun, 17 Jul 2011 20:05:49 -0400 Message-ID: <4E237893.70801@zytor.com> Date: Sun, 17 Jul 2011 17:04:35 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 MIME-Version: 1.0 To: Eric Paris CC: Mike Waychison , "Andrew G. Morgan" , Alan Cox , Greg Kroah-Hartman , Andrew Morton , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org, Klibc mailing list Subject: Re: [PATCH 2/2] x86: Allow disabling of sys_iopl, sys_ioperm References: <1310675693-9204-1-git-send-email-mikew@google.com> <1310675693-9204-2-git-send-email-mikew@google.com> <20110714234248.7ed43534@lxorguk.ukuu.org.uk> <20110715000037.3fc1670a@lxorguk.ukuu.org.uk> <20110715003912.149dcedd@lxorguk.ukuu.org.uk> <4E20839A.8060200@zytor.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/17/2011 04:19 PM, Eric Paris wrote: > On Sat, Jul 16, 2011 at 12:42 AM, Mike Waychison wrote: >> On Fri, Jul 15, 2011 at 3:30 PM, Andrew G. Morgan wrote: >>> I'd put it in kinit too. >>> >>> I think you may have to think about the call_usermodehelper code, and >>> you might want to look at dropping CAP_SYS_MODULE too. >> >> Looks like usermodehelpers are configurable for both the inheritable >> set and the bounding set via /proc/sys/kernel/usermodehelper/bset and >> /proc/sys/kernel/usermodehelper/inheritable thanks to Eric Paris >> (17f60a7da, available in 3.0-rc1). > > If you look in Fedora and RHEL you'll see that we actually already > provide a dracut module (dracut-caps) which can be used to create an > initrd which contains all of the modules you need to load, it loads > them, and then will drop all of the caps that you want to drop. Good > to see we already solved this problem once!! (although it requires > that your kernel and initrd not be in a place that your root user can > modify it, easy to do in the virt space, no so easy in the real > hardware world) > Have you considered separating out the kernel-specific portions into a separate initramfs file (preferrably one which could be built from a kernel build tree). The whole dependency of kernels with initramfs is a huge pain for kernel development and debugging... -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.