From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752489AbdKJKK2 (ORCPT ); Fri, 10 Nov 2017 05:10:28 -0500 Received: from twin.jikos.cz ([89.185.236.188]:55094 "EHLO twin.jikos.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063AbdKJKK0 (ORCPT ); Fri, 10 Nov 2017 05:10:26 -0500 X-Greylist: delayed 2818 seconds by postgrey-1.27 at vger.kernel.org; Fri, 10 Nov 2017 05:10:25 EST Date: Fri, 10 Nov 2017 10:23:19 +0100 (CET) From: Jiri Kosina To: David Howells cc: linux-security-module@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, jforbes@redhat.com Subject: Re: [PATCH 26/30] Lock down ftrace In-Reply-To: <151024883613.28329.14808632296386937974.stgit@warthog.procyon.org.uk> Message-ID: References: <151024863544.28329.2436580122759221600.stgit@warthog.procyon.org.uk> <151024883613.28329.14808632296386937974.stgit@warthog.procyon.org.uk> User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 9 Nov 2017, David Howells wrote: > Disallow the use of ftrace when the kernel is locked down. This patch > turns off ftrace_enabled late in the kernel boot so that the selftest can > still be potentially be run. > > The sysctl that controls ftrace_enables is also disallowed when the kernel > is locked down. If the lockdown is lifted, then the sysctl can be used to > reenable ftrace - if ftrace was compiled with CONFIG_DYNAMIC_FTRACE, that > is; if it wasn't then it won't be possible to reenable it. > > This prevents crypto data theft by analysis of execution patterns, and, if > in future ftrace also logs the register contents at the time, will prevent > data theft by that mechanism also. I fail to see how this fits into the secure boot security model, could you please explain? Secure boot is about having a constant proof / verification that the code you're running in ring0 can be trusted (IOW is the one that has been signed and verified by the whole boot chain). Checking execution patterns doesn't seem to fit at all. Thanks, -- Jiri Kosina SUSE Labs