Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3801470imm; Mon, 25 Jun 2018 05:00:08 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJHxQxDMxe8Q+4GQj3bxfjSN8ZuuZytqezPb8SfI+slTKO9HDYB/BqmlCX6jq2tk1VQRpCv X-Received: by 2002:a63:4d14:: with SMTP id a20-v6mr10665817pgb.46.1529928008343; Mon, 25 Jun 2018 05:00:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529928008; cv=none; d=google.com; s=arc-20160816; b=UewhXwVG3y7EQHh7ZByEyyztbfd0vPdm/1Lc7TxIvapmpPrjPulRR0pFlgpEUvgTl4 W7MYMGBEqktfPYNclwfkmELLiNMaW1sNHNqK8oPwp8DkL8LCKZfuAkAZR+P4TIt2kRYx KMoZD1t3tBzm0dikJ9+tMmYaeprIIsJ9WMHARqDLoUP1uEa3XXN02QZJmyBUFesQZGSa He42BgxS0vPUcty8RhXYecjVnUq1NrJsWjpidXX1Yw/YVoX8aqSI8TqNIHx3gU4Rpe7u 3oFgW68Yv9HoCgE5+FvWd0S3h46WyvtfZmVi50L+QYrDneIi7pwUM7UCF/PP406LL485 5znw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fEcFlCK+B8QzjzlSQSy1QZ/mLlmFi03nEhApgDQTzNo=; b=kjWfOlqlp6z8sVzgTkyrNtJxUIHT0JZgsypkJ8WUemvWyBDzxRp4qdbuKt5gj+5ZWn zIlv4cdDx3s5PhZWwMEXxUUei3WTqUY4iez6JJOGSV+YLfMgXdrm/m77MaWkYZT3Jreb VDGojN986KR/BcvVAwIMMBaX33BmJTR7irbZWt88+xlo4ENDtWTEqQ09kyWSK9gNcRrx qen8ueN4JqaxRKNERKsZUqAMkd3cHrIJvM0Sb3+ZJdr5h4CftwibqULy8XJgohCaKvyy +cd5M2vecU7iqyngM+uba9d5ohoZ/kxyrlDxMtSh6WD6wUrIaN+6em/M7Si0uW5TNa08 I1hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13-v6si12042428pgt.554.2018.06.25.04.59.53; Mon, 25 Jun 2018 05:00:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932960AbeFYL7Q (ORCPT + 99 others); Mon, 25 Jun 2018 07:59:16 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:39022 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932569AbeFYL7P (ORCPT ); Mon, 25 Jun 2018 07:59:15 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 1306C80383; Mon, 25 Jun 2018 13:59:14 +0200 (CEST) Date: Mon, 25 Jun 2018 13:59:13 +0200 From: Pavel Machek To: "Rafael J. Wysocki" Cc: Chen Yu , Len Brown , "Lee, Chun-Yi" , Borislav Petkov , Linux PM , Linux Kernel Mailing List Subject: Re: [PATCH 0/3][RFC] Introduce the in-kernel hibernation encryption Message-ID: <20180625115913.GD17001@amd> References: <20180621085332.GA21807@amd> <20180621191443.GB14623@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JwB53PgKC5A7+0Ej" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JwB53PgKC5A7+0Ej Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > Well, AFAICT in this case userland has the key and encrypted data are > > on disk. That does not seem to be improvement. >=20 > Not really. >=20 > With the encryption in the kernel, if the kernel is careful enough, > use space will not be able to read the image even if it knows the > passphrase, unless it can also add itself to the initramfs image > loaded by the restore kernel, which (at least) can be made way more > difficult than simply reading the plain-text image data via an I/F > readily provided by the kernel. I still do not see the improvement. If you are root, you can modify the initramfs and decrypt the data. Please explain in the changelog how this is better than existing solution. > >> Besides, the user space part of what you are calling uswsusp has not > >> been actively maintained for years now and honestly I don't know how > >> many users of it there are. > > > > I'd assume distros want progress bars so they still use it? >=20 > I'd rather not speak for distros, but if hibernation images are > written to fast storage, progress bars are not that useful any more. > They are not used on Windows any more, for one. >=20 > > Anyway, there's solution for encrypted hibernation. >=20 > Which is suboptimal and you know it. If this is better, please explain how in the changelog. > > If Intel wants to invent different solution for that, and put it into k= ernel, they > > should explain what the advantages are, relative to existing solution. >=20 > I'm not sure what "they" is supposed to mean here, but the advantages > are quite clear to me: better security and reduced syscall overhead. Better security against which attack? Syscall overhead is not a problem for hibernation, and you know it. Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --JwB53PgKC5A7+0Ej Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlsw2REACgkQMOfwapXb+vL5WgCdEZn9n38yd3VV3SBZCeMULHhV O2YAnjoj7kfQr0rzXiX99zLDo1lPSv1v =oRsa -----END PGP SIGNATURE----- --JwB53PgKC5A7+0Ej--