Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp475315pxb; Fri, 28 Jan 2022 03:27:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1kp+oBqcYT25tDvYZAQburCgPzJIwzRtZVJncBijPKKNp/mSghD17O/ADNYhZE4Ctnx2u X-Received: by 2002:a05:6402:2c7:: with SMTP id b7mr7878979edx.217.1643369268327; Fri, 28 Jan 2022 03:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643369268; cv=none; d=google.com; s=arc-20160816; b=wlRtX32kxl/vCgFtIwhRagGbxdraTvr5kr+WLpPTZUW2kWgUnpohVstbDjvEDhCrrn xdlZ4/0xNGOeIKmtVZ9SLN3k26Elp/p4c5VXJCg+WrHy67gCCJBV3f48VK88KlpoOIUU Z6ujUsDdw+tYxLCYHGxfdUnJsn573bxBPXM0NgSW8m2+Yfe8gdjymkbAwVZoAYBX9oFJ WYe0oOiixumsooV8a4fQN5twCouyeuYWj3n4vBiI5U3yLPoh/DDE1UAKOON3tMxpEm5Q pQ7r/8RbbCgUhLGTnkDvJ1BZv65xCHrWNR2VAJ1h+s/hd7f5nrM50rnpfMF1hjdH/4MZ gNmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=aSG6wKr0v3ubZC/yTzhG0VRBiAKrGFtCqsPwiK/7Zlw=; b=F1Q6nJwfxlJbjkNM44zFodeuISCoKKaxVhoZ+4ve1rSq6Yfz/aa3nA9uFAKn1srTKS D1RnKSBAOmLyN3q0ihmig3o3BaxQkN1GCF8AKOBjr6ZoGy8aLmUxYZx0WEky6VK4kpYa jsfR4aocSOJAvsIfIGCcNZaId0N5UkvPnXJjWDNGqVAGmxw7D6G1IfYQRHL6XjT0O8dP RAjbnoABL+3ndxGuB+VHTWhBYry8DrZAx9POZAeEec3aI0IaSHT4xjcCo0RZ83Axe9ln bZ5g65Z0PJvZO0vVkAsb+Jk3Jg7eC0LZE002+PXlWXz8e3Mi1BGl+IRUyvTVBFEA+GY/ Fhuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ciSTkyve; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si2768444ejk.785.2022.01.28.03.27.22; Fri, 28 Jan 2022 03:27:48 -0800 (PST) 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=@linuxfoundation.org header.s=google header.b=ciSTkyve; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238682AbiA0RXX (ORCPT + 99 others); Thu, 27 Jan 2022 12:23:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233679AbiA0RXU (ORCPT ); Thu, 27 Jan 2022 12:23:20 -0500 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 035E1C061714 for ; Thu, 27 Jan 2022 09:23:20 -0800 (PST) Received: by mail-io1-xd34.google.com with SMTP id e79so4368200iof.13 for ; Thu, 27 Jan 2022 09:23:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=aSG6wKr0v3ubZC/yTzhG0VRBiAKrGFtCqsPwiK/7Zlw=; b=ciSTkyveZepfHPpJzY9+3WZpFGiUPVCctm7Hm9k7hvlPEGuZ6tZnYcn6wUabTAy53g eDe/SAl+bJYjU883tOyfq1vjtCz3QYmup5PcbRPOfM6qR7pMJPSU5iKZ8rTMEqSMV7xE oe5PjG09l+JoR74v7iVDYGGqaMKtj4G1hMr0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=aSG6wKr0v3ubZC/yTzhG0VRBiAKrGFtCqsPwiK/7Zlw=; b=Qprb3HzKLsvxLzR+db6sm6RQ1ydSONjjZUbf4rDl5VHCaqiDOgxGdnF4MValtXgeJ6 9MQjZR+qd8VvkhtlpglEKmFvj9Oj3wtJVSrRxQkibNxsXztKulGlLHMyZRL/qELre+81 gY0huSWuBBbOOjiebyO/xmlAYrYZb3c9SzFUmXTOGWXTcB/uv120ExF3qYd3JM3c6vQY J4iz9wIHcnI78r4Cb+dkyhx1DdVzvHQM5etftGIQFylKyaCFoMBAhAY/QV3L5uRp3mx1 C0kdVaRpA5BYDcjbVFhr7mqcz8eUcGfQTAgvJAnbYKcYdNz8WbS2+AMrhnrQNPlWLw72 L82A== X-Gm-Message-State: AOAM531g5+j9Q6adEx1pCDnmIcPahPFXtaWEhv4CHgK5mOrqQKaByNXp lfDTTNWtpJlWKsyR71JKtadArw== X-Received: by 2002:a05:6638:192:: with SMTP id a18mr2408066jaq.27.1643304199356; Thu, 27 Jan 2022 09:23:19 -0800 (PST) Received: from ?IPv6:2601:282:8200:4c:fcdb:3423:ed25:a583? ([2601:282:8200:4c:fcdb:3423:ed25:a583]) by smtp.gmail.com with ESMTPSA id b12sm6973918ilv.68.2022.01.27.09.23.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Jan 2022 09:23:19 -0800 (PST) Subject: Re: [PATCH] selftests/exec: Remove pipe from TEST_GEN_FILES To: Muhammad Usama Anjum , Kees Cook Cc: Eric Biederman , Shuah Khan , kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20220127163346.653546-1-usama.anjum@collabora.com> <202201270844.660E5394C@keescook> <329a935a-1c12-c5f8-1467-e6a6e98c9c24@collabora.com> From: Shuah Khan Message-ID: <6b5c55fa-955c-0771-eb9b-43c7d0606764@linuxfoundation.org> Date: Thu, 27 Jan 2022 10:23:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <329a935a-1c12-c5f8-1467-e6a6e98c9c24@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/22 9:55 AM, Muhammad Usama Anjum wrote: > > > On 1/27/22 9:45 PM, Kees Cook wrote: >> On Thu, Jan 27, 2022 at 09:33:45PM +0500, Muhammad Usama Anjum wrote: >>> pipe named FIFO special file is being created in execveat.c to perform >>> some tests. Makefile doesn't need to do anything with the pipe. When it >>> isn't found, Makefile generates the following build error: >>> >>> make: *** No rule to make target '/linux_mainline/tools/testing/selftests/exec/pipe', needed by 'all'. Stop. >> >> Ah, good catch. However, I think this should be moved to EXTRA_CLEAN instead of >> only removed from TEST_GEN_FILES. (i.e. "pipe" is created by >> tools/testing/selftests/exec/execveat.c and should be removed. > Hi, > > Thank you. tools/testing/selftests/exec/execveat.c creates pipe file and > removes it after performing the test on it. I've looked at the code path > between creation and deletion of this file. It'll always be removed > automatically. So we shouldn't add it to EXTRA_CLEAN. > Thank you for finding and fixing the problem. I see that pipe is created in prerequisites() and removed from run_tests() after executing non-regular file test. The change looks fine and I ran a quick test and it looks good. On a separate note the test use its own Makefile for running a test and copies it over in TEST_FILES - Just a bit strange, all seems to work well. Reviewed-by: Shuah Khan I can pull this in for rc3. thanks, -- Shuah