Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp572288pxk; Wed, 16 Sep 2020 11:05:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy43RLVYcLkxOkJI587h+QefrxPQyUFOP4/vNaZGGmhpjG/YvufF+f4IA48ZHBfoIivxIqj X-Received: by 2002:a05:6402:d8:: with SMTP id i24mr28969596edu.294.1600279543438; Wed, 16 Sep 2020 11:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600279543; cv=none; d=google.com; s=arc-20160816; b=bqv0kkHpNuyPUMfhVahXYRnGVpZTI38MTA6gEoFvTzv9hc2SxcIK6r+2XJMlmFDkYJ ie4ZJaD2jRqWyD9QYgB5XyH+ieJyPGbx8XUaFId2n8JXs8FncreqalGuOSOurcc3xvBL ACcrO4BUUXNTQwc43vlis2kcvaUcoMyMm0ck/HA1BlIaT4LfP1yprboJ0BEbFV6WgyRs +742LeyynqC98zHq6jLZI5YW/P0qFXopyOyy/BoJ8rBK8ACcN115UvPBeAaKeteYGFZL x77+EFF6NEpvkhgrYqp3JjnkGl4EF9eDVIz5xtmbd94FtJf9fLx9EE8fYAq9uXUXVAPs Dgnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=4HciQJ7IuY08oMqUYmgcEKDLosHjUUgELM0r/b5m6jc=; b=cAxL35T+regQ6U/SyAR6zoGeQdkxxvPK0FBHD5lDorlvnRAv9mET38xqiEI4zni9cH OX3jxNo0RYBrcs3mi2mkqg7P+VOlQpFGukKTSe45NyY0uc1nSTo8X3ob6OoxG9wpTeUj 5yLRdF3BmePE+6lMp7nfVoYM189fvlshEAdVUF7nCAD37Li/ECLfqN8WI2JHWRnuXcDc ZmCY1yV3FHkK6CsqCxdt4vKDMOwq2jMPFhPZjIF3tyNBbyKxiMumfFgXfXiuAMzjxL1D w23kfxGKg4bX33efGPQWSfCqa8GwaJaTr2VicHRjbM5pBxqobrZLgttZRxD0VHJMXaey oRWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 f11si12273869edq.528.2020.09.16.11.05.21; Wed, 16 Sep 2020 11:05:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727748AbgIPSCG (ORCPT + 99 others); Wed, 16 Sep 2020 14:02:06 -0400 Received: from foss.arm.com ([217.140.110.172]:34856 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727291AbgIPSAk (ORCPT ); Wed, 16 Sep 2020 14:00:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E251214BF; Wed, 16 Sep 2020 08:38:15 -0700 (PDT) Received: from arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 91CA13F718; Wed, 16 Sep 2020 08:38:14 -0700 (PDT) Date: Wed, 16 Sep 2020 16:38:12 +0100 From: Dave Martin To: Boyan Karatotev Cc: Boyan Karatotev , Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, amit.kachhap@arm.com, vincenzo.frascino@arm.com, Shuah Khan , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys Message-ID: <20200916153809.GZ6642@arm.com> References: <20200828131606.7946-1-boyan.karatotev@arm.com> <20200828131606.7946-4-boyan.karatotev@arm.com> <20200902170052.GJ6642@arm.com> <70e207ea-f7c2-2c9d-e868-3ba3b6451c6f@arm.com> <20200907102717.GM6642@arm.com> <4f38a974-d5a0-87e6-3db3-647e3cc32c0e@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f38a974-d5a0-87e6-3db3-647e3cc32c0e@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 15, 2020 at 04:18:28PM +0100, Boyan Karatotev wrote: > On 07/09/2020 11:27 am, Dave Martin wrote: > > On Thu, Sep 03, 2020 at 11:20:25AM +0100, Boyan Karatotev wrote: > >> On 02/09/2020 18:00, Dave Martin wrote: > >>> On Fri, Aug 28, 2020 at 02:16:05PM +0100, Boyan Karatotev wrote: > >>>> +int exec_sign_all(struct signatures *signed_vals, size_t val) > >>>> +{ > >>> > >>> Could popen(3) be used here? > >>> > >>> Fork-and-exec is notoriously fiddly, so it's preferable to use a library > >>> function to do it where applicable.I would love to, but the worker needs a bidirectional channel and popen > >> only gives a unidirectional stream. > > > > Ah, fair point. > > > > Would it help if you created an additional pipe before calling popen()? > > > > May not be worth it, though. For one thing, wiring that extra pipe to > > stdin or stdout in the child process would require some extra work... > Well, I probably could, but I doubt the result would be any better. I > agree that I'm not sure the effort is worth it and would rather keep it > the same. Sure, fair enough. Ideally kselftest would provide some common code for this sort of thing, but I guess that's a separate discussion. Cheers ---Dave