Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6106191rdb; Mon, 1 Jan 2024 08:55:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNghJC69a6LC3hSS68VWbwVE++D9eH8CLt3yMzndvY+uUvvzf8xyyaCF42KbLvAJvQ3iNn X-Received: by 2002:a17:906:d8b:b0:a23:3ba6:f1ee with SMTP id m11-20020a1709060d8b00b00a233ba6f1eemr4706327eji.139.1704128156358; Mon, 01 Jan 2024 08:55:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704128156; cv=pass; d=google.com; s=arc-20160816; b=l8vLJE0j5iadMmVMrDTwNiakf3f8e3BHWgOPi1yGfdG9EE72kD2IWmi1rsDROCRd+R WBVnrfjKqjawi7Dba7fKEfkNDTTHXI6G6d5Ars26GZ/t4aUSKY/KTX56JOqkAyLOjD/7 4Nk8ktFgyHQr35Qt4ShQQkWD3kgj67a3nHweLEN+mrJDGwMBVyRYxRxOK7lFMrWPxLBu M2ssJMIZfE4nO2CTfHckbaxqHDZtC0yzcxamIoZSu+1zt78Ze0CD9MxwkRZdRqPNmuVB XJ8BuB/ed3CgZ7GYjQ3gzBvwViLGt4tYN51iAAA7X9ePSfPej525CYpdDnUMhfMzXkVh hVhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :in-reply-to:content-transfer-encoding:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=j2NN6ZST2fYCFeWZ4XUxSxQByNfu539jkMhzBP9J3Rk=; fh=Hwo5Kv2H4OY2QbrxLwSwGyblrI5xf8OCmfZRZdc7Yi0=; b=kSlpTO33dPld5gmKUevGFINw58dr0s7tjVgyY0byobtmY0GynnoK5fh6Y/euacmz+2 Z0CL08qypwve454F4IusPUbQk/9oCXip0SJSsWfK9ke//a4a+wzrOpn8G/yybwjQIBCR 1rQN1k79mwx4nc7mLL6iamxKS3xEvb02MM+/xsA/wigaT0QTuPUzwCONFIUC6F/PXPn2 2zKTamZSVo30Ev1ldDdrsndr29kOY32NtwSeCS1uyaopvmwb2DtweDmKub7iTmv409lq fvABQInTwUnpipkk3APMWV8P5WA3E+plQHwkaeAkzJhQ2aIZcKnFFy+xku7oUEPmMlVb or5w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=efiHHx8z; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tTpBjOPy; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-nfs+bounces-852-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-852-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id zc9-20020a170906988900b00a2689950394si1883622ejb.666.2024.01.01.08.55.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 08:55:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-852-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-11-20 header.b=efiHHx8z; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=tTpBjOPy; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-nfs+bounces-852-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-nfs+bounces-852-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2E6BD1F20100 for ; Mon, 1 Jan 2024 16:55:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2D6A63D9; Mon, 1 Jan 2024 16:55:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="efiHHx8z"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="tTpBjOPy" X-Original-To: linux-nfs@vger.kernel.org Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE23563C1; Mon, 1 Jan 2024 16:55:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0333521.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4014Tfns028391; Mon, 1 Jan 2024 16:55:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : content-transfer-encoding : in-reply-to : mime-version; s=corp-2023-11-20; bh=j2NN6ZST2fYCFeWZ4XUxSxQByNfu539jkMhzBP9J3Rk=; b=efiHHx8zcAhLB0y0tFDsGQgU/HtSegq0tMV9W4Aptr49QgMJtJ6gojWJfXIaLyRmyrx9 zk+qgh06IYtLbSxt6A20tlDXLegD1lPKcRs4fe5k0/WKlb8wj6K0+M7axYbLtKBylFRN zIFUX0eKdXEjaM22nfejJp0ozA2tmFACA9FDzKjIRBd1s/yO0VrzQ20M55hjdShmjBhQ fqLmbWnZZcBdhldKbKqpd8LorlV/KAMAQsv40/tTkbT17//U1jD4pAKQCSqDlteJPA+0 mjRyD4ZdDnJ9FjuUuIGw978ZRoUfmYdEMu4apondeviUgROJoPKhbphKsTEkLg6/ILcs NA== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3vaa4ca060-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 01 Jan 2024 16:55:12 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 401DPE2Y035959; Mon, 1 Jan 2024 16:55:11 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3va9n605s8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 01 Jan 2024 16:55:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MvIFu73978zsFsNSBeidQRMk8NlakbQypc5m3pNjaOiDJ127d7rLWpXlCddNnYwKzYt034vzic0HpVjtPStaIwW7YBLjWsOjgqNoExzg2aAydQc6Zpt8hPM/b5/AC8Rhtbes4+HgTxU1YTukNZZdcAv+7D2TXdJc5B/LGkwJE9bpedObtWLMVDQWfwFMg2zW7SGkJ39gYO6uadO2mQooiW3Kq27dXC9e+Fg648t9rv47V4gvK729AMHNX95VWwpBwhky290jz8D0Ypi2SZqGBTVNFS716ArtIaUibXkVN5pIi9ToIvPCkkZ6ukPt8CSKyPe48B/9GsH0d5M25G8TMg== 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=j2NN6ZST2fYCFeWZ4XUxSxQByNfu539jkMhzBP9J3Rk=; b=b0S7ojvZ1omcBpaj2qQosn8e9W7BUjdP3ahiNk9nqzrz+/XhqRpH36NY2pSBcKF/mR9O+mtj5tDd6+45pasiSuW93YzauGetvTz8Htr6r47ASB89Smp16GYMyH0Wy502c2INYsK0vkr4K8DwaMS80kQeOjZweI5O58w/bi5KWcquEs02Z8cy7AKaKGnx3dnUBKFvU0FPwcMEXipo7JWCGsfSXYu4qmJHFrcnytcFzjUX7fSpU7Zv5r8PcBv+eAb5/uNDkCwNWoynOPhRZu9lKR3ljVGIywWGuOpZvb1n14kuiWBHA30oWSctEI7SLAuWf6wPmW9Effh240HvhRkHpQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=j2NN6ZST2fYCFeWZ4XUxSxQByNfu539jkMhzBP9J3Rk=; b=tTpBjOPy8rZBzAJ471uxxx8hy60fB9k5enjIw1VV2wa1eQFM92Es6/quLA+4QkLR5KJhN3Xs3Qe6Wmjy3ruIrGEcc//Z9lUfD0ChSeu/7BN/lIgL452KW92pDEbctPsMYhhP1Be6SeRKfoa+HzDZrb1oblWgm3Iafy3vTfEn8qY= Received: from BN0PR10MB5128.namprd10.prod.outlook.com (2603:10b6:408:117::24) by DS0PR10MB6725.namprd10.prod.outlook.com (2603:10b6:8:132::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.24; Mon, 1 Jan 2024 16:55:09 +0000 Received: from BN0PR10MB5128.namprd10.prod.outlook.com ([fe80::360b:b3c0:c5a9:3b3c]) by BN0PR10MB5128.namprd10.prod.outlook.com ([fe80::360b:b3c0:c5a9:3b3c%4]) with mapi id 15.20.7135.023; Mon, 1 Jan 2024 16:55:09 +0000 Date: Mon, 1 Jan 2024 11:55:05 -0500 From: Chuck Lever To: Markus Elfring Cc: linux-nfs@vger.kernel.org, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, Anna Schumaker , Ard Biesheuvel , Dai Ngo , "David S. Miller" , Eric Dumazet , Herbert Xu , Jakub Kicinski , Jeff Layton , Neil Brown , Olga Kornievskaia , Paolo Abeni , Simo Sorce , Tom Talpey , Trond Myklebust , LKML Subject: Re: [PATCH] sunrpc: Improve exception handling in krb5_etm_checksum() Message-ID: References: <9561c78e-49a2-430c-a611-52806c0cdf25@web.de> <4307bce9-ccbd-4bc5-aa8e-b618a1664cbe@web.de> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4307bce9-ccbd-4bc5-aa8e-b618a1664cbe@web.de> X-ClientProxiedBy: CH2PR12CA0008.namprd12.prod.outlook.com (2603:10b6:610:57::18) To BN0PR10MB5128.namprd10.prod.outlook.com (2603:10b6:408:117::24) Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN0PR10MB5128:EE_|DS0PR10MB6725:EE_ X-MS-Office365-Filtering-Correlation-Id: b88f797f-2273-486f-9b35-08dc0aea6992 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sHbDHyN5sGFAoUy6wjvgCOVKKva+Ue7TmJJJV/z6ZXNwHqKW38vd7asGAgOM5RNgyliSrCvKnJRUWrWhAPAwcnU+2l2S3R9g8pY+QrDdXe5ceYsrffqeRDNcE3Ok0GndwKBaoHl+g6tN17j7BsWLe4BjSpQkS39ScczlFZnusIuD1tv8ZV2Q2Qc2oznqBSdXNtRERyy/XtP7nGE4/9b687a/t/JV5baW4QXaIezu5lXD6ScYCyVWYfH17Wi6pJKC96ijLnUrHJoTGjbApSg05Y+k9T8YpiKkU3akoE8nAAGyTs6ModozlogxF0BINx3Q7GyQdFVLCwNMdHHDAFB1/fh0WoijOO7Ikl7r4KYPW96jkuvcjq3ON1YgvTnhxENttw39sfGWWB2U2DfUx5yD7jw9DRLCAXwukWMYnG73tviyxJPLePxskAMHEZNgTWuKrMweHSZlRCuKtpo0MO8OfpiTM+kk5jt4XtDHSOlYtM3KUiIj5gSCI+Uv43FDdvqrG0CiLFnUv14I8JvgemGXUCUZFJyj6Y7Bzj5vCDNDdps= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR10MB5128.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(346002)(39860400002)(136003)(376002)(230922051799003)(451199024)(64100799003)(186009)(1800799012)(26005)(83380400001)(6506007)(6666004)(6512007)(9686003)(44832011)(7416002)(5660300002)(4326008)(966005)(41300700001)(2906002)(6486002)(478600001)(316002)(8676002)(8936002)(66946007)(54906003)(6916009)(66476007)(66556008)(86362001)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1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bUeuf7BVgGBjq5Pww++SVaVHvt8nuTt+djQRifTkAhFwNlvkZgbrJN/qe4x8Ukh/YReubzB1cJzTjU0CvU+x/wgMwi8J6e7cxkRAs//iDn5/PuXu5PN2gUO95/m11n+Deirkoek= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: b88f797f-2273-486f-9b35-08dc0aea6992 X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB5128.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jan 2024 16:55:09.1526 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: r3vNron6MGpS5g+IkTczdX7LBG9crsfQ+RtZBhKj4AEpqjQ+7N5B6g7XQzp3Yyym9rD+Aiow4BzHHBo72z8OLg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6725 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-01_08,2024-01-01_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 bulkscore=0 spamscore=0 adultscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2401010137 X-Proofpoint-GUID: 19UfTR0ZdClceyJ7rWp80gtNwJq6ujAz X-Proofpoint-ORIG-GUID: 19UfTR0ZdClceyJ7rWp80gtNwJq6ujAz On Mon, Jan 01, 2024 at 12:24:59PM +0100, Markus Elfring wrote: > … > >> Thus use another label. > … > >> --- > >> net/sunrpc/auth_gss/gss_krb5_crypto.c | 3 ++- > >> 1 file changed, 2 insertions(+), 1 deletion(-) > … > > As has undoubtedly been pointed out in other forums, calling kfree() > > with a NULL argument is perfectly valid. > > The function call “kfree(NULL)” is not really useful for error/exception handling > while it is tolerated at various source code places. > > > > Since this small GFP_KERNEL > > allocation almost never fails, it's unlikely this change is going to > > make any difference except for readability. > > I became curious if development interests can grow for the usage of > an additional label. > https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources > > > > Now if we want to clean up the error flows in here to look more > > idiomatic, how about this: > … > > +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c > … > > @@ -970,8 +970,9 @@ u32 krb5_etm_checksum(struct crypto_sync_skcipher *cipher, > > > > out_free_ahash: > > ahash_request_free(req); > > -out_free_mem: > > +out_free_iv: > > kfree(iv); > > +out_free_cksumdata: > > kfree_sensitive(checksumdata); > … > > I find it nice that you show another possible adjustment of corresponding identifiers. I got curious, and tried using a static const buffer instead of allocating one that always contains zeroes. The following compiles and passes the SunRPC GSS Kunit tests: commit 52d614882af007630072857b6b95a6d0fda23c1c Author: Chuck Lever AuthorDate: Mon Jan 1 11:37:45 2024 -0500 Commit: Chuck Lever CommitDate: Mon Jan 1 11:47:06 2024 -0500 SUNRPC: Use a static buffer for the checksum initialization vector Allocating and zeroing a buffer during every call to krb5_etm_checksum() is inefficient. Instead, set aside a static buffer that is the maximum crypto block size, and use a portion (or all) of that. Reported-by: Markus Elfring Signed-off-by: Chuck Lever diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index d2b02710ab07..82dc1eddf050 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c @@ -921,6 +921,8 @@ gss_krb5_aes_decrypt(struct krb5_ctx *kctx, u32 offset, u32 len, * Caller provides the truncation length of the output token (h) in * cksumout.len. * + * Note that for RPCSEC, the "initial cipher state" is always all zeroes. + * * Return values: * %GSS_S_COMPLETE: Digest computed, @cksumout filled in * %GSS_S_FAILURE: Call failed @@ -931,22 +933,19 @@ u32 krb5_etm_checksum(struct crypto_sync_skcipher *cipher, int body_offset, struct xdr_netobj *cksumout) { unsigned int ivsize = crypto_sync_skcipher_ivsize(cipher); + static const u8 iv[GSS_KRB5_MAX_BLOCKSIZE]; struct ahash_request *req; struct scatterlist sg[1]; - u8 *iv, *checksumdata; + u8 *checksumdata; int err = -ENOMEM; checksumdata = kmalloc(crypto_ahash_digestsize(tfm), GFP_KERNEL); if (!checksumdata) return GSS_S_FAILURE; - /* For RPCSEC, the "initial cipher state" is always all zeroes. */ - iv = kzalloc(ivsize, GFP_KERNEL); - if (!iv) - goto out_free_mem; req = ahash_request_alloc(tfm, GFP_KERNEL); if (!req) - goto out_free_mem; + goto out_free_cksumdata; ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_SLEEP, NULL, NULL); err = crypto_ahash_init(req); if (err) @@ -970,8 +969,7 @@ u32 krb5_etm_checksum(struct crypto_sync_skcipher *cipher, out_free_ahash: ahash_request_free(req); -out_free_mem: - kfree(iv); +out_free_cksumdata: kfree_sensitive(checksumdata); return err ? GSS_S_FAILURE : GSS_S_COMPLETE; } I haven't tested this with an actual sec=krb5[ip] workload yet. -- Chuck Lever