From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755864AbbG1OoZ (ORCPT ); Tue, 28 Jul 2015 10:44:25 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45649 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752490AbbG1OoW (ORCPT ); Tue, 28 Jul 2015 10:44:22 -0400 Date: Tue, 28 Jul 2015 16:44:19 +0200 From: Pavel Machek To: Pali =?iso-8859-1?Q?Roh=E1r?= 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: <20150728144419.GA19760@amd> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1434885634-19895-4-git-send-email-pali.rohar@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html