All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
@ 2017-03-22 11:10 ` Dmitry Vyukov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Vyukov @ 2017-03-22 11:10 UTC (permalink / raw)
  To: arnd, akpm
  Cc: Dmitry Vyukov, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, linux-mm, linux-kernel

Arnd reported that the new code leads to compilation failures
with some versions of gcc. I've filed gcc issue 72873,
but we need a kernel fix as well.

Remove instrumentation from cmpxchg_double() for now.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
 include/asm-generic/atomic-instrumented.h | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/include/asm-generic/atomic-instrumented.h b/include/asm-generic/atomic-instrumented.h
index 951bcd083925..de6c2a562a6e 100644
--- a/include/asm-generic/atomic-instrumented.h
+++ b/include/asm-generic/atomic-instrumented.h
@@ -229,18 +229,23 @@ INSTR_RET_BOOL2(add_negative);
 	arch_cmpxchg64_local(____ptr, (old), (new));	\
 })
 
+/*
+ * Originally we had the following code here:
+ *	__typeof__(p1) ____p1 = (p1);
+ *	kasan_check_write(____p1, 2 * sizeof(*____p1));
+ *	arch_cmpxchg_double(____p1, (p2), (o1), (o2), (n1), (n2));
+ * But it leads to compilation failures (see gcc issue 72873).
+ * So for now it's left non-instrumented.
+ * There are few callers of cmpxchg_double(), so it's not critical.
+ */
 #define cmpxchg_double(p1, p2, o1, o2, n1, n2)				\
 ({									\
-	__typeof__(p1) ____p1 = (p1);					\
-	kasan_check_write(____p1, 2 * sizeof(*____p1));			\
-	arch_cmpxchg_double(____p1, (p2), (o1), (o2), (n1), (n2));	\
+	arch_cmpxchg_double((p1), (p2), (o1), (o2), (n1), (n2));	\
 })
 
 #define cmpxchg_double_local(p1, p2, o1, o2, n1, n2)			\
 ({									\
-	__typeof__(p1) ____p1 = (p1);					\
-	kasan_check_write(____p1, 2 * sizeof(*____p1));			\
-	arch_cmpxchg_double_local(____p1, (p2), (o1), (o2), (n1), (n2));\
+	arch_cmpxchg_double_local((p1), (p2), (o1), (o2), (n1), (n2));	\
 })
 
 #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */
-- 
2.12.1.500.gab5fba24ee-goog

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
@ 2017-03-22 11:10 ` Dmitry Vyukov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Vyukov @ 2017-03-22 11:10 UTC (permalink / raw)
  To: arnd, akpm
  Cc: Dmitry Vyukov, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, linux-mm, linux-kernel

Arnd reported that the new code leads to compilation failures
with some versions of gcc. I've filed gcc issue 72873,
but we need a kernel fix as well.

Remove instrumentation from cmpxchg_double() for now.

Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
---
 include/asm-generic/atomic-instrumented.h | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/include/asm-generic/atomic-instrumented.h b/include/asm-generic/atomic-instrumented.h
index 951bcd083925..de6c2a562a6e 100644
--- a/include/asm-generic/atomic-instrumented.h
+++ b/include/asm-generic/atomic-instrumented.h
@@ -229,18 +229,23 @@ INSTR_RET_BOOL2(add_negative);
 	arch_cmpxchg64_local(____ptr, (old), (new));	\
 })
 
+/*
+ * Originally we had the following code here:
+ *	__typeof__(p1) ____p1 = (p1);
+ *	kasan_check_write(____p1, 2 * sizeof(*____p1));
+ *	arch_cmpxchg_double(____p1, (p2), (o1), (o2), (n1), (n2));
+ * But it leads to compilation failures (see gcc issue 72873).
+ * So for now it's left non-instrumented.
+ * There are few callers of cmpxchg_double(), so it's not critical.
+ */
 #define cmpxchg_double(p1, p2, o1, o2, n1, n2)				\
 ({									\
-	__typeof__(p1) ____p1 = (p1);					\
-	kasan_check_write(____p1, 2 * sizeof(*____p1));			\
-	arch_cmpxchg_double(____p1, (p2), (o1), (o2), (n1), (n2));	\
+	arch_cmpxchg_double((p1), (p2), (o1), (o2), (n1), (n2));	\
 })
 
 #define cmpxchg_double_local(p1, p2, o1, o2, n1, n2)			\
 ({									\
-	__typeof__(p1) ____p1 = (p1);					\
-	kasan_check_write(____p1, 2 * sizeof(*____p1));			\
-	arch_cmpxchg_double_local(____p1, (p2), (o1), (o2), (n1), (n2));\
+	arch_cmpxchg_double_local((p1), (p2), (o1), (o2), (n1), (n2));	\
 })
 
 #endif /* _LINUX_ATOMIC_INSTRUMENTED_H */
