Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3113669rwb; Mon, 5 Sep 2022 06:43:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR58RmLYLcCeW8FecT8x6hMyi9s/xoqidlve47SlqJeAea1EJhX+JWxa+qhRRiOFxs/Y3JsZ X-Received: by 2002:a17:902:cec7:b0:172:b20d:e666 with SMTP id d7-20020a170902cec700b00172b20de666mr47989726plg.154.1662385383312; Mon, 05 Sep 2022 06:43:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662385383; cv=pass; d=google.com; s=arc-20160816; b=mtbodvIs+3g0dA9GPjrgOVqEWah7dibHxGJse5YONSmcZdYlP6UeHvDPBJNNcSnikl 1GgDqhwKFj0REk1lovG1cG0mx/o/KjeZCZo6h3Mbo17L38MLpMPaMpxb9dErHFzKxDTs drztB8s6nLQJBehAHnpiXzQpcluUC8L7k7UY3tzoOaErF8+/a4U6lk4VwdSl+HydPfpj UV6ppnZELWXlMpJiKsKqoacOGmxO7CN2vKg+h+UOwJERrJfLTrSTAwQRs6pdnEITjK7Q hgatI87iEBzWBpfYDl37ozixDzuQQOgS1Y9NARRnLpA8ArEzON4+gXwCXy+xZBc548Rq TN4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6GndXkJkPfORYmKcovuFi24Udklu9kGU68uV6SYGtSs=; b=oTwgi5Balk2pT7cUh+8xv8a7cdzasNNR8x82fE2AhvMxLwp2zMz2J6mgvNbHv4VnSn JzaFZdP1eJ/LjY1w/D9AGfrOkwVWFjeTGYgUhb7excTdHchxX2cAydrTs/PwnFksMUcu Wq+4nN1OSEWRh7JH3UK3Y2LBbWSjIbbIHujaOIwyE3jTgRk/66xCU42D4tY2qI6ANTeN owGzGZMAovh9Z3HzyyDzHaZVCmRmLnzUmbNtO8nJw0ItoJ9Ebj9ALejfWYZ7jZVVxupZ nI8LDXLWVYaef/a9ybwA5T3bSR2UUtTxoRFFySFK1xOmZSEwAJMd/CYa//HFA6AV15u1 2BhA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=gkbLGv8X; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h20-20020aa786d4000000b00538516e2c90si9576666pfo.43.2022.09.05.06.42.40; Mon, 05 Sep 2022 06:43:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=gkbLGv8X; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237916AbiIENf3 (ORCPT + 99 others); Mon, 5 Sep 2022 09:35:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237979AbiIENe7 (ORCPT ); Mon, 5 Sep 2022 09:34:59 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60076.outbound.protection.outlook.com [40.107.6.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37BE621E08 for ; Mon, 5 Sep 2022 06:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fvtBDJOXirtotqAURCOXhbcpiocZQ6CnE5Rs/lZdtVe66x/90emlhEpAitpqh9iIj0Yn7lsyx1qKzZ3V3MLm+0jxL474AqzAc58lK5bKSe+kTixk/UYUitQThOUgR9ZJMX/HSW0fY2WUU/W7AjTu/jiZtAa9U2F/ywCaeWkAVpnNvw8wxCEtm3i0NxDtFiYdi3pQChYg6mpawOUUgxlodPrYyVWYFZNqF7ysI3wy6UZCngfIFn1uEV8MKDKrJfhQnIF4kZ//HzQYcirZrwp0MuOub+6J+daP5lVsQNnQ26vOmyJvYWLsM4AD9KHlsgAgcOo3ZLlKO6mxf5fiO4ai/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6GndXkJkPfORYmKcovuFi24Udklu9kGU68uV6SYGtSs=; b=dJVDcPiosVw9DIzQjmS91LVBzqVeAIXIGcTvL4sSaVn3HiTbJyptimIOeLqkn0zPTG5gC4319jbYi3vhDEMJvyYbuesjv4EstVKrhffvmUW8ybsT+Eoau39h5j8zAm4DkLs1ExQtnHzurf6Gqdu1w5B9eO1zRraVxS1V1sF1iVFdwRgzhuokGffEzKGIyk01161Y8NBw2knwMyz1OHVk0GYygFIqZ9t9bQW3qdRNu7mm9Xj0G88MXzbv+XYCxvZTVDHqQl1u5nYw1lPLM2dFU9HHkilsH9Bm7/e+QP3aIK22ZZAJUUXkG9c/1RgbtxKL/Kjj03TRtuFB1rGtT6vKLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6GndXkJkPfORYmKcovuFi24Udklu9kGU68uV6SYGtSs=; b=gkbLGv8XPQ3uQVQepaoFdt5E6aaUDgnUDC3KvkwrNUyp1s0o1MhOqi62Y6UTEovJChpRdmIYg6nvIirLxMCZikTh1baNwgRYtLbBOqKqDBX2jUjXNJLNU8zjoyJFhAaIHKnC/iFJNRnr9KLLIKGn9zrKCb6Nf4PEyctMxaHpDb8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by AM0PR04MB5585.eurprd04.prod.outlook.com (2603:10a6:208:133::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Mon, 5 Sep 2022 13:34:51 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::6cde:8704:ed0a:c87b]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::6cde:8704:ed0a:c87b%4]) with mapi id 15.20.5588.018; Mon, 5 Sep 2022 13:34:51 +0000 From: Pankaj Gupta To: gaurav.jain@nxp.com, sahil.malhotra@nxp.com, kshitiz.varshney@nxp.com, horia.geanta@nxp.com, linux-kernel@vger.kernel.org, V.Sethi@nxp.com Cc: Pankaj Gupta Subject: [RFC PATCH HBK: 2/8] hw-bound-key: flag-is_hbk added to the tfm Date: Mon, 5 Sep 2022 20:06:25 +0530 Message-Id: <20220905143631.2832-3-pankaj.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220905143631.2832-1-pankaj.gupta@nxp.com> References: <20220905143631.2832-1-pankaj.gupta@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0173.apcprd04.prod.outlook.com (2603:1096:4::35) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0c6bcd7f-bca4-4467-0244-08da8f4368aa X-MS-TrafficTypeDiagnostic: AM0PR04MB5585:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: stZd2BLZuU8T51Mf5KrKqhkyDXbNvY5UPIzsxS5pmdG+CrefRoD60AQujWbJToRFb1OCDjHOmJQncq8BTLZO1RsFQ858PWrJqfN9nhUx6/QadDHVPxkEqn+Cc6W7No+UGaOOsiwyG3S+XQU9pKAf+2BszKRD+1QeQxAanQoaekloGh+2z9sl1bArlmxJNUHGidJtmqsBVqnzOZiiMJZgAF0lHzpICJGP4KYns+jVMU0Vhx0j8L9IzJjJGpMj1CE27gU5ZSGeNElroH166U4uW9bwsck5qy0kAnZV4ghtdTP+bTGoyTRzwNi0Wg28fYhKaK1IVx5sILaIjhj7jnnYf0HGLOm4QMkv0WNonKh5D3ktCXA6MfuwNrmC+uVN0caHUtls3JBwah224SRCj4l0jqyVnpiYGyfyD0iX6I+O8zEHK5Y2EqocfmkRRdA6BoW/3OVC8FDEq3Hd19YSIjzBARQTvsnpcn9j0aIDYjTQyf9dXsUzmjKybzXJXq9XeAthqTe3IxCzV5NAJ06gfkE+Zo84w2Kgr1/+/8fV7QXmcQjU8N0giT4/9oFVVc9EczXSUx2Y20/xumtJ218ws4AZIpuJuwjrX8mEX/z2ODd5zwUeruRgXNIH84rqEjcnujI5VtSY0U361dKXrG8dkRmOOy0RClgZ/xtZFLD3T1fH5DQLPVET7nC45Cw1OpApAN6PtWASl62WU83Xo7GKXlHh+ONIhLgV8V/pM4yILHM3SB//kf/7u9VSdLX6fb9XzAxtRQx9ZP1WQtJzzV977EKOJa1fcdzIYer/GDXkySVz8K8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(396003)(376002)(346002)(39860400002)(366004)(4744005)(316002)(86362001)(6636002)(36756003)(2906002)(38350700002)(38100700002)(44832011)(8936002)(5660300002)(8676002)(4326008)(66476007)(66946007)(6512007)(41300700001)(6486002)(2616005)(1076003)(186003)(6666004)(6506007)(478600001)(66556008)(26005)(52116002)(21314003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?3sZcmoe6GOhyQY2Unr6e5lqNnVV4FFwe93dcVIrbL1EENbDoa11ihNBLICm0?= =?us-ascii?Q?iHIkRapcHIQsDpfEeNfj4QieWFnvkqL9gAhafQdtnVg1DHgFqrtwCBzdVLhi?= =?us-ascii?Q?Bxo2E6dHOKJIp84JHurUhfEE53ZmS0OdY2RLEr+495VxK00p1jHg3qNlONLG?= =?us-ascii?Q?ljb8nKjkxXXUmRsbyZiBO9Ads2U0AV2Vnx261DBG0qa78Tvybl0aQDXDdfTI?= =?us-ascii?Q?CWspPfxDLmw4Q/mb4nxIWIeywiYE6B1p2BSaT2QH5HQtnC9dDZ9BvBmG6OUm?= =?us-ascii?Q?HWNIkIkuIKuNyxXz0Wh96RNG2ipSDZXoDlzIJeVYdmmY/PG305NLu9c6Y7Hb?= =?us-ascii?Q?jSYrOP4acDz1NgJLJ8uKp1DukWwEnPDhT798b3ehYFef2gzM/5yZ7Aii6dar?= =?us-ascii?Q?6RepwCIYgA2xFtcfNTaf9Q7RHD4Bedh+MeueUusZPN9Wu+jF6jE9KnL6FgQt?= =?us-ascii?Q?IRdouFB+/n5o2f8ch5h9ssfHN3fj/uSAgOcpKhU2Vm9G3GXNknCJTDLdutL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JScnvQq6kXY+llhR9R3JdoGiRlVEMGOKmTxQuKIYW7?= =?us-ascii?Q?6yI1uMZ6xSPBbgrsF5qaUdPKW0SQsFQkTaF0/aGAiLhfvNuLVdG3WqAXKhJs?= =?us-ascii?Q?SAu4o6qDKDGihsQdye3bWcy7AGYe8aozTiLDjE7OUwd6XskFMlO8jlnJSSEJ?= =?us-ascii?Q?OuI5a+UyWDa6dDIRGvJz8uu7PsVhP3CbNrJ0W9aI?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0c6bcd7f-bca4-4467-0244-08da8f4368aa X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 13:34:51.1023 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: xaPA4r1HiofJ6ID17Kfize3Ce96usjq4qsCiVTxqEBcebUxWPyUbMsJTzwI/TwV991DPgcCdWezadlU6rRI73Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5585 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Consumer of the kernel crypto api, after allocating the transformation, sets this flag based on the basis of the type of key consumer has. This helps: - This helps to influence the core processing logic for the encapsulated algorithm. - This flag is set by the consumer after allocating the tfm and before calling the function crypto_xxx_setkey(). Signed-off-by: Pankaj Gupta --- include/linux/crypto.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 2324ab6f1846..b4fa83ca87bd 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -639,6 +639,8 @@ struct crypto_tfm { u32 crt_flags; + unsigned int is_hbk; + int node; void (*exit)(struct crypto_tfm *tfm); -- 2.17.1