Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1146402imj; Thu, 14 Feb 2019 01:56:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IYShXLmdVsTGsVKY2rf62g6jY/i1BlHdYhDpi8s16vr14uH/qVxw+d0zl6WoZMsmDB4RaNt X-Received: by 2002:a63:5362:: with SMTP id t34mr2875631pgl.81.1550138217489; Thu, 14 Feb 2019 01:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550138217; cv=none; d=google.com; s=arc-20160816; b=IsdJhAyl8JkopNZZfDStAJvj8EhMvxoacN2hqcoJWwXC1ioTFmjfaDuSfCqhMMT9Ol vfSu6rRRlMaMk7bvdD2TLLnX4xo0iNt/xVfKv4pMpK7Fqvroqvp/s1yICKUs5EoqxWdz GqEFqvZjXZ7Lj7fx5yqGbEmoKCLXVE3CnK/pyE2ioKED6hPmNVVdJt5HVd0lh+EORVp8 xkTrpHuj7ceocBniGTRSlQNdCg0KkKM5CDTP2L9q9MvLwJYXBPf0V5l6Fe04ZfRaxFZt lfxLxF4pCTY2UuDf6V804c5FjiClCqFECAdbGrCZ+eyjqsFcm2tKxhNYum6rWv3T1EbL IQFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-filter:dkim-signature; bh=ZgX2nu1prNMPmkfY6EX7uBMchoXtJY1ojL8lA0W+e5s=; b=FBJcCzZmhaQ0zGXMgzLAlWWQir71RuSyoSRltJzAxPWkJzx4XvDAGxkTOLp5LzCcWH 1JnJw/l2rA5cgd2my+XCMK6qvD1aXfm3b7B/NdsUNsZBF4XUL4RduLzpvcXqbLzOZcsP UrW2BF0UYOSa98YYK+weBQ7mYHMbsXLZNXyZXB3H8wXsS6bY0+YvDQeJSJb+q3FzVb8t kYJSJzGlk7CjjXctSFrOVTCgQoyiSC61oI+nR9dBzhxZXAdzxBzRjrYXaPPwHrqL2K/O /wdLdy82U+I2//Y4fWVPnl3kE84AkEtNa9hDNs60s8jD924rJsDSqb8ZSqEQnPtRQvvl QWxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fjfi.cvut.cz header.s=20151024 header.b=xggxs3Jd; 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 23si1050842pgs.342.2019.02.14.01.56.41; Thu, 14 Feb 2019 01:56:57 -0800 (PST) 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; dkim=pass header.i=@fjfi.cvut.cz header.s=20151024 header.b=xggxs3Jd; 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 S2404611AbfBNAQi (ORCPT + 99 others); Wed, 13 Feb 2019 19:16:38 -0500 Received: from mailgw1.fjfi.cvut.cz ([147.32.9.3]:46962 "EHLO mailgw1.fjfi.cvut.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727054AbfBNAQi (ORCPT ); Wed, 13 Feb 2019 19:16:38 -0500 Received: from localhost (localhost [127.0.0.1]) by mailgw1.fjfi.cvut.cz (Postfix) with ESMTP id AC3B5AA25C; Thu, 14 Feb 2019 01:16:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fjfi.cvut.cz; s=20151024; t=1550103392; i=@fjfi.cvut.cz; bh=ZgX2nu1prNMPmkfY6EX7uBMchoXtJY1ojL8lA0W+e5s=; h=From:To:Cc:Subject:Date; b=xggxs3Jd0ux2NEbJCIJ4Kr50kHfv6xs+CjDAHrE+lmBN7zWQHxLjQ2IkjGc0zWplV tVxta7/pW9i71DjnX53tRsptzRTO1KFPfoCBT2CTnU31wdK7vXQUxiGjKUVcXR46nl AiCiTnZCSuuwTmaXCbfCUlHFwUT4qhgRDDb2ZNMY= X-CTU-FNSPE-Virus-Scanned: amavisd-new at fjfi.cvut.cz Received: from mailgw1.fjfi.cvut.cz ([127.0.0.1]) by localhost (mailgw1.fjfi.cvut.cz [127.0.0.1]) (amavisd-new, port 10022) with ESMTP id fORW3nzi69Ok; Thu, 14 Feb 2019 01:16:27 +0100 (CET) Received: from linux.fjfi.cvut.cz (linux.fjfi.cvut.cz [147.32.5.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailgw1.fjfi.cvut.cz (Postfix) with ESMTPS id 6F218AA230; Thu, 14 Feb 2019 01:16:26 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailgw1.fjfi.cvut.cz 6F218AA230 Received: by linux.fjfi.cvut.cz (Postfix, from userid 1001) id 488AB6004E; Thu, 14 Feb 2019 01:16:26 +0100 (CET) From: David Kozub To: Jens Axboe , Jonathan Derrick , Scott Bauer , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jonas Rabenstein , David Kozub Subject: [PATCH 00/16] sed-opal: fix shadow MBR enable/disable and clean up code Date: Thu, 14 Feb 2019 01:15:52 +0100 Message-Id: <1550103368-4605-1-git-send-email-zub@linux.fjfi.cvut.cz> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series contains various code cleanup and fixes for Opal SED support. It's been created by taking a part of the original patch series by Jonas and me (PATCHv4 block: sed-opal: support shadow MBR done flag and write) [1], as suggested by Christoph in [2]. The most important patch is the first one where I tried to fix the shadow MBR enable/disable issue we discussed in [3]. This change goes against Christoph's original propsal in [4] but I think - in light of the issue and keeping in mind the planned addition of an IOCTL specifically for toggling the done flag - that passing just OPAL_TRUE or OPAL_FALSE to set_mbr_done and set_mbr_enable_disable is more useful and also more understandable. Maybe this change is superfluous if Scott found the time to submit his take on the fix. (?) I tried to include all the feedback from the v4 review[1]. I also added some more trivial changes (11/16 as suggested in [4]) and also 13/16 motivated by the same idea - that's why I again reached the magical number of 16 patches. I kept the reviewed-by/acked-by tags where the changes were trivial but I removed them where I thought a re-review would be useful. I plan to submit the remaining patches from the original series (these that add new Opal IOCTLs) after this fix and cleanup is accepted. I did a brief test toggling shadow MBR and unlocking a locking range. I will try to do more thorough tests - but I will not get to it before the beginning of the next week. It would be great if this could get some more testing. Especially the unlock from suspend part - that's something I don't have set up and I have not tested. The series applies on v5.0-rc6. [1] https://lore.kernel.org/lkml/1549054223-12220-1-git-send-email-zub@linux.fjfi.cvut.cz/ [2] https://lore.kernel.org/lkml/20190204150415.GO31132@infradead.org/ [3] https://lore.kernel.org/lkml/alpine.LRH.2.21.1902072247060.29258@linux.fjfi.cvut.cz/ [4] https://lore.kernel.org/lkml/20190204145244.GJ31132@infradead.org/ David Kozub (12): block: sed-opal: fix IOC_OPAL_ENABLE_DISABLE_MBR block: sed-opal: fix typos and formatting block: sed-opal: close parameter list in cmd_finalize block: sed-opal: unify cmd start block: sed-opal: unify error handling of responses block: sed-opal: reuse response_get_token to decrease code duplication block: sed-opal: add token for OPAL_LIFECYCLE block: sed-opal: unify retrieval of table columns block: sed-opal: use named Opal tokens instead of integer literals block: sed-opal: pass steps via argument rather than via opal_dev block: sed-opal: don't repeat opal_discovery0 in each steps array block: sed-opal: rename next to execute_steps Jonas Rabenstein (4): block: sed-opal: use correct macro for method length block: sed-opal: unify space check in add_token_* block: sed-opal: print failed function address block: sed-opal: split generation of bytestring header and content block/opal_proto.h | 2 + block/sed-opal.c | 716 ++++++++++++++-------------------- include/uapi/linux/sed-opal.h | 2 +- 3 files changed, 287 insertions(+), 433 deletions(-) -- 2.20.1