From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbdJTUsV (ORCPT ); Fri, 20 Oct 2017 16:48:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38392 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751872AbdJTUsT (ORCPT ); Fri, 20 Oct 2017 16:48:19 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 513E633A176 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=dhowells@redhat.com Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20171020190939.569cedd2@alans-desktop> References: <20171020190939.569cedd2@alans-desktop> <150842463163.7923.11081723749106843698.stgit@warthog.procyon.org.uk> <150842472452.7923.2592278090192179002.stgit@warthog.procyon.org.uk> To: Alan Cox Cc: dhowells@redhat.com, linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org, matthew.garrett@nebula.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, jforbes@redhat.com Subject: Re: [PATCH 12/27] x86/msr: Restrict MSR access when the kernel is locked down MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18498.1508532496.1@warthog.procyon.org.uk> Date: Fri, 20 Oct 2017 21:48:16 +0100 Message-ID: <18499.1508532496@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 20 Oct 2017 20:48:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alan Cox wrote: > There are a load of standard tools that use this so I think you are going > to need a whitelist. Can you at least log *which* MSR in the failing case > so a whitelist can be built over time ? Probably. Is it just the file position for msr_write()? Should the register number increment with the copy loop? What about for the X86_IOC_WRMSR_REGS ioctl? What's the reg number there? And do you know where wrmsr_safe_regs() might be found? I can see things using it and exporting it, but no implementation, so I'm guessing it's macroised somewhere. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: [PATCH 12/27] x86/msr: Restrict MSR access when the kernel is locked down Date: Fri, 20 Oct 2017 21:48:16 +0100 Message-ID: <18499.1508532496@warthog.procyon.org.uk> References: <20171020190939.569cedd2@alans-desktop> <150842463163.7923.11081723749106843698.stgit@warthog.procyon.org.uk> <150842472452.7923.2592278090192179002.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: In-Reply-To: <20171020190939.569cedd2@alans-desktop> Content-ID: <18498.1508532496.1-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Alan Cox Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, matthew.garrett-05XSO3Yj/JvQT0dZR+AlfA@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, jforbes-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org List-Id: linux-efi@vger.kernel.org Alan Cox wrote: > There are a load of standard tools that use this so I think you are going > to need a whitelist. Can you at least log *which* MSR in the failing case > so a whitelist can be built over time ? Probably. Is it just the file position for msr_write()? Should the register number increment with the copy loop? What about for the X86_IOC_WRMSR_REGS ioctl? What's the reg number there? And do you know where wrmsr_safe_regs() might be found? I can see things using it and exporting it, but no implementation, so I'm guessing it's macroised somewhere. David From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhowells@redhat.com (David Howells) Date: Fri, 20 Oct 2017 21:48:16 +0100 Subject: [PATCH 12/27] x86/msr: Restrict MSR access when the kernel is locked down In-Reply-To: <20171020190939.569cedd2@alans-desktop> References: <20171020190939.569cedd2@alans-desktop> <150842463163.7923.11081723749106843698.stgit@warthog.procyon.org.uk> <150842472452.7923.2592278090192179002.stgit@warthog.procyon.org.uk> Message-ID: <18499.1508532496@warthog.procyon.org.uk> To: linux-security-module@vger.kernel.org List-Id: linux-security-module.vger.kernel.org Alan Cox wrote: > There are a load of standard tools that use this so I think you are going > to need a whitelist. Can you at least log *which* MSR in the failing case > so a whitelist can be built over time ? Probably. Is it just the file position for msr_write()? Should the register number increment with the copy loop? What about for the X86_IOC_WRMSR_REGS ioctl? What's the reg number there? And do you know where wrmsr_safe_regs() might be found? I can see things using it and exporting it, but no implementation, so I'm guessing it's macroised somewhere. David -- To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html