Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1165004ybl; Fri, 16 Aug 2019 09:57:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTg3HqTwxW0VX+aUv7Utiy3o7ZTFFWYPs9PHTG8A2c74s6/lg3YQaj+4Yebvn+vURMzO9G X-Received: by 2002:a65:4044:: with SMTP id h4mr8673331pgp.164.1565974651446; Fri, 16 Aug 2019 09:57:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565974651; cv=none; d=google.com; s=arc-20160816; b=cD3ZUE2ICNMdplJimcfFtar8IruH1V97c/3l0sOuTmH4h+8PWzQmKOgmvXGC7J+M2J lfg9mproSOz7lF59OqW/40vZP4B9xNMidfihWASw1h8kOe8pM+BhYzmlH9ynDwxlhrDY B+ah2Jmm0Vr/ycTkM3Y9f2EQMwqZhsKFrNNPj6OVkYJFm4/uso3XLZL1wnqfNrYSrVrB elR2KRRZsnHH//HT3AmGHoLmqOX0QnIIBgoy/tvbB0ged1m11U5A6Ee6AMWIYmLF37aL mnxtoH4beNH2t82aUWdIiYAmsIMHZfYTajjD8Fv/1rgq2068r2HDWx08zrB6WyY5JRWt 2MPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=TIcb8pistaLviY4e1GxRuyoDU9dQirhpuGy2muRaJ1Y=; b=e8Tq1xJlWr50pc7bkBl112l2mppMqS+SYSZVSyqnYMVPKKrgQ4ywrSBlvKORW85qyZ +9SzH4MIaErD9zCdmCjRsy3p82jLNTI3y9jddCjCcx6gegeeD3c35q4IiMzvNwr4qb/i bESbGtokb2UAknfbbf6xL3h8kGK9Mp1pVkdQg/CLB1Pg53EDU9SezoblJ1e2nzcxumkg RZBZqSyMfkVWl+Dpmrfhg3QNlIgbbo7UtdcxjfQufX1mAsnuS89u/WLmpK3mOZUi60ib W/P1Jbf6PE8vGGvIxxG8GUQ4vuASifUGwjVpSfe/Nc03Y7yFmpdGT1CeS6FtCJutLceu yS9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r33si3345114pjb.42.2019.08.16.09.57.16; Fri, 16 Aug 2019 09:57:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727127AbfHPQ4R (ORCPT + 99 others); Fri, 16 Aug 2019 12:56:17 -0400 Received: from mga11.intel.com ([192.55.52.93]:35899 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725956AbfHPQ4R (ORCPT ); Fri, 16 Aug 2019 12:56:17 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Aug 2019 09:56:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,393,1559545200"; d="scan'208";a="376760471" Received: from ppiatekx-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.39.24]) by fmsmga005.fm.intel.com with ESMTP; 16 Aug 2019 09:56:10 -0700 Date: Fri, 16 Aug 2019 19:56:08 +0300 From: Jarkko Sakkinen To: "Xing, Cedric" Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com Subject: Re: [PATCH v21 24/28] selftests/x86: Add a selftest for SGX Message-ID: <20190816165608.j6slxb2hpamokvts@linux.intel.com> References: <20190713170804.2340-1-jarkko.sakkinen@linux.intel.com> <20190713170804.2340-25-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 17, 2019 at 03:37:03PM -0700, Xing, Cedric wrote: > > +$(TEST_CUSTOM_PROGS): $(OUTPUT)/main.o $(OUTPUT)/sgx_call.o \ > > + $(OUTPUT)/encl_piggy.o > > + $(CC) $(HOST_CFLAGS) -o $@ $^ > > + > > +$(OUTPUT)/main.o: main.c > > + $(CC) $(HOST_CFLAGS) -c $< -o $@ > > .o files don't have to be generated/kept. And to be consistent with other > selftests, please don't generate/keep them. AFAIK there is no rule that .o files can't be generated when it makes sense. In your other comment you correctly pointed out that "-I$(OUTPUT)" was missing when compiling encl_piggy.S. However, it is required neither main.c nor sgx_call.c, and thus should not be used there. The consequences are: 1. The enclave can and should be compiled like you suggest here. 2. The enclave hosting program must be compiled as it has been. /Jarkko