From: Vinicius Tinti <viniciustinti@gmail.com>
To: herbert@gondor.apana.org.au, davem@davemloft.net,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
Vinicius Tinti <viniciustinti@gmail.com>
Subject: [PATCH] x86: Avoid undefined behavior in macro expansion
Date: Wed, 16 Mar 2016 23:48:49 -0300 [thread overview]
Message-ID: <1458182929-23866-1-git-send-email-viniciustinti@gmail.com> (raw)
C11 standard (at 6.10.3.3) says that ## operator (paste) has undefined
behavior when one of the result operands is not a valid preprocessing
token.
Therefore the macro expansion may depend on compiler implementation
which may or no preserve the leading white space.
Moreover other places in kernel use CONCAT(a,b) instead of CONCAT(a, b).
Changing favors concise usage.
Signed-off-by: Vinicius Tinti <viniciustinti@gmail.com>
Acked-by: Behan Webster <behanw@converseincode.com>
---
arch/x86/crypto/aes_ctrby8_avx-x86_64.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S b/arch/x86/crypto/aes_ctrby8_avx-x86_64.S
index a916c4a..7a71553 100644
--- a/arch/x86/crypto/aes_ctrby8_avx-x86_64.S
+++ b/arch/x86/crypto/aes_ctrby8_avx-x86_64.S
@@ -93,7 +93,7 @@
#define tmp %r10
#define DDQ(i) CONCAT(ddq_add_,i)
-#define XMM(i) CONCAT(%xmm, i)
+#define XMM(i) CONCAT(%xmm,i)
#define DDQ_DATA 0
#define XDATA 1
#define KEY_128 1
--
2.7.3
next reply other threads:[~2016-03-17 2:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-17 2:48 Vinicius Tinti [this message]
2016-03-19 2:15 ` Al Viro
2016-03-22 2:18 ` Vinicius Tinti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1458182929-23866-1-git-send-email-viniciustinti@gmail.com \
--to=viniciustinti@gmail.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hpa@zytor.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®