Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3064973pxk; Tue, 15 Sep 2020 09:11:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygChtfONFheZgN98LV7JRSpwRNDXQaVyICEfibJ290stR/JGD2JFVV3ZffoeLe2nfeLEJg X-Received: by 2002:a17:907:4035:: with SMTP id nk5mr20422906ejb.418.1600186296446; Tue, 15 Sep 2020 09:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600186296; cv=none; d=google.com; s=arc-20160816; b=YBp/opkZMnE/eC1+bGYptIbtatG42ESUp1NFmy9gKXGHrVbykh3ia2MImo1xck8ijk 0xLBFB1ER5Ig9qAYrlJ8nPVawrQuR3NiFQxxiGsg+Pp0m/OroaDNtsW52VWJ9WUnvo7l c+4WAb0oEm71xdgc7+b9N2Bm3IDvBIl77gKuxAWxD9honMk+PhEEk6lBUMFgH+jFbM+1 YNkLHUAlqbOGagmNGMjTEC+98PHfAbC1G++AGbmgqqSwNzAMOPDH4c53dX8L/6fxh5a3 Qtv5W9ZFUnm3bl3kNB5hnxESRRtrKeOibpZJhtyjVMNNmOBF5nEVQNj1LFS6beikkVMG yfZg== 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=ZLNp53JnXqD+zI2AfbeY3jtwOS37p2pT80fxgLiWZN8=; b=qwm/Q8r17xD0+GndGZTnHUElGfHbhdmpX2nOEMN/81JZaaDdZoiK6vC2grcWJ2oH+V 1B9YkDVm3839Pwl6rN+TK1U/3+/LzBxMl96cWRiya9//AF734BVSIuTbcraG9lY8qduW 0QcgBIU9sNYLsoTd1v6PrzHyD57+7Ybw83+RwqHOv0GhQC8B5cMnlMYcen6jlGFlV8vR f0EazSG/DBlsNtbGVKFfSrEHQn8SrKaGFGxX8LklzIBxEZqmzFhyz172XakPmXbTOqk9 0h9FjfXTYxQOzhBo/HciF7mn1e/XjeJdHiJlmUC0HgJtre5MQKqaHj6ZtfOzlaBzxLoH lEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vMUOfnuc; 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; 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 d17si9520979edy.180.2020.09.15.09.11.10; Tue, 15 Sep 2020 09:11:36 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vMUOfnuc; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727281AbgIOQIJ (ORCPT + 99 others); Tue, 15 Sep 2020 12:08:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgIOPSo (ORCPT ); Tue, 15 Sep 2020 11:18:44 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C12E6C06174A; Tue, 15 Sep 2020 08:18:34 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id o5so3698970wrn.13; Tue, 15 Sep 2020 08:18:34 -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=ZLNp53JnXqD+zI2AfbeY3jtwOS37p2pT80fxgLiWZN8=; b=vMUOfnucxpczHnWvB+f5WMzHUAw3odnOlDddbX5Qms5eQnxEPkZuGEBsFrH9Hx2brs 4EhjylGdU2T1HM+nFS4hkEGNotC528/Finps0OSX4OUCaD679lDNPshLWoDM2d+r0/YP 66ZzwP2znUksqEESxJYeO/iUJ8coQff6dSQrVZaDO7wcFengNrBmfxWTJ64PAf5Jnowz 6wNc053uWNZAX1q5O9HZd0GZlesITrAEpqz0QAIq/hgT8jea339psONFXSHR7z8fqJ+z iWiOr/0u9I38tvaqFmympOKp4X7CXxzotFk1ehM1kJdSpTY/rCC4FOtOMrESqpoFLiqP k/NA== 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=ZLNp53JnXqD+zI2AfbeY3jtwOS37p2pT80fxgLiWZN8=; b=c9j+81H86g0LMQvZo01OOfQ4D6d7e9YOqbgMLPBs7wlDYvtp9WiwQzee+tXiPLWMVE 23x7b+sY+MUSyNV5JrcogRfd+Hp5No/d7Gke7NQelzmeBixUmBnjGjybnIsLL70MnHo8 +BUDquCKThrP+gRaIvNkC0ek0yBG6Rfxq0bqS3uTw8kh/1La2NKDAqvIAA9x28L6K85h Dp4YvjCf7lMa4MHTYwqsimNuBK1ru3odugTGSSp4xOHpiNtam9cJmcy1lTJ+lZSNEwsS uyfc3rcLjEi+ghotgrCF31NqQnk354cxZb2MiEEkQVamSOfxle5aGiN0sSmllfk8sdvO xCyg== X-Gm-Message-State: AOAM531WJ0IQcLRPI9k9VW+vRoCI7CHqX4/mPCMCjkMrWBQsIe/OIwO+ a1I2o1NXN2fmfyplQtqcBROy2Z8xCMoQtH7u5gg= X-Received: by 2002:a5d:458a:: with SMTP id p10mr21319559wrq.282.1600183113296; Tue, 15 Sep 2020 08:18:33 -0700 (PDT) Received: from [10.127.42.3] ([94.156.155.144]) by smtp.gmail.com with ESMTPSA id t16sm27840401wrm.57.2020.09.15.08.18.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Sep 2020 08:18:32 -0700 (PDT) Subject: Re: [PATCH 3/4] kselftests/arm64: add PAuth test for whether exec() changes keys To: Dave Martin , Boyan Karatotev Cc: Shuah Khan , Catalin Marinas , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, amit.kachhap@arm.com, vincenzo.frascino@arm.com, Will Deacon , linux-arm-kernel@lists.infradead.org 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> From: Boyan Karatotev Message-ID: <4f38a974-d5a0-87e6-3db3-647e3cc32c0e@gmail.com> Date: Tue, 15 Sep 2020 16:18:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200907102717.GM6642@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.