Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044AbbG1OsU (ORCPT ); Tue, 28 Jul 2015 10:48:20 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:34344 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754854AbbG1OsP (ORCPT ); Tue, 28 Jul 2015 10:48:15 -0400 Date: Tue, 28 Jul 2015 16:48:12 +0200 From: Pali =?utf-8?B?Um9ow6Fy?= To: Pavel Machek Cc: Alasdair Kergon , Mike Snitzer , Neil Brown , "Rafael J. Wysocki" , Len Brown , dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v2 3/3] dm-crypt: Adds support for wiping key when doing suspend/hibernation Message-ID: <20150728144812.GS13765@pali> References: <1428254419-7334-1-git-send-email-pali.rohar@gmail.com> <1434885634-19895-1-git-send-email-pali.rohar@gmail.com> <1434885634-19895-4-git-send-email-pali.rohar@gmail.com> <20150728144419.GA19760@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150728144419.GA19760@amd> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1166 Lines: 29 On Tuesday 28 July 2015 16:44:19 Pavel Machek wrote: > On Sun 2015-06-21 13:20:34, Pali Rohár wrote: > > This patch adds dm message commands and option strings to optionally wipe key > > from dm-crypt device before entering suspend or hibernate state. > > > > Before key is wiped dm device must be suspended. To prevent race conditions with > > I/O and userspace processes, wiping action must be called after processes are > > freezed. Otherwise userspace processes could start reading/writing to disk after > > dm device is suspened and freezing processes before suspend/hibernate action > > will fail. > > Are you sure this is enough? > > We still may need to allocate memory after userspace is frozen, and > that could mean writing dirty buffers out to make some memory free... > > Pavel > Hm... good question. Maybe it is needed to also flush all buffers? -- Pali Rohár pali.rohar@gmail.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/