[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150407135552.GA32694@agk-dp.fab.redhat.com>
Date: Tue, 7 Apr 2015 14:55:52 +0100
From: Alasdair G Kergon <agk@...hat.com>
To: Pali Rohár <pali.rohar@...il.com>
Cc: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, Neil Brown <neilb@...e.de>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
linux-raid@...r.kernel.org, dm-devel@...hat.com,
linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [dm-devel] [PATCH 3/3] dm-crypt: Adds support for wiping key
when doing suspend/hibernation
On Sun, Apr 05, 2015 at 07:20:19PM +0200, 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.
Try to avoid 0/1 - use descriptive options instead.
E.g. key wipe_on_hibernation / key retain_on_hibernation (message)
wipe_key_on_hiberation ('dmsetup table' - don't forget the reporting interface!)
Have you tested against every state the driver might be in at the time of
suspend/hibernation?
> +static void crypt_suspend_and_wipe_key(struct crypt_config *cc)
> +{
> + dm_suspend_md(dm_table_get_md(cc->ti->table));
I'm not particularly keen on this - silently ignoring expected error states
like -EINVAL rather than checking first and not calling the function at all
when it's known not to be needed.
Alasdair
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists