Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp168844pxa; Wed, 26 Aug 2020 07:36:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw30MKdlIE1jVHqxFhudJn9OycD/fpHTsu1rdVLYprIAOL27dTzbBhb68UswNx5+TfzxsJG X-Received: by 2002:a17:906:a43:: with SMTP id x3mr15707046ejf.321.1598452576764; Wed, 26 Aug 2020 07:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598452576; cv=none; d=google.com; s=arc-20160816; b=O6DQaHJC0iLrJouGHZF/DhYBOEbsv2CZJLAzvNEKYHHopVOmVVM5mz+4fN+KzP6qlf fdWv2ExFAGu5XeP2jzNcDhat4ctCGH9QMVxN9f4s7QJy+uebP80zYErUvN8ycFHYFqgH MhqTTZHdMsHie897nOvfM280HFeXkzsT52RLXxJez0XYYuHBZu8JfFYlvaif7dxAz0cv FlxvCSoHM+hGnr6MAJ70VI7XGBLsYOJisFk0XHZ5Ff44Yybtj68MTYR7brOIh0tSH70E s+l/hq635ROxLocmd2ETu7D3/HLo4Am6H+2jNABRgPlh9Ie/PfIX4B1k1+fTVEuart5p G2bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zxVgg2i7/7/Fu+XiJJojH2EN5w632NV5sZ/Jjl7MPaE=; b=lHTz2RadsWZufO8VMUJb41VRlsBUp5YORQ3LPNY8ytrwVXmP+vSwRQE6E19LdB8CFe 4fCtnx3rk6+DA6c2Ns/r8XAeDy0SxQe6WtPJFqaBfOzfdJ/3JDB4hMColTp6nZ3zsUV1 yOCVDmowvcV3N1VSQquN6/4hMdMIpSpRiUbtqGxhvUIanW4uJ99qXQLGsHfh1BmA/9IN jJotwXdCxQv5hB0T9Bd8JA5eXWr7NU79j/W6iAS4eyUVJsEWCy2Bghu24ebn+JGSZ/w2 NS46Pbv7FqNk4AQq4rIHfWSKgCZ2CEG7DXDCcGZ2g2TwT9rxBK39USWy34Axy23t8ksR HTVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=n7LCmpxo; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 v17si1534556ejd.324.2020.08.26.07.35.45; Wed, 26 Aug 2020 07:36:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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=20161025 header.b=n7LCmpxo; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-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 S1727907AbgHZOQP (ORCPT + 99 others); Wed, 26 Aug 2020 10:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727879AbgHZOQP (ORCPT ); Wed, 26 Aug 2020 10:16:15 -0400 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D2F8C061574; Wed, 26 Aug 2020 07:16:14 -0700 (PDT) Received: by mail-oi1-x241.google.com with SMTP id n128so1655612oif.0; Wed, 26 Aug 2020 07:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zxVgg2i7/7/Fu+XiJJojH2EN5w632NV5sZ/Jjl7MPaE=; b=n7LCmpxoboG7nlfzJOThgcNKqWCmiQYtBsm4u6M2pGo18MUWq6JZB85fAPfqJ0AnnS 13ySdrzu2M4N0MnbT81oDUPYjmxA3vKAkqG8QGAxLCR62iVqKLaf4hoI1wcT/CptQtNR YWcpmfuDcJUeFaVeEhTDOxRMMEqesyv5DQYiP1isatsGpwpl4Wfe+ffcxlzknPBxkFxG 1Y4+9JdtJ1xFCEWfxMp9wDmfyyDtADFDT1bbrLNkmv0YJ8mwEl8zaCLc90AddyjXcFqz me6Phi35e353HSTXbfkijv2ql3KuvfIeXsgY1ZeahqJI68pJs4g7L36aqqgm+mJ4BT6C 6kTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zxVgg2i7/7/Fu+XiJJojH2EN5w632NV5sZ/Jjl7MPaE=; b=Lbu9MFJZTNjffqVV7MdOGCwjds1phAa6bn4HqxLBuc267gy5mGt7f2Buj3HU+3KaNo VCoZ0WmX+d/yGhcFn0MXXECBDcK0to7q3lPCe54wVsFb5GXR74ajUCv4csyBLuv+D3dC xIepkga3Ebzo/ZnBKTmDk8Q7nz6sEsasrHaQxxmrk/iV0W4L9X1uI9BHIEHhZXY7/zAb 9UzbnN7HBgPpsGnhKndPAWz1g1BFVsPd/IkW/Wg8Mv7NYYBUGySkisA9c7W4lgLWGX7H /z8X06rS08h8CDh9LhPIHWCmGXi31U6Vg9SYtghWREG4sQJFdOgQvUMAtsGH/vd80kD0 vRaw== X-Gm-Message-State: AOAM533u6S89Oo/gFbNWTFn2963MZqbcSmYjPCgpVEMSGZ7lBaq2Rl46 AiyKnbzKr7GEK7/198mx9J3GFMhte4c= X-Received: by 2002:aca:4fc3:: with SMTP id d186mr4282731oib.20.1598451372152; Wed, 26 Aug 2020 07:16:12 -0700 (PDT) Received: from ?IPv6:2605:6000:1025:4ecf::1e3f? ([2605:6000:1025:4ecf::1e3f]) by smtp.googlemail.com with ESMTPSA id v18sm527842oic.12.2020.08.26.07.16.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Aug 2020 07:16:11 -0700 (PDT) Subject: Re: Issue with iwd + Linux 5.8.3 + WPA Enterprise To: Herbert Xu , Andrew Zaborowski Cc: Ard Biesheuvel , Paul Menzel , Caleb Jorden , Sasha Levin , iwd@lists.01.org, "# 3.4.x" , Greg KH , LKML , "David S. Miller" , Linux Crypto Mailing List References: <20200826055150.2753.90553@ml01.vlan13.01.org> <20200826114952.GA2375@gondor.apana.org.au> <20200826120832.GA2996@gondor.apana.org.au> <20200826130010.GA3232@gondor.apana.org.au> From: Denis Kenzior Message-ID: Date: Wed, 26 Aug 2020 08:57:17 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200826130010.GA3232@gondor.apana.org.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Herbert, On 8/26/20 8:00 AM, Herbert Xu wrote: > On Wed, Aug 26, 2020 at 02:58:02PM +0200, Andrew Zaborowski wrote: >> >> Running iwd's and ell's unit tests I can see that at least the >> following algorithms give EINVAL errors: >> ecb(aes) >> cbc(aes) >> ctr(aes) >> >> The first one fails in recv() and only for some input lengths. The >> latter two fail in send(). The relevant ell code starts at >> https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ell/cipher.c#n271 >> >> The tests didn't get to the point where aead is used. > > Yes ell needs to set MSG_MORE after sending the control message. > Any sendmsg(2) without a MSG_MORE will be interpreted as the end > of a request. I'm just waking up now, so I might seem dense, but for my education, can you tell me why we need to set MSG_MORE when we issue just a single sendmsg followed immediately by recv/recvmsg? ell/iwd operates on small buffers, so we don't really feed the kernel data in multiple send operations. You can see this in the ell git tree link referenced in Andrew's reply. According to https://www.kernel.org/doc/html/latest/crypto/userspace-if.html: The send system call family allows the following flag to be specified: MSG_MORE: If this flag is set, the send system call acts like a cipher update function where more input data is expected with a subsequent invocation of the send system call. So given what I said above, the documentation seems to indicate that MSG_MORE flag should not be used in our case? Regards, -Denis > > I'll work around this in the kernel though for the case where there > is no actual data, with a WARN_ON_ONCE. > > Thanks, >