Received: by 10.213.65.68 with SMTP id h4csp342243imn; Tue, 13 Mar 2018 06:14:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELtq1APlhEF3fL5tEyxuXcrtyvdAzI7MYxWyo97dYwmP7vpgb3mtJeHZkfd/xlBqGJG7M7r0 X-Received: by 2002:a17:902:9a8d:: with SMTP id w13-v6mr571067plp.136.1520946858414; Tue, 13 Mar 2018 06:14:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520946858; cv=none; d=google.com; s=arc-20160816; b=YSJn+SMdxmdrgxUVWGoSVcabryr9IyeLGy8qKyNz0mijBmD3iqLG3ta7Tkdn0oxNot dycKZouRn/yBAksYtsCqb1F5amhfEZviOUjWlz/uf1lFuAZsWfC6euOWtw6B6MQDVMEP SWfTwcBbpEvzYl9KmliB8t4Ciqh8p0gg8cs6b1nyRzLfXLY2gpnu5XHRhidDwXsDikhH 4bd+jcmcdIrf8ugZLilhg5TztVG8Df1eiX/XouviFzKdpWdpsDfLx/nvcGG0X++i0ROk Cjg/0OLrkvVw142rkOEuvEilj1M6jhpIoolB44k63tLhUy7IhPFnXsLeF7PXfcl6MJgR zTuw== 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 :arc-authentication-results; bh=4nDlcDleeIr6ozI0ASrtyqQQfnG8JSBTjh4EjO6Gd2I=; b=Vqmx6wWZxBS378VRsN3ciGcLwUpRvIjIrECmDRaks10cOtdx9hTZHjAxcO6xj5KafN 4A6tswQrwQpWMiXeIu0mr686hgOcEplM59RdIWpv8Gpjglbq7us9Qin6hAM4gmlHQNN7 I5d2l5O3F2aCsQ3dEZKsT7CiuCuPPMpvYYPRa6HjlRu6qItnvZsEznfrDbIgCysQnguz etlnkRR22j4U+Y2sRQv0iCohpla1rhMGmbHz08Ar/DjFkyBI1x9xO2KcgTO9ad06UkjX gGegH/gnEQG/QRd7ARXXKwV8plF9wTnvbgqRY8NPoOYgLKsEO82tT6cT1cUQx9sagNbU aZsg== 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 f3-v6si83900plb.717.2018.03.13.06.14.03; Tue, 13 Mar 2018 06:14:18 -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 S932464AbeCMNJZ (ORCPT + 99 others); Tue, 13 Mar 2018 09:09:25 -0400 Received: from mx-rz-2.rrze.uni-erlangen.de ([131.188.11.21]:45583 "EHLO mx-rz-2.rrze.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbeCMNJX (ORCPT ); Tue, 13 Mar 2018 09:09:23 -0400 Received: from mx-rz-2.rrze.uni-erlangen.de (mx-rz-2.rrze.uni-erlangen.de [IPv6:2001:638:a000:1025::15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx-rz-2.rrze.uni-erlangen.de (Postfix) with ESMTPS id 400wDL20CdzPlP8; Tue, 13 Mar 2018 14:09:22 +0100 (CET) Authentication-Results: mx-rz-2.rrze.uni-erlangen.de; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Virus-Scanned: amavisd-new at boeck4.rrze.uni-erlangen.de (RRZE) X-RRZE-Flag: Not-Spam X-RRZE-Submit-IP: 2003:d5:3c2:e00:dbd1:5c46:f440:b630 Received: from fau.de (p200300D503C20E00DBD15C46F440B630.dip0.t-ipconnect.de [IPv6:2003:d5:3c2:e00:dbd1:5c46:f440:b630]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: U2FsdGVkX190OSOzWcTbch0QflaeM2o0lWJ8cOvzYRk=) by smtp-auth.uni-erlangen.de (Postfix) with ESMTPSA id 400wDD3jRhzPlQC; Tue, 13 Mar 2018 14:09:16 +0100 (CET) From: Jonas Rabenstein To: Jonas Rabenstein , Scott Bauer , Jonathan Derrick , Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/8] block: sed-opal: support write to shadow mbr Date: Tue, 13 Mar 2018 14:08:53 +0100 Message-Id: X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, this patchset adds support to write data into the shadow mbr of sed-opal enabled devices. They apply cleanly on today next-tree (next-20180313) and requires the u64 short atom length fix from [0] as that is still missing in that tree. As I only can test on my only sed-opal enabled Samsung 850 Evo on amd64, tests on other hardware would be appreciated. The first six patches provide helper functions that are used in the following up patches as well as do some refactoring and unification of the existing code. With the seventh patch, a new ioctl is added to mark the shadow mbr as done without having to enable/disable the shadow mbr feature as a whole. Finally, the last patch adds an ioctl to write data into the shadow mbr. A modified version of the user space tools with support for those ioctls can be found at [1]. Looking forward to feedback and suggestions for improvement, Jonas [0] https://lkml.org/lkml/2018/3/7/534 [1] https://github.com/ghostav/sed-opal-temp Jonas Rabenstein (8): block: sed-opal: use correct macro for method length block: sed-opal: unify space check in add_token_* block: sed-opal: unify cmd start and finalize block: sed-opal: unify error handling of responses block: sed-opal: print failed function address block: sed-opal: split generation of bytestring header and content block: sed-opal: add ioctl for done-mark of shadow mbr block: sed-opal: ioctl for writing to shadow mbr block/sed-opal.c | 432 +++++++++++++++++++++--------------------- include/linux/sed-opal.h | 2 + include/uapi/linux/sed-opal.h | 9 + 3 files changed, 223 insertions(+), 220 deletions(-) -- 2.16.1