Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5608564imu; Mon, 26 Nov 2018 02:57:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/WIsR/KnIR2AS3zY949qb9h4Om+WsP+kZGzgzrXYQ5BuAfr1Q9wW+fR+yCgAKU2aXhi2b1c X-Received: by 2002:a63:2f86:: with SMTP id v128mr23591066pgv.407.1543229845232; Mon, 26 Nov 2018 02:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543229845; cv=none; d=google.com; s=arc-20160816; b=iGuZiG2YNEXoxy3FITSaPMWFLLYFHC6eojycbEOQS81y4v75XyHdDg/Kv3BgnZubGc JJtMnfWajiAbjjWvpvwLOCZH93tHTcKhpwNHj4xmKc//xOAhtDsCzeFytSeOdn9ARY70 HZJKZGvMNwYU6Hl3fVs2ZktPwXAwgq+G5Se5nxMQ1SIAdtnxvvSmBvPsU8f9TaANJl05 KPQcwQGOyIJ8yWyvg894a4dP8yFebRMSsX4ZobidzeQBNPVPM8CuEr3iy2U0uiUD90TT 2/A4vlagmmKmtuPtdp0fhZybpr6rBv8obceLVED4HVdXCA8p0z121mr+gmMKrRLF3GLz Eojg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HwvhsRrjK3wDiDlWF16bc3Ud0H3EWQcjvq3F4nVr4qM=; b=PLkvi/xq4J0n86AvFuwmB92W3kSiBaCm+SnPhe74luCGoQGB0+Zf5kHPP8tRo1lk+w uNcuk4C8Vh4uY5syforsQrU9OrPc3G1iBQfcU451lOgnu/BnduEAnR/ICfAsdO17Bxyb +daeoaMTt9KptI8+N1igMf/gU7FUG3RsBQx+SLgbP4zXC9qftsXAjjEypkJrmD4uA3YA nkVbe5FyLBvcyNkowWyBFbI3NxpoYxm/1iRNzhRBAfqBh9YGCgcWo4yBsfSNcLfPQJKm jGyjXxeN32rSPdtRsk25vMN0vDqlN4G4PS+6Mk5vd/Z06BQrZyvYTVpVbTH278bxCsJX bmQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=x6IjnMQr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si11141278pfb.166.2018.11.26.02.57.10; Mon, 26 Nov 2018 02:57:25 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=x6IjnMQr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727565AbeKZVsX (ORCPT + 99 others); Mon, 26 Nov 2018 16:48:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:56878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbeKZVsX (ORCPT ); Mon, 26 Nov 2018 16:48:23 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D69A2089F; Mon, 26 Nov 2018 10:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543229679; bh=BC7zFL+GDZwK1xfYTcMWHumUwYGX4HGMmH+x+VT++ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=x6IjnMQrkT/TaD3eOSVRrH5Btq0LGMKSTm4acj5vPHKJbfE0y/B+w+SIJ+ynQtL/i kDBUNyyXR+d0UF2lVKPhvLFc49QH5uu9jXDvarPKGHkWEMCvY7rNUYbiEoy4DAL77n uSYKrXqrIGswQORIkHz+7fomIU4RIl1uVt1dQwpw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Davidson , Herbert Xu , Nathan Chancellor Subject: [PATCH 4.4 30/70] crypto, x86: aesni - fix token pasting for clang Date: Mon, 26 Nov 2018 11:50:45 +0100 Message-Id: <20181126105049.705533129@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181126105046.722096341@linuxfoundation.org> References: <20181126105046.722096341@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Davidson commit fdb2726f4e61c5e3abc052f547d5a5f6c0dc5504 upstream. aes_ctrby8_avx-x86_64.S uses the C preprocessor for token pasting of character sequences that are not valid preprocessor tokens. While this is allowed when preprocessing assembler files it exposes an incompatibilty between the clang and gcc preprocessors where clang does not strip leading white space from macro parameters, leading to the CONCAT(%xmm, i) macro expansion on line 96 resulting in a token with a space character embedded in it. While this could be resolved by deleting the offending space character, the assembler is perfectly capable of doing the token pasting correctly for itself so we can just get rid of the preprocessor macros. Signed-off-by: Michael Davidson Signed-off-by: Herbert Xu Signed-off-by: Nathan Chancellor Signed-off-by: Greg Kroah-Hartman --- arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S +++ b/arch/x86/crypto/aes_ctrby8_avx-x86_64.S @@ -65,7 +65,6 @@ #include #include -#define CONCAT(a,b) a##b #define VMOVDQ vmovdqu #define xdata0 %xmm0 @@ -92,8 +91,6 @@ #define num_bytes %r8 #define tmp %r10 -#define DDQ(i) CONCAT(ddq_add_,i) -#define XMM(i) CONCAT(%xmm, i) #define DDQ_DATA 0 #define XDATA 1 #define KEY_128 1 @@ -131,12 +128,12 @@ ddq_add_8: /* generate a unique variable for ddq_add_x */ .macro setddq n - var_ddq_add = DDQ(\n) + var_ddq_add = ddq_add_\n .endm /* generate a unique variable for xmm register */ .macro setxdata n - var_xdata = XMM(\n) + var_xdata = %xmm\n .endm /* club the numeric 'id' to the symbol 'name' */