Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4194982imm; Mon, 11 Jun 2018 08:25:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJIJEZlCOXBShfYWQHpvVlXWzQRibsmpoglE3NVu5sqIV59355fwn4eZLW3nX1ZRpSJFl6D X-Received: by 2002:a17:902:125:: with SMTP id 34-v6mr19304182plb.42.1528730722511; Mon, 11 Jun 2018 08:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528730722; cv=none; d=google.com; s=arc-20160816; b=vRD7vLsdyzXp8KQCUvpqfXc/QPEZKVGZRGuLIfLrEsaJUNSaEkxfy+C80O0EDJwOzd TsaaqN16sdJ5E6Osoc/DQQg7yNzo8mMtYDY6aZjwhY/iD0Qy/vTk+tPQt7bVNV23bc9T noj2V33Kbl2UCWl7uVjf7KO1jezts7ghvuE9KTfPIK3Q5KNW77Xf8bcRRUBxmpi0jGBD 4uwhLH6ObHyTDhCHUCITt+OVB/F/SlXdRp1m3H/1JnYP/vqdZmiJvbVzsIitWYs9FPfW cfOiEoo4GMMqSJrTVurv5GTuG8wrwvKO1pf/HAxqGJD5VcSdsoDcTNVw2tHRJd3aO7HD szug== 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:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=J7/0E74ZT1YleqZbKkLhOSbRT/QuztVsoV+oqeovesw=; b=NxeU9Q/flGaXiwVUqgo/xacULYIx3ZyuHdvQyPIvpCABPnUsO4hcH7dR9Pk5Ppjokx qYv5tTBn3amKWMwUS6Ozol9Y3VBg+csjnGIr/HnlYv9TfJACt8s9up/m4I7oCW77+jZ7 6h3lcdrm+n2Hy8SXfgb+LtNJdAXksFm3zG5aYIG/ApdTfDVO0k80zq+NS+x6Sf8zCFTd uKcwfFHz4e/193eFIyONd9bq66rdqUY4ezahu/jr5L4sXW9CVqxcfxjAhbaln95Zse59 YHEhStrhzmhXIYR8R3UytatASWCtFL3i44TR/e5clLtH4BBUA391f+L0Sd5G+JK3LoBU jrbQ== 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 m20-v6si7134000pgn.268.2018.06.11.08.25.07; Mon, 11 Jun 2018 08:25:22 -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 S932749AbeFKPYn (ORCPT + 99 others); Mon, 11 Jun 2018 11:24:43 -0400 Received: from mga12.intel.com ([192.55.52.136]:3969 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932533AbeFKPYl (ORCPT ); Mon, 11 Jun 2018 11:24:41 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2018 08:24:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,502,1520924400"; d="scan'208";a="46263737" Received: from sjchrist-coffee.jf.intel.com ([10.54.74.135]) by fmsmga007.fm.intel.com with ESMTP; 11 Jun 2018 08:24:41 -0700 Message-ID: <1528730681.9779.42.camel@intel.com> Subject: Re: [PATCH v11 06/13] crypto: aesni: add minimal build option for SGX LE From: Sean Christopherson To: Dave Hansen , Jarkko Sakkinen , x86@kernel.org, platform-driver-x86@vger.kernel.org Cc: nhorman@redhat.com, npmccallum@redhat.com, Herbert Xu , "David S. Miller" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , "open list:CRYPTO API" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Date: Mon, 11 Jun 2018 08:24:41 -0700 In-Reply-To: <00750c65-27b5-7851-19f5-9a712686dfb2@intel.com> References: <20180608171216.26521-1-jarkko.sakkinen@linux.intel.com> <20180608171216.26521-7-jarkko.sakkinen@linux.intel.com> <00750c65-27b5-7851-19f5-9a712686dfb2@intel.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-06-08 at 10:27 -0700, Dave Hansen wrote: > On 06/08/2018 10:09 AM, Jarkko Sakkinen wrote: > > > > --- a/arch/x86/crypto/aesni-intel_asm.S > > +++ b/arch/x86/crypto/aesni-intel_asm.S > > @@ -45,6 +45,8 @@ > >  #define MOVADQ movaps > >  #define MOVUDQ movups > >   > > +#ifndef AESNI_INTEL_MINIMAL > > + > >  #ifdef __x86_64__ > >   > >  # constants in mergeable sections, linker can reorder and merge > > @@ -133,6 +135,8 @@ ALL_F:      .octa 0xffffffffffffffffffffffffffffffff > >  #define keysize 2*15*16(%arg1) > >  #endif > >   > > +#endif /* AESNI_INTEL_MINIMAL */ > > + > I'd really prefer that these get moved into a separate file rather than > a scattered set of #ifdefs.  This just seem fragile to me. > > Can we have a "aesni-intel_asm-minimal.S"?  Or, at least bunch the > minimal set of things *together*? A separate file doesn't seem appropriate because there is no criteria for including code in the "minimal" build beyond "this code happens to be needed by SGX".  I considered having SGX somewhere in the define but opted for AESNI_INTEL_MINIMAL on the off chance that the minimal build was useful for something other than SGX. I'm not opposed to bunching the minimal stuff together, my intent was simply to disturb the code as little as possible.