-- 
2.12.1.500.gab5fba24ee-goog

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
  2017-03-22 11:10 ` Dmitry Vyukov
@ 2017-03-22 11:27   ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-03-22 11:27 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
> Arnd reported that the new code leads to compilation failures
> with some versions of gcc. I've filed gcc issue 72873,
> but we need a kernel fix as well.
>
> Remove instrumentation from cmpxchg_double() for now.

Thanks, I also checked that fixes the build error for me.

       Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
@ 2017-03-22 11:27   ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-03-22 11:27 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
> Arnd reported that the new code leads to compilation failures
> with some versions of gcc. I've filed gcc issue 72873,
> but we need a kernel fix as well.
>
> Remove instrumentation from cmpxchg_double() for now.

Thanks, I also checked that fixes the build error for me.

       Arnd

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
  2017-03-22 11:27   ` Arnd Bergmann
@ 2017-03-22 21:27     ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-03-22 21:27 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Wed, Mar 22, 2017 at 12:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>> Arnd reported that the new code leads to compilation failures
>> with some versions of gcc. I've filed gcc issue 72873,
>> but we need a kernel fix as well.
>>
>> Remove instrumentation from cmpxchg_double() for now.
>
> Thanks, I also checked that fixes the build error for me.

I got a new variant of the bug in
arch/x86/include/asm/cmpxchg_32.h:set_64bit() now.

In file included from /git/arm-soc/arch/x86/include/asm/cmpxchg.h:142:0,
                 from /git/arm-soc/arch/x86/include/asm/atomic.h:7,
                 from /git/arm-soc/arch/x86/include/asm/msr.h:66,
                 from /git/arm-soc/arch/x86/include/asm/processor.h:20,
                 from /git/arm-soc/arch/x86/include/asm/cpufeature.h:4,
                 from /git/arm-soc/arch/x86/include/asm/thread_info.h:52,
                 from /git/arm-soc/include/linux/thread_info.h:25,
                 from /git/arm-soc/arch/x86/include/asm/preempt.h:6,
                 from /git/arm-soc/include/linux/preempt.h:80,
                 from /git/arm-soc/include/linux/spinlock.h:50,
                 from /git/arm-soc/include/linux/mmzone.h:7,
                 from /git/arm-soc/include/linux/gfp.h:5,
                 from /git/arm-soc/include/linux/mm.h:9,
                 from /git/arm-soc/mm/khugepaged.c:3:
