Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp34265pxa; Thu, 20 Aug 2020 23:51:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzroQg7yOvmSaebc5t/znUoqM28iVHMa/UqEQZVrhkAABZt2tK0r/3Oil+oiLcFST69Vjyp X-Received: by 2002:a17:906:3e06:: with SMTP id k6mr1481089eji.37.1597992663236; Thu, 20 Aug 2020 23:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597992663; cv=none; d=google.com; s=arc-20160816; b=uoHAEzcQ16TeMji5Mja217/N8IucLvgwB9UTmNr0De9WkqH6biQv+gWCRXRhtRm1hi HMN+hcI4UKhQyFAr/8AOXfbje6JCkL0nRHofio6kADEGo4ZgCHWEG8xTHVaOID4QD2Qz YMqS4vhARLimcBAdhtxbV6e8qAJZx8HeaBfIqsMFyGTLBSEJFq2W3E1Dk6RwfzzrtDla uYJ0L2hDL/Q0fOte7V22E+Tnmncr+drmctX/t4fr6XL8rLtIO5KZIZwWwyZ7SjoKZKfW FlqLvn/KhluFpcvE/btKlq42VfipBmy8zBu02saddnMJnamLSmV8S3HibuSx58mMhdDA SBzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:reply-to:message-id:subject:cc:to:from:date; bh=VS+W5xBXhvq1zFYq706XyD/4JxH8Tw+g2m0Iy4DOIMA=; b=WuUCZglQVIMRKJOna5Hl9FRhmMy7wcIPVFd9EmD7mFqesOjQo+6mvQDLJmsLB6zd+E j9ocQWWvBp3LD7p2p9flgwhVX0MwGm2tH/Kx+MllqWIe/KMmOTzaspp5ZTPB0MJKsi8a XyYlNWcTqS/NP0IjYL+bKIZegg8IYZ3IydwnTt6Dx5XILAi3+FxcIT+uf8Ky9A3yfArA JbMVQIn8Ww5ErAp2kaZP0yrQZWrl+uEdS4DtmYtYrUXiO7HixhNyX7FVQgYgDCdUT5HT mTN/wqEpth//SJflap9HX+H54tPUjGWsdniMWl/q+L2JYJwYNKs3WYzYNkmBXknYEQ14 7yag== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v15si632509edy.90.2020.08.20.23.50.29; Thu, 20 Aug 2020 23:51:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726373AbgHUGu1 (ORCPT + 99 others); Fri, 21 Aug 2020 02:50:27 -0400 Received: from mx2.suse.de ([195.135.220.15]:54756 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726119AbgHUGu0 (ORCPT ); Fri, 21 Aug 2020 02:50:26 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6486AB663; Fri, 21 Aug 2020 06:50:53 +0000 (UTC) Date: Fri, 21 Aug 2020 08:50:24 +0200 From: Petr Vorel To: Eric Biggers Cc: ltp@lists.linux.it, linux-crypto@vger.kernel.org Subject: Re: [LTP] [LTP PATCH 0/2] ltp: fix af_alg02 to specify control data Message-ID: <20200821065024.GA11908@dell5510> Reply-To: Petr Vorel References: <20200820181918.404758-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200820181918.404758-1-ebiggers@kernel.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi Eric, > It isn't clearly defined what happens if you read from an AF_ALG request > socket without previously sending the control data to begin an > encryption or decryption operation. On some kernels the read will > return 0, while on others it will block. > Testing this corner case isn't the purpose of af_alg02; it just wants to > try to encrypt a zero-length message. So, change it to explicitly send > a zero-length message with control data. > This fixes the test failure reported at > https://lkml.kernel.org/r/CA+G9fYtebf78TH-XpqArunHc1L6s9mHdLEbpY1EY9tSyDjp=sg@mail.gmail.com > Fixing the test in this way was also previously suggested at > https://lkml.kernel.org/r/20200702033221.GA19367@gondor.apana.org.au > Note, this patch doesn't change the fact that the read() still blocks on > pre-4.14 kernels (which is a kernel bug), and thus the timeout logic in > the test is still needed. Thanks for the fix, merged! Kind regards, Petr