Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5282683rwp; Mon, 17 Jul 2023 00:49:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEM8v1mzYGWGBnQDZb3XCSjjOH1kcpfB0fkO208/JwnC/Tprwjct6v/YK40FZ9NZIEiMIfo X-Received: by 2002:a05:6808:1788:b0:39e:ffc5:c450 with SMTP id bg8-20020a056808178800b0039effc5c450mr13170405oib.47.1689580188653; Mon, 17 Jul 2023 00:49:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689580188; cv=pass; d=google.com; s=arc-20160816; b=OHdHxLjnzNEviRGyJVTb4ax2pmDMpWu5m4VkenZjWod0nCiqOV73ps8NKcgTUu88dR Hofmr2wjJdQJ+BWpXNaiz8+SdFoO/fAEZMlEvmT2Hky9lZrlXcq0XjFPf/jiddr0XucB kwxXrMhv2jf4Soxq7QfRrh3i4UZmomLq9pLJQjAPcNNCANiHmuXCkmzXnqpn/cmnGvuN p6sqdPT0xTDaMjK0ri2zh0rUrp7bvlk8dZW8PSMwz/PR3w7wm5JiWox90fjYbX8DZF9y zFXfbWf5Js/YWitIGjpE0xjbleao+Oq5hHt7NYYmY/8CaAg5K3qE5/uiceoLy9Dj0dW7 CDgA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=FYvdQqLiSpjTzRjR86WEtD8P1S/DaJZ3VFTpFg3rl7E=; fh=ARqzAZjWoC9B8Vel4HM2FrR6uBdWk6HlNhkr0zDPdqM=; b=hFmi0YRmy+V8rgkcp1eZ+/I0CwOOE26//+J4fAdDtbERd0GHDypjXL1M98ZJ5/xH3X EXd+r0Aj31Kzly118Ke1gDJJpxlVLr2+9sNffcoKWNaeFFHKy6b3dSCOy3irbgyUIhs4 oCsoDfQgpufJpBK4Ig39tV6Xata3b3YAb8udhk/y2JTb4WhV4MRa0VLKUpbOWyMvcOyF vakJ3MKKAQTpshzprWkIL92u8hnDwRIUxjnR/XfgVupxl/vjOYKChLEboHxhhHKeZk4z YkvECkHCBWXnIdO0uMKO6zIr/G4ZeBTcB6spEZmGxuteGgd6L8uyPf4qxzxhabsVP8b3 MBdg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=LxPxWWts; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7-20020a636907000000b005538c5bef9csi4576651pgc.452.2023.07.17.00.49.28; Mon, 17 Jul 2023 00:49:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=@vivo.com header.s=selector2 header.b=LxPxWWts; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjGQHmV (ORCPT + 99 others); Mon, 17 Jul 2023 03:42:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbjGQHmU (ORCPT ); Mon, 17 Jul 2023 03:42:20 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2131.outbound.protection.outlook.com [40.107.215.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED1C8E7F; Mon, 17 Jul 2023 00:42:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPEM+ysneL4RXDd3smC8jEE6R+AYOLmkkEiWXpC26g6mN78g81ub2kCGhU0vcguu4OzQzVXCXfq+CNq6AOWXdrG89Pmh6WLY76i7TUNd9meltosRcgnzmBWMgLt/hfZM3F/yIjMNJayAfkZTmeUtry8BvevzlOddxS5/IGd4EAM+I6WGsHR5rzDOmr3yDiXqvrc4E2vclvnCJph/ZQWPXVtaHBGkjIVsS6hR4y1PDM672Y+noeXSn/+T4HOSfchvh1825+4uwYfKy2XTEt0LiHIqLc9gWLeiS05cvfMXtCgVZIwb0oPqlApEbgeUoVYapBxYCzHA0UdPwqFX9rQuDQ== 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=FYvdQqLiSpjTzRjR86WEtD8P1S/DaJZ3VFTpFg3rl7E=; b=BDHzbOC+v5VqT3Pllw0Yjko3ZIz+nPzRaF75PY/ASOEIP8kV8+K9+8SAsIk9Ootyk7yLPnWfoQljh+t79hDOMZFF0YskoOM1o/1zv+cvL9BNLJfVlbE4fU7gBMjzij4E8PGZ/DrM2k5LuXbA8wewDTvlYxSf7NDxXd8of4rJZ9eFvWlCcJoc6qzmKJDay8xXK/7H+KBcQUV40s1NyO8K9zmMcUxYD/MLOYl1qTeCm10Omwpk1QivIlgBD/GhhFk6akq2RhGPcEiCU3kJFdrw0oXv1tq599TpHc/aHHBhf3GP7NeeeMgnBA4AhyWRrY/DXv58UrK0slBdrn0tl98gZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FYvdQqLiSpjTzRjR86WEtD8P1S/DaJZ3VFTpFg3rl7E=; b=LxPxWWtsIs90UAGoJxur8BhHH7QNWOSOVgn4HmtYwMJ49mY5mpPSfyu4YNzYHv/wd+//7c71t17f/vxI2ir95t93oPij8WWK6NSupDx1Ab75KznLSCEy4w4VTNFvKGofsly8rDAbr8Ud2ufohtQYB5mFCFDeuL2ruknLAwASdYMcBsQdOi6P8H/qk6XGNzV/DwZxfTk60s5OtqOvCyaH5KOmmeveFLz1AsOQgIhV+ENMMywwqTIMYc2OGjpImN3Avz6Ro1jyf6WeUOta4HbV/T1V6djsG7f3mThT05hOBWYzMhpRjVTcAfBlWGJuOH6I6Gh9i04Fv8LSFUmMYemFTw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) by SEYPR06MB6482.apcprd06.prod.outlook.com (2603:1096:101:178::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Mon, 17 Jul 2023 07:42:08 +0000 Received: from SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a]) by SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a%6]) with mapi id 15.20.6565.037; Mon, 17 Jul 2023 07:42:08 +0000 From: Minjie Du To: Herbert Xu , "David S. Miller" , Heiko Carstens , Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , linux-crypto@vger.kernel.org (open list:CRYPTO API), linux-s390@vger.kernel.org (open list:S390 ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, Minjie Du Subject: [PATCH v1] s390/crypto: use kfree_sensitive in _free_kb_keybuf() Date: Mon, 17 Jul 2023 15:41:12 +0800 Message-Id: <20230717074112.6580-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TY2PR02CA0046.apcprd02.prod.outlook.com (2603:1096:404:a6::34) To SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5288:EE_|SEYPR06MB6482:EE_ X-MS-Office365-Filtering-Correlation-Id: 33b7fde7-cc43-48fc-33ad-08db8699530c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +AuV7ktdDfvqHliRFU3VlpF1AsQk+yDAalduueiGnL6op6aC+4WsGMjmAZsqqtOckav3Y0VroTpMr4GKMhRBlZ/LW4jlmXSTwah8h+mXm13rCaOqxQ+6W82ihrPyjkMxbL/yrs3D8wJ3Gp5DO+Jho+LF7C0DuSa4dsPmucMp7D06/5zAiZrF8PCjuvYiVZWssSc6D/QxfVtvGCO7LCUq6MbR65gx/XiLc1xoFCYPMK3ZekeBnytyX0DEtGSyBkTyGZwGb17gT9R5U6BNA2gZ3oMqZRF1EznnCvvCHxUdR+khzB73FtCslqYOFTB6s8vtzlwGXnyTvCAzDg1/ycqkN6pHytW+uz3uYHxnd6nDcTyWbGItMifGWgC/JXQ3hth1KykNn6+hFwYkXGEY240MrlEWy88UPg80pU8HYlKjBNNGTvCw4MjHLPMiur3bgqR4Dsv2tOXis+Cwsu9V93CAcDdb80HRImNYDt4qb2DUdN7bN0HrMvRIA0WtAiwedU769pnyGs43/Lthe88OU7BrBER82qbbORgBpYEsfrUbmGNLngydQVikG7JuUeREaPohfdPrFEQ22iA1TVIQX9xRqvnd6QzhEnQd0OvxfKWn9ygh35yJU0u3pjo12GMgzZBTf0PgOY5QKXeGDFihvWOznQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB5288.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(39860400002)(136003)(366004)(346002)(451199021)(6486002)(107886003)(52116002)(26005)(1076003)(6506007)(6512007)(36756003)(2616005)(83380400001)(38350700002)(86362001)(38100700002)(186003)(921005)(8936002)(8676002)(4744005)(2906002)(41300700001)(478600001)(7416002)(5660300002)(4326008)(316002)(66556008)(66476007)(66946007)(110136005)(6666004);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?8ua7Bbjs+fa7pulPgOEvDuXS56ERQUHApJxluf1s/O15nPMGmR7Zg0f+jjC1?= =?us-ascii?Q?nPaqQxInopzusZ/G1nhih9II09ax925JHkTsU5QaYOBlk78uSlaVaBjjI8TU?= =?us-ascii?Q?i1zD+dbCIgZzRJncKV7n2VeIzIR9gUfQffRRg+KWMbvP2ThOBK3nhXlyTPoy?= =?us-ascii?Q?Isp0Ime/v1Tkx4hTNrZiXFduMmdMkYgasAVTnOiJoLkH3CEdfLnXj+YQ9sVh?= =?us-ascii?Q?MLePRAlmBkz0+qO74vXTLwX9XAmp+UpixSJt0vJGF2Z2PQQpVuWLnCeRnWt4?= =?us-ascii?Q?XQ35hGGdSrYHGpZAaQuEEdNRpFCXgA+Jo8WEGqXujlN8jZbFaoSr4cs7Yrun?= =?us-ascii?Q?nO5VJF7H2vvfsqA/qec24lSRbUYWCEWRYs17m6EjJaLqFk8wPQ6f7wq3lZ/D?= =?us-ascii?Q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XuJpE11/X0k1E2aBEtgTx+x?= =?us-ascii?Q?1MidbfSA99jbMMIzmpYNFfVjLjRWyYEG8GwwjnTM31zygZDZcjPZEV1DZsBL?= =?us-ascii?Q?Qym0nGpV6xOyZqe6sV2ffzzB4CGmkhp1YuXsE0ZcYeehFs1nUePMadAHZP3I?= =?us-ascii?Q?6/CrLpQehMOxbmd3dNFLX0MdAqMxVt5Dvz9ZMz5m3g8OGYAIA5G/n2F5zR4g?= =?us-ascii?Q?Zq8gVpQPDJ9I41VsUcXzHYvnB6R+jrhS3uV64+clc083miIn1ThBdNoPcgOg?= =?us-ascii?Q?Ku/dEqh45BE8UNZ/qrJPr1pUPoSAIgLTCFdUzd1J?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33b7fde7-cc43-48fc-33ad-08db8699530c X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 07:42:08.7077 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: toHQTy0DRfZrtYMYm95ZId3o8aG6Dj9dv9+i+gdc0U568U3gTzNgwiZ4yfgMuunFPcGunAV/Cn0dtXUzt/Vj/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6482 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-crypto@vger.kernel.org key might contain private part of the key, so better use kfree_sensitive to free it. Signed-off-by: Minjie Du --- arch/s390/crypto/paes_s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c index d29a9d908..38349150c 100644 --- a/arch/s390/crypto/paes_s390.c +++ b/arch/s390/crypto/paes_s390.c @@ -103,7 +103,7 @@ static inline void _free_kb_keybuf(struct key_blob *kb) { if (kb->key && kb->key != kb->keybuf && kb->keylen > sizeof(kb->keybuf)) { - kfree(kb->key); + kfree_sensitive(kb->key); kb->key = NULL; } } -- 2.39.0