/git/arm-soc/mm/khugepaged.c: In function 'khugepaged':
/git/arm-soc/arch/x86/include/asm/cmpxchg_32.h:29:2: error: 'asm'
operand has impossible constraints
  asm volatile("\n1:\t"

Defconfig is at http://pastebin.com/raw/Pthhv5iU

       Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
@ 2017-03-22 21:27     ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-03-22 21:27 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Wed, Mar 22, 2017 at 12:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>> Arnd reported that the new code leads to compilation failures
>> with some versions of gcc. I've filed gcc issue 72873,
>> but we need a kernel fix as well.
>>
>> Remove instrumentation from cmpxchg_double() for now.
>
> Thanks, I also checked that fixes the build error for me.

I got a new variant of the bug in
arch/x86/include/asm/cmpxchg_32.h:set_64bit() now.

In file included from /git/arm-soc/arch/x86/include/asm/cmpxchg.h:142:0,
                 from /git/arm-soc/arch/x86/include/asm/atomic.h:7,
                 from /git/arm-soc/arch/x86/include/asm/msr.h:66,
                 from /git/arm-soc/arch/x86/include/asm/processor.h:20,
                 from /git/arm-soc/arch/x86/include/asm/cpufeature.h:4,
                 from /git/arm-soc/arch/x86/include/asm/thread_info.h:52,
                 from /git/arm-soc/include/linux/thread_info.h:25,
                 from /git/arm-soc/arch/x86/include/asm/preempt.h:6,
                 from /git/arm-soc/include/linux/preempt.h:80,
                 from /git/arm-soc/include/linux/spinlock.h:50,
                 from /git/arm-soc/include/linux/mmzone.h:7,
                 from /git/arm-soc/include/linux/gfp.h:5,
                 from /git/arm-soc/include/linux/mm.h:9,
                 from /git/arm-soc/mm/khugepaged.c:3:
/git/arm-soc/mm/khugepaged.c: In function 'khugepaged':
/git/arm-soc/arch/x86/include/asm/cmpxchg_32.h:29:2: error: 'asm'
operand has impossible constraints
  asm volatile("\n1:\t"

Defconfig is at http://pastebin.com/raw/Pthhv5iU

       Arnd

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
  2017-03-22 21:27     ` Arnd Bergmann
@ 2017-03-23  8:49       ` Dmitry Vyukov
  -1 siblings, 0 replies; 10+ messages in thread
From: Dmitry Vyukov @ 2017-03-23  8:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Wed, Mar 22, 2017 at 10:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Mar 22, 2017 at 12:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>>> Arnd reported that the new code leads to compilation failures
>>> with some versions of gcc. I've filed gcc issue 72873,
>>> but we need a kernel fix as well.
>>>
>>> Remove instrumentation from cmpxchg_double() for now.
>>
>> Thanks, I also checked that fixes the build error for me.
>
> I got a new variant of the bug in
> arch/x86/include/asm/cmpxchg_32.h:set_64bit() now.
>
> In file included from /git/arm-soc/arch/x86/include/asm/cmpxchg.h:142:0,
>                  from /git/arm-soc/arch/x86/include/asm/atomic.h:7,
>                  from /git/arm-soc/arch/x86/include/asm/msr.h:66,
>                  from /git/arm-soc/arch/x86/include/asm/processor.h:20,
>                  from /git/arm-soc/arch/x86/include/asm/cpufeature.h:4,
>                  from /git/arm-soc/arch/x86/include/asm/thread_info.h:52,
>                  from /git/arm-soc/include/linux/thread_info.h:25,
>                  from /git/arm-soc/arch/x86/include/asm/preempt.h:6,
>                  from /git/arm-soc/include/linux/preempt.h:80,
>                  from /git/arm-soc/include/linux/spinlock.h:50,
>                  from /git/arm-soc/include/linux/mmzone.h:7,
>                  from /git/arm-soc/include/linux/gfp.h:5,
>                  from /git/arm-soc/include/linux/mm.h:9,
>                  from /git/arm-soc/mm/khugepaged.c:3:
> /git/arm-soc/mm/khugepaged.c: In function 'khugepaged':
> /git/arm-soc/arch/x86/include/asm/cmpxchg_32.h:29:2: error: 'asm'
> operand has impossible constraints
>   asm volatile("\n1:\t"
>
> Defconfig is at http://pastebin.com/raw/Pthhv5iU


I can't reproduce it with gcc 4.8.4, 7.0.0, 7.0.1.

Are you sure it's related to my recent change? I did not touch set_64bit.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
@ 2017-03-23  8:49       ` Dmitry Vyukov
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Vyukov @ 2017-03-23  8:49 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Wed, Mar 22, 2017 at 10:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wed, Mar 22, 2017 at 12:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>>> Arnd reported that the new code leads to compilation failures
>>> with some versions of gcc. I've filed gcc issue 72873,
>>> but we need a kernel fix as well.
>>>
>>> Remove instrumentation from cmpxchg_double() for now.
>>
>> Thanks, I also checked that fixes the build error for me.
>
> I got a new variant of the bug in
> arch/x86/include/asm/cmpxchg_32.h:set_64bit() now.
>
> In file included from /git/arm-soc/arch/x86/include/asm/cmpxchg.h:142:0,
>                  from /git/arm-soc/arch/x86/include/asm/atomic.h:7,
>                  from /git/arm-soc/arch/x86/include/asm/msr.h:66,
>                  from /git/arm-soc/arch/x86/include/asm/processor.h:20,
>                  from /git/arm-soc/arch/x86/include/asm/cpufeature.h:4,
>                  from /git/arm-soc/arch/x86/include/asm/thread_info.h:52,
>                  from /git/arm-soc/include/linux/thread_info.h:25,
>                  from /git/arm-soc/arch/x86/include/asm/preempt.h:6,
>                  from /git/arm-soc/include/linux/preempt.h:80,
>                  from /git/arm-soc/include/linux/spinlock.h:50,
>                  from /git/arm-soc/include/linux/mmzone.h:7,
>                  from /git/arm-soc/include/linux/gfp.h:5,
>                  from /git/arm-soc/include/linux/mm.h:9,
>                  from /git/arm-soc/mm/khugepaged.c:3:
> /git/arm-soc/mm/khugepaged.c: In function 'khugepaged':
> /git/arm-soc/arch/x86/include/asm/cmpxchg_32.h:29:2: error: 'asm'
> operand has impossible constraints
>   asm volatile("\n1:\t"
>
> Defconfig is at http://pastebin.com/raw/Pthhv5iU


I can't reproduce it with gcc 4.8.4, 7.0.0, 7.0.1.

Are you sure it's related to my recent change? I did not touch set_64bit.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
  2017-03-23  8:49       ` Dmitry Vyukov
@ 2017-03-23 13:31         ` Arnd Bergmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-03-23 13:31 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Thu, Mar 23, 2017 at 9:49 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
> On Wed, Mar 22, 2017 at 10:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wed, Mar 22, 2017 at 12:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>>>> Arnd reported that the new code leads to compilation failures
>>>> with some versions of gcc. I've filed gcc issue 72873,
>>>> but we need a kernel fix as well.
>>>>
>>>> Remove instrumentation from cmpxchg_double() for now.
>>>
>>> Thanks, I also checked that fixes the build error for me.
>>
>> I got a new variant of the bug in
>> arch/x86/include/asm/cmpxchg_32.h:set_64bit() now.
>>
>> In file included from /git/arm-soc/arch/x86/include/asm/cmpxchg.h:142:0,
>>                  from /git/arm-soc/arch/x86/include/asm/atomic.h:7,
>>                  from /git/arm-soc/arch/x86/include/asm/msr.h:66,
>>                  from /git/arm-soc/arch/x86/include/asm/processor.h:20,
>>                  from /git/arm-soc/arch/x86/include/asm/cpufeature.h:4,
>>                  from /git/arm-soc/arch/x86/include/asm/thread_info.h:52,
>>                  from /git/arm-soc/include/linux/thread_info.h:25,
>>                  from /git/arm-soc/arch/x86/include/asm/preempt.h:6,
>>                  from /git/arm-soc/include/linux/preempt.h:80,
>>                  from /git/arm-soc/include/linux/spinlock.h:50,
>>                  from /git/arm-soc/include/linux/mmzone.h:7,
>>                  from /git/arm-soc/include/linux/gfp.h:5,
>>                  from /git/arm-soc/include/linux/mm.h:9,
>>                  from /git/arm-soc/mm/khugepaged.c:3:
>> /git/arm-soc/mm/khugepaged.c: In function 'khugepaged':
>> /git/arm-soc/arch/x86/include/asm/cmpxchg_32.h:29:2: error: 'asm'
>> operand has impossible constraints
>>   asm volatile("\n1:\t"
>>
>> Defconfig is at http://pastebin.com/raw/Pthhv5iU
>
>
> I can't reproduce it with gcc 4.8.4, 7.0.0, 7.0.1.
>
> Are you sure it's related to my recent change? I did not touch set_64bit.

You are right, this is different, it just appeared on the same day with
almost exactly the same symptom as the other one, so I mistakenly
assumed it was the same root cause.

Reverting your patches doesn't fix it, and I only see it with the
latest gcc-7.0.1 snapshot, not with one from a few weeks ago.
I'll open a gcc bug for it.

       Arnd

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] asm-generic: fix compilation failure in cmpxchg_double()
@ 2017-03-23 13:31         ` Arnd Bergmann
  0 siblings, 0 replies; 10+ messages in thread
From: Arnd Bergmann @ 2017-03-23 13:31 UTC (permalink / raw)
  To: Dmitry Vyukov
  Cc: Andrew Morton, Mark Rutland, Andrey Ryabinin, Peter Zijlstra,
	Will Deacon, Linux-MM, Linux Kernel Mailing List

On Thu, Mar 23, 2017 at 9:49 AM, Dmitry Vyukov <dvyukov@google.com> wrote:
> On Wed, Mar 22, 2017 at 10:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Wed, Mar 22, 2017 at 12:27 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>>> On Wed, Mar 22, 2017 at 12:10 PM, Dmitry Vyukov <dvyukov@google.com> wrote:
>>>> Arnd reported that the new code leads to compilation failures
>>>> with some versions of gcc. I've filed gcc issue 72873,
>>>> but we need a kernel fix as well.
>>>>
>>>> Remove instrumentation from cmpxchg_double() for now.
>>>
>>> Thanks, I also checked that fixes the build error for me.
>>
>> I got a new variant of the bug in
>> arch/x86/include/asm/cmpxchg_32.h:set_64bit() now.
>>
>> In file included from /git/arm-soc/arch/x86/include/asm/cmpxchg.h:142:0,
>>                  from /git/arm-soc/arch/x86/include/asm/atomic.h:7,
>>                  from /git/arm-soc/arch/x86/include/asm/msr.h:66,
>>                  from /git/arm-soc/arch/x86/include/asm/processor.h:20,
>>                  from /git/arm-soc/arch/x86/include/asm/cpufeature.h:4,
>>                  from /git/arm-soc/arch/x86/include/asm/thread_info.h:52,
>>                  from /git/arm-soc/include/linux/thread_info.h:25,
>>                  from /git/arm-soc/arch/x86/include/asm/preempt.h:6,
>>                  from /git/arm-soc/include/linux/preempt.h:80,
>>                  from /git/arm-soc/include/linux/spinlock.h:50,
>>                  from /git/arm-soc/include/linux/mmzone.h:7,
>>                  from /git/arm-soc/include/linux/gfp.h:5,
>>                  from /git/arm-soc/include/linux/mm.h:9,
>>                  from /git/arm-soc/mm/khugepaged.c:3:
>> /git/arm-soc/mm/khugepaged.c: In function 'khugepaged':
>> /git/arm-soc/arch/x86/include/asm/cmpxchg_32.h:29:2: error: 'asm'
>> operand has impossible constraints
>>   asm volatile("\n1:\t"
>>
>> Defconfig is at http://pastebin.com/raw/Pthhv5iU
>
>
> I can't reproduce it with gcc 4.8.4, 7.0.0, 7.0.1.
>
> Are you sure it's related to my recent change? I did not touch set_64bit.

You are right, this is different, it just appeared on the same day with
almost exactly the same symptom as the other one, so I mistakenly
assumed it was the same root cause.

Reverting your patches doesn't fix it, and I only see it with the
latest gcc-7.0.1 snapshot, not with one from a few weeks ago.
I'll open a gcc bug for it.

       Arnd

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-03-23 13:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22 11:10 [PATCH] asm-generic: fix compilation failure in cmpxchg_double() Dmitry Vyukov
2017-03-22 11:10 ` Dmitry Vyukov
2017-03-22 11:27 ` Arnd Bergmann
2017-03-22 11:27   ` Arnd Bergmann
2017-03-22 21:27   ` Arnd Bergmann
2017-03-22 21:27     ` Arnd Bergmann
2017-03-23  8:49     ` Dmitry Vyukov
2017-03-23  8:49       ` Dmitry Vyukov
2017-03-23 13:31       ` Arnd Bergmann
2017-03-23 13:31         ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.