From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753833AbdDLNpT (ORCPT ); Wed, 12 Apr 2017 09:45:19 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:34265 "EHLO smtp.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753239AbdDLNpQ (ORCPT ); Wed, 12 Apr 2017 09:45:16 -0400 Date: Wed, 12 Apr 2017 21:44:57 +0800 From: joeyli To: poma Cc: Jiri Kosina , "Rafael J. Wysocki" , David Howells , Oliver Neukum , Linux Kernel Mailing List , Matthew Garrett , linux-efi@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk, Greg Kroah-Hartman , Linux PM , linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, matthew.garrett@nebula.com Subject: Re: [PATCH 11/24] uswsusp: Disable when the kernel is locked down Message-ID: <20170412134457.GE18270@linux-l9pv.suse> References: <149142326734.5101.4596394505987813763.stgit@warthog.procyon.org.uk> <149142336965.5101.2946578135980499557.stgit@warthog.procyon.org.uk> <1491460792.1645.1.camel@suse.com> <14980.1491468060@warthog.procyon.org.uk> <83e2dff5-c46b-25b4-253e-cd2650b7db7d@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83e2dff5-c46b-25b4-253e-cd2650b7db7d@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 08, 2017 at 05:28:15AM +0200, poma wrote: > On 06.04.2017 22:25, Jiri Kosina wrote: > > On Thu, 6 Apr 2017, Rafael J. Wysocki wrote: > > > >>>>> Your swap partition may be located on an NVDIMM or be encrypted. > >>>> > >>>> An NVDIMM should be considered the same as any other persistent storage. > >>>> > >>>> It may be encrypted, but where's the key stored, how easy is it to retrieve > >>>> and does the swapout code know this? > >>>> > >>>>> Isn't this a bit overly drastic? > >>>> > >>>> Perhaps, but if it's on disk and it's not encrypted, then maybe not. > >>> > >>> Right. > >>> > >>> Swap encryption is not mandatory and I'm not sure how the hibernate > >>> code can verify whether or not it is in use. > >> > >> BTW, SUSE has patches adding secure boot support to the hibernate code > >> and Jiri promised me to post them last year even. :-) > > > > Oh, thanks for a friendly ping :) Adding Joey Lee to CC. > > > > Rafael J., are you talking about HIBERNATE_VERIFICATION ? > > Ref. > https://github.com/joeyli/linux-s4sign/commits/s4sign-hmac-v2-v4.2-rc8 > https://lkml.org/lkml/2015/8/11/47 > https://bugzilla.redhat.com/show_bug.cgi?id=1330335 > I am working on switch to HMAC-SHA512. On the other hand, some mechanisms keep signing/encryption key in memory. e.g. dm-crypt or hibernation verification. Kees Cook suggested that we should add kernel memory reads as a thread model of securelevel to prevent leaking those keys by /dev/kmem, bpf, kdump or hibernation... We still need time to implement it. Thanks a lot! Joey Lee