Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp881710pxb; Wed, 27 Oct 2021 14:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCAUgZ/jxwjLQ1zT4bmTPl/5vzgh0suPuFYhafquzQbyW4jo20FpHmNv7LfA5o01cCtkdR X-Received: by 2002:a50:d8ce:: with SMTP id y14mr497051edj.92.1635369812152; Wed, 27 Oct 2021 14:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635369812; cv=none; d=google.com; s=arc-20160816; b=MEjEqwIoDUfh9kUwsD8zlyjhJHHsTgRgaeA8qTuhiyPCCbcWmI2kn1Msz+F+eoeBgI 6Hzh/Q/qCjV1hc/6QTX2JcYsM+dVp9BuUjvtmT5ZTremilndTPT2aLTxFIkP/iX/GCbM Znz42o2UrF3SJhsJSLiCxVJgMf+3vptzsJI+Iv50cdaYcyjzze/qNSuBRUmMzTR1Qi1V XYIKfhQrzGCOCHdXpKzYtPk/PRI5oeK8GwQ6XkP7H/U2UVFkSTgg35M13FesQDEg5Mgp 4v/w++m/I+uBSeAPTbLpKlhnsXrloJuf+6kQUXKaoc98KxLxEU8uYJJsm8BHa/upJBOr WI1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=suhKpwwWq8DRUbg6cUq+Xf8wBoWhzVH4F87UvqYAAsA=; b=XdsANaH4UqP0RRL2yUIXN6/WIxaJhlCn4RckIfQGpfszXuw7+lDC2J5R6LU6s/5c5q FG1mv9ApiRlkC1kM/kWpJN82kYm5GiCDP84n6iFb0NBOyqlnQdARiZUQqz8fUWf6qvPo 8atpyN6MCXCUrGFoWzC+csM8/XQhJtzYEhYuxhGlVCN6+VeJLspn9cYocErhkJ/2GjTy 9wHzRMYVrQxIhD4vxsna3s/xAyMgx4E9YJy17iVUsT/iiRqRVrfeeIScu7zwQW91db8h OpcYSseLIT7haP3Cr9tBPzCmej6YiXL5ejh7MeMjI7cMoYopkq+QyUkoyZbDRXYRoFdm PN8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=d+bp4mhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do13si1431506ejc.718.2021.10.27.14.23.04; Wed, 27 Oct 2021 14:23:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=d+bp4mhH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241444AbhJ0Kgf (ORCPT + 97 others); Wed, 27 Oct 2021 06:36:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232538AbhJ0Kge (ORCPT ); Wed, 27 Oct 2021 06:36:34 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C40FC061570 for ; Wed, 27 Oct 2021 03:34:09 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id g7so2223750wrb.2 for ; Wed, 27 Oct 2021 03:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=suhKpwwWq8DRUbg6cUq+Xf8wBoWhzVH4F87UvqYAAsA=; b=d+bp4mhHCrPuGIsJAGL3iqjN+o+cKlzHqY/+rB8JJQ6OEoshd7znMOk2j3OELF919E gAhyb3x/Z5KdMKTJ+kw8T85lbKeBxsqzNFhJpJyUb0xTcg3QV2+sQTAaA13EM8p1xfXR cEQXDJdS1HoSw7u6I/wEqdYucFl002uOQC5SGPK29ZLil+DH+0hmgH1hUL2DTxznlptM 6W5KeStUjpyyhykIHCiRUwCy8lgsKZ6/MAqz/0F8gMnf9aezn9NcuhA4KA946t7f4WRZ GO/uklGjZKFhON+QPlFiXJMdK0g16xB4oJM/JMqP+db5n/srwuA8mzCTOV24sD3aWvCn AvrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=suhKpwwWq8DRUbg6cUq+Xf8wBoWhzVH4F87UvqYAAsA=; b=U8h6BPXkmSSaWd2qnlA12iT+Pg8NRvWt8LbpSLkhfSwnUrkMY9GVehrpx89t6NajnW VwFxSwRM2DSzIBaqjoJ97bHTwCusQt+gWMcpObam/sJo9P5lsU7jJqJ14J7GjR54rXXY 9o2ubNazGmp4F1Wq22ZdiOSat1KyKBnekvXjwXyp3oFLTL63Ea3ifhWajVbLKjD1tudD +opGuHmJ6LeqcuQWno3R7LRc0iDpdE8F9N1iAfSNqtTlSjxEwBcBnFgBDvPNAuCUbgMk ykG0UvB7rWXsQuummtViNQi5nO9OdTZwJmuSF+8JiGfQQo+Atp3KjKg3BgohYJ5hJ58g reQg== X-Gm-Message-State: AOAM530zvITEqHI9mAm6Q5abZ6Ka4YblWZum/Tgp7Eisg0fbs0BPX8xA KytbSlMkFZSPZFP8WucHFuU= X-Received: by 2002:a5d:6c61:: with SMTP id r1mr27049944wrz.54.1635330847643; Wed, 27 Oct 2021 03:34:07 -0700 (PDT) Received: from authentaworks.lxd (ip5f5be9ad.dynamic.kabel-deutschland.de. [95.91.233.173]) by smtp.gmail.com with ESMTPSA id j10sm7140198wrx.94.2021.10.27.03.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 03:34:07 -0700 (PDT) From: shiva.linuxworks@gmail.com X-Google-Original-From: sshivamurthy@micron.com To: tudor.ambarus@microchip.com, michael@walle.cc, p.yadav@ti.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Shivamurthy Shastri Subject: [PATCH 0/4] enabling Advanced protection and security features Date: Wed, 27 Oct 2021 10:33:48 +0000 Message-Id: <20211027103352.8879-1-sshivamurthy@micron.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shivamurthy Shastri Standard protection features in SPI NOR flashes are legacy and offer a simple way to protect the memory array against accidental or unwanted modification of its content. These patches enable the support for advanced sector protection which protects memory from accidentally corrupting code and data stored, and it also prevents malicious attacks that could intentionally modify the code or data stored in the memory. Micron Flashes offer some of the advanced protection methods using volatile lock bits, non-volatile lock bits, global freeze bits, and password. Shivamurthy Shastri (4): mtd: spi-nor: micron-st: add advanced protection and security features mtd: spi-nor: add advanced protection and security features support mtd: add advanced protection and security ioctls mtd: spi-nor: micron-st: add mt25qu128abb and mt25ql128abb drivers/mtd/mtdchar.c | 145 ++++++++++++++++++ drivers/mtd/spi-nor/Makefile | 2 +- drivers/mtd/spi-nor/advprotsec.c | 209 ++++++++++++++++++++++++++ drivers/mtd/spi-nor/core.c | 2 + drivers/mtd/spi-nor/core.h | 20 +++ drivers/mtd/spi-nor/micron-st.c | 245 +++++++++++++++++++++++++++++++ include/linux/mtd/mtd.h | 19 +++ include/uapi/mtd/mtd-abi.h | 11 ++ 8 files changed, 652 insertions(+), 1 deletion(-) create mode 100644 drivers/mtd/spi-nor/advprotsec.c -- 2.25.1