Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp219480ybi; Fri, 26 Jul 2019 08:39:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeNrGpLq1eytd98wZHKFJdfW1UAz7c6s3Ve+kcf7ZAH+x4o7+zPyrnd+qOt7AI90Q7Ui7P X-Received: by 2002:a17:90a:20c6:: with SMTP id f64mr99544245pjg.57.1564155567211; Fri, 26 Jul 2019 08:39:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1564155567; cv=pass; d=google.com; s=arc-20160816; b=HLukccQ6eCdelvqqJMcHctXmapTJki3N1F1wdmDJNQQByg0MvccWT7mdIHURhldj45 4Pd3RSEkix2LtyYIoqHDjQTT8CVpKZqh9Pgz+5tYb+WljGK3CaIw5gEneG5Fgz7q5h4d 3RfkpCfJFS6lkfbIFMHHugarhrZP1dBeQcq9ZJOFxiI5/ArwA9VnKZA7fiDVYboK+Ujj ezkKNN2R7hk7cgeElhMxY22b1vTt/qn7PqA/bMcStnkVFIrTRi1wmLIE3wIBzfNkjSp0 v72wO5dIorOjEIS6gM0zXqu12yp4LzRMl0OGwuP5Xfz+7/OuWWRlFucoDAB1PB7nJ0vQ 0Spg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=zLjvjOdOrza6DN2eKp9twaq8zicSPEYLNkPVUh2Ut/s=; b=RdFDnwgEDJ8irGGX7hloI9OapuWW1qa6uK6SqYM7JfC9ovWV8DEhpmeKyaTWB8DIKp jbvZVHS00lGwqAjRjmU6vft7/tonp84539lsY78utukiIBsUQRRniNv/NDWSI1Q/+dSP PaNRuO5dOLWuipfCm0+4D+flaBO97oLzVYPcoVPcOlE6nFzkLRn3KsbOGAmVcAVj1GK1 mACPEvcAfuZDWrmpnYjpCKU3MGLDzpoDV4/0yLihAz6YyaD9/fCkg0/6st63nk9x9gir gm3t42JW3qYtg3vjs+DDs/u84YW3CaE61R5dVEeQAbR43LtaGaItmUEdl2IajUqTDpWS gLFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=B9jkHQz1; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si19364493pfd.226.2019.07.26.08.39.09; Fri, 26 Jul 2019 08:39:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=B9jkHQz1; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 S2388024AbfGZP20 (ORCPT + 99 others); Fri, 26 Jul 2019 11:28:26 -0400 Received: from mail-eopbgr130085.outbound.protection.outlook.com ([40.107.13.85]:49284 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2388441AbfGZP2Z (ORCPT ); Fri, 26 Jul 2019 11:28:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bvt0sYi+ZPbizoCwyKqGamD8R1N/yIXBQjYoeWP9A7oPdLpQvgXz4HzJSBPwS5vbIy29pwfTPEQmW7uToUstox1S1OwUzkk+haZdnAzd//nG2Gb+pa+3ZG7F0sLxFyrcalXtrZsfoikhelL1uFKr9Gh9uAm8qZYHmbsrlC059VZQCkRihcaurZKfli/TYBVSKi4XgYo+GW+n6Jl4UkpSezzdr1SH2qbkJRUx9V+10z6ntDGGnqIC3G+58P8uziwm0fDny2fVxXyVH2LNLX6ZKx5bwamWYIhVeaey2+kZpMj706ZETtffdTH5JX9iBUbYmGkVxyWRE0JCvsWCM1QA1g== 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-SenderADCheck; bh=zLjvjOdOrza6DN2eKp9twaq8zicSPEYLNkPVUh2Ut/s=; b=NgWHD+LazFPiv36JWP8W/NWxkS59OVP4UMt4+E2j3xKB5MusFE4kp3tuo6+L1gP4RLl7IjaC/qWB9bIMFsws4+l8fHlnsSeLBn0AJP+/2L51pWUMm+aKc8SFD9ZL+cOtwqW07B9Ie8jTpvSyvATSvPmjSH7pGqJZzla2LkGRpsIZQso9D1SBaIXqLk+5kuXnj/kYonLqe4VfyBPgo1tOFVy4wVkyClu40hyWxPX8oewdNOJdJhx8Pg7T57IvfDIP1MzA6fZDqsLhJ2MLObS9ncCzN56juvD9qbKD1V8Zll34Y1ClvcaVOUQLlBz7gLs8c/8IRVmBjgU+ptCanlU+pw== 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=zLjvjOdOrza6DN2eKp9twaq8zicSPEYLNkPVUh2Ut/s=; b=B9jkHQz13fpl17p2H+S7IvOrGBz5hRwEmtfAojdn41uB9gdwLV5jqWik4bTM7wbNcnT2yxYBLSFzf6tIBxeUzQlJa5MTzUzghAvP4TdyYU3pPiwvXelS3UeERSYcJukbZgKwQrQIP1/5cJyR2Zj6AVG9MEXH8kekjstnnFdCgwU= Received: from VI1PR0402MB3485.eurprd04.prod.outlook.com (52.134.3.153) by VI1PR0402MB3631.eurprd04.prod.outlook.com (52.134.7.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.17; Fri, 26 Jul 2019 15:28:21 +0000 Received: from VI1PR0402MB3485.eurprd04.prod.outlook.com ([fe80::7c64:5296:4607:e10]) by VI1PR0402MB3485.eurprd04.prod.outlook.com ([fe80::7c64:5296:4607:e10%5]) with mapi id 15.20.2094.017; Fri, 26 Jul 2019 15:28:21 +0000 From: Horia Geanta To: Iuliana Prodan , Herbert Xu , Aymen Sghaier CC: "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH v3 06/14] crypto: caam - check assoclen Thread-Topic: [PATCH v3 06/14] crypto: caam - check assoclen Thread-Index: AQHVQvEQJzJNMDz6nU6UAqFvjUrpUg== Date: Fri, 26 Jul 2019 15:28:21 +0000 Message-ID: References: <1564063106-9552-1-git-send-email-iuliana.prodan@nxp.com> <1564063106-9552-7-git-send-email-iuliana.prodan@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=horia.geanta@nxp.com; x-originating-ip: [79.118.216.219] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: fa30ee8d-0c99-47fa-7283-08d711dde483 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020);SRVR:VI1PR0402MB3631; x-ms-traffictypediagnostic: VI1PR0402MB3631: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 01106E96F6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(39860400002)(366004)(136003)(376002)(346002)(199004)(189003)(3846002)(6116002)(53936002)(81166006)(6436002)(9686003)(81156014)(99286004)(6506007)(86362001)(55016002)(316002)(478600001)(25786009)(26005)(71190400001)(71200400001)(6636002)(6246003)(14454004)(8676002)(54906003)(4744005)(8936002)(44832011)(66556008)(66446008)(76116006)(74316002)(66476007)(52536014)(229853002)(66946007)(5660300002)(66066001)(102836004)(7696005)(110136005)(476003)(446003)(186003)(14444005)(256004)(76176011)(68736007)(486006)(7736002)(33656002)(305945005)(4326008)(53546011)(64756008)(91956017)(2906002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR0402MB3631;H:VI1PR0402MB3485.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: TrSHEQ75c1CInAYjwg5721pX9JDh2tlsR4BicCrT2cYSJr2p4EoSuv0MVi+R6BOP3TzyqzkJzHWG6nSubo5+AXX/+th6GsGuqDu0VYh8sn7ANsA3ONbBXHWpBIHvEDc+oh4qtYEy0hU83px36TwWomoEJh/mpQcWhiC69wViaDTEHx5pjtGCs3XskyGzMYXdmAWnhv1btZyy8pf3N9ul7ryeml6wO8dl2B3ZA5/8dCK3pL91HcKh2R6SvfSLw2dSji2tYlncuX5V86uubqDLyxq69wIJ78BYo0OG8DPr4kPTp/eegbmYSXllGz3UwT44xHCeJiDkMLjXVJVlf+9xyodEWKAYKjr/5dkwxATRQCBT5gUEL3RYxl8Am5PbGbETHrhAD0avnLvnxOUalkoBBY2332vKRr8az0PBiFrPFVc= Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa30ee8d-0c99-47fa-7283-08d711dde483 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jul 2019 15:28:21.4409 (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: horia.geanta@nxp.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0402MB3631 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 7/25/2019 4:58 PM, Iuliana Prodan wrote:=0A= > Check assoclen to solve the extra tests that expect -EINVAL to be=0A= > returned when the associated data size is not valid.=0A= > =0A= > Validated assoclen for RFC4106 and RFC4543 which expects an assoclen=0A= > of 16 or 20.=0A= > Based on seqiv, IPsec ESP and RFC4543/RFC4106 the assoclen is sizeof IP= =0A= > Header (spi, seq_no, extended seq_no) and IV len. This can be 16 or 20=0A= > bytes.=0A= > =0A= > Signed-off-by: Iuliana Prodan =0A= Reviewed-by: Horia Geant=E3 =0A= =0A= Thanks,=0A= Horia=0A=