All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm
@ 2017-09-06  5:26 Miguel Bernal Marin
  2017-09-06  5:26 ` [PATCH 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06  5:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: linux-kernel, x86

Some warning were showed by objtool using gcc 7.2.0

kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup

which means gcc placed an inline asm function and its call instruction before
the frame pointer setup.
 
This series forces a stack frame to be created before the call instruction
by listing the stack pointer as an output operand in the inline asm statement.

Miguel Bernal Marin (3):
  locking/rwsem/x86: Add stack frame dependency for __up_read()
  locking/rwsem/x86: Add stack frame dependency for __up_write()
  locking/rwsem/x86: Add stack frame dependency for __downgrade_write()

 arch/x86/include/asm/rwsem.h | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

-- 
2.14.1

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

* [PATCH 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read()
  2017-09-06  5:26 [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
@ 2017-09-06  5:26 ` Miguel Bernal Marin
  2017-09-06  5:26 ` [PATCH 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06  5:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __up_read() inline asm (and its
call instruction) before the frame pointer setup in up_read(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index a34e0d4b957d..762167afaec0 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -166,14 +166,16 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem)
 static inline void __up_read(struct rw_semaphore *sem)
 {
 	long tmp;
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __up_read\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
+		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
 		     /* subtracts 1, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n"
 		     "# ending __up_read\n"
-		     : "+m" (sem->count), "=d" (tmp)
+		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
 		     : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write()
  2017-09-06  5:26 [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
  2017-09-06  5:26 ` [PATCH 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
@ 2017-09-06  5:26 ` Miguel Bernal Marin
  2017-09-06  5:26 ` [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06  5:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __up_write() inline asm (and its
call instruction) before the frame pointer setup in up_write(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 762167afaec0..d26b6916b935 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -186,14 +186,16 @@ static inline void __up_read(struct rw_semaphore *sem)
 static inline void __up_write(struct rw_semaphore *sem)
 {
 	long tmp;
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __up_write\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
+		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
 		     /* subtracts 0xffff0001, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n\t"
 		     "# ending __up_write\n"
-		     : "+m" (sem->count), "=d" (tmp)
+		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
 		     : "a" (sem), "1" (-RWSEM_ACTIVE_WRITE_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  2017-09-06  5:26 [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
  2017-09-06  5:26 ` [PATCH 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
  2017-09-06  5:26 ` [PATCH 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
@ 2017-09-06  5:26 ` Miguel Bernal Marin
  2017-09-06 21:33   ` Josh Poimboeuf
  2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
  4 siblings, 1 reply; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06  5:26 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __downgrade_write() inline asm (and
its call instruction) before the frame pointer setup in downgrade_write(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index d26b6916b935..a749dc6a3103 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -205,8 +205,10 @@ static inline void __up_write(struct rw_semaphore *sem)
  */
 static inline void __downgrade_write(struct rw_semaphore *sem)
 {
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __downgrade_write\n\t"
-		     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
+		     LOCK_PREFIX _ASM_ADD "%2,(%2)\n\t"
 		     /*
 		      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
 		      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
@@ -215,7 +217,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
 		     "  call call_rwsem_downgrade_wake\n"
 		     "1:\n\t"
 		     "# ending __downgrade_write\n"
-		     : "+m" (sem->count)
+		     : "+m" (sem->count), "+r" (__sp)
 		     : "a" (sem), "er" (-RWSEM_WAITING_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* Re: [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  2017-09-06  5:26 ` [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
@ 2017-09-06 21:33   ` Josh Poimboeuf
  2017-09-06 22:14     ` Miguel Bernal Marin
  2017-09-07  7:04     ` Peter Zijlstra
  0 siblings, 2 replies; 27+ messages in thread
From: Josh Poimboeuf @ 2017-09-06 21:33 UTC (permalink / raw)
  To: Miguel Bernal Marin
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Wed, Sep 06, 2017 at 12:26:13AM -0500, Miguel Bernal Marin wrote:
> kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> 
> The warning means gcc 7.2.0 placed the __downgrade_write() inline asm (and
> its call instruction) before the frame pointer setup in downgrade_write(),
> which breaks frame pointer convention and can result in incorrect
> stack traces.
> 
> Force a stack frame to be created before the call instruction by listing
> the stack pointer as an output operand in the inline asm statement.
> 
> Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
> ---
>  arch/x86/include/asm/rwsem.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
> index d26b6916b935..a749dc6a3103 100644
> --- a/arch/x86/include/asm/rwsem.h
> +++ b/arch/x86/include/asm/rwsem.h
> @@ -205,8 +205,10 @@ static inline void __up_write(struct rw_semaphore *sem)
>   */
>  static inline void __downgrade_write(struct rw_semaphore *sem)
>  {
> +	register void *__sp asm(_ASM_SP);
> +
>  	asm volatile("# beginning __downgrade_write\n\t"
> -		     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
> +		     LOCK_PREFIX _ASM_ADD "%2,(%2)\n\t"

The '%2' should be changed to '%3'

		     LOCK_PREFIX _ASM_ADD "%3,(%2)\n\t"

because both inputs' indices are shifted by the new output constraint.

>  		     /*
>  		      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
>  		      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
> @@ -215,7 +217,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
>  		     "  call call_rwsem_downgrade_wake\n"
>  		     "1:\n\t"
>  		     "# ending __downgrade_write\n"
> -		     : "+m" (sem->count)
> +		     : "+m" (sem->count), "+r" (__sp)
>  		     : "a" (sem), "er" (-RWSEM_WAITING_BIAS)
>  		     : "memory", "cc");

-- 
Josh

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

* Re: [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  2017-09-06 21:33   ` Josh Poimboeuf
@ 2017-09-06 22:14     ` Miguel Bernal Marin
  2017-09-07  7:04     ` Peter Zijlstra
  1 sibling, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06 22:14 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H. Peter Anvin,
	linux-kernel, x86

On Wed, Sep 06, 2017 at 04:33:02PM -0500, Josh Poimboeuf wrote:
> On Wed, Sep 06, 2017 at 12:26:13AM -0500, Miguel Bernal Marin wrote:
> > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > 
> > The warning means gcc 7.2.0 placed the __downgrade_write() inline asm (and
> > its call instruction) before the frame pointer setup in downgrade_write(),
> > which breaks frame pointer convention and can result in incorrect
> > stack traces.
> > 
> > Force a stack frame to be created before the call instruction by listing
> > the stack pointer as an output operand in the inline asm statement.
> > 
> > Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
> > ---
> >  arch/x86/include/asm/rwsem.h | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
> > index d26b6916b935..a749dc6a3103 100644
> > --- a/arch/x86/include/asm/rwsem.h
> > +++ b/arch/x86/include/asm/rwsem.h
> > @@ -205,8 +205,10 @@ static inline void __up_write(struct rw_semaphore *sem)
> >   */
> >  static inline void __downgrade_write(struct rw_semaphore *sem)
> >  {
> > +	register void *__sp asm(_ASM_SP);
> > +
> >  	asm volatile("# beginning __downgrade_write\n\t"
> > -		     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
> > +		     LOCK_PREFIX _ASM_ADD "%2,(%2)\n\t"
> 
> The '%2' should be changed to '%3'
> 
> 		     LOCK_PREFIX _ASM_ADD "%3,(%2)\n\t"
> 
> because both inputs' indices are shifted by the new output constraint.
> 


Thanks, I will send the V2.


> >  		     /*
> >  		      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
> >  		      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
> > @@ -215,7 +217,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
> >  		     "  call call_rwsem_downgrade_wake\n"
> >  		     "1:\n\t"
> >  		     "# ending __downgrade_write\n"
> > -		     : "+m" (sem->count)
> > +		     : "+m" (sem->count), "+r" (__sp)
> >  		     : "a" (sem), "er" (-RWSEM_WAITING_BIAS)
> >  		     : "memory", "cc");
> 
> -- 
> Josh

-- 
Regards,

Miguel Bernal Marin                     Open Source Technology Center
https://clearlinux.org                              Intel Corporation

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

* [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-06  5:26 [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
                   ` (2 preceding siblings ...)
  2017-09-06  5:26 ` [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
@ 2017-09-06 22:44 ` Miguel Bernal Marin
  2017-09-06 22:44   ` [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
                     ` (3 more replies)
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
  4 siblings, 4 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06 22:44 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

Some warning were showed by objtool using gcc 7.2.0

kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup

which means gcc placed an inline asm function and its call instruction before
the frame pointer setup.
 
This series forces a stack frame to be created before the call instruction
by listing the stack pointer as an output operand in the inline asm statement.

Changes in v2:
  - Update first parameter from _ASM_ADD to '%3' at __downgrade_write()

Miguel Bernal Marin (3):
  locking/rwsem/x86: Add stack frame dependency for __up_read()
  locking/rwsem/x86: Add stack frame dependency for __up_write()
  locking/rwsem/x86: Add stack frame dependency for __downgrade_write()

 arch/x86/include/asm/rwsem.h | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

-- 
2.14.1

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

* [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read()
  2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
@ 2017-09-06 22:44   ` Miguel Bernal Marin
  2017-09-07  7:12     ` Ingo Molnar
  2017-09-06 22:45   ` [PATCH v2 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06 22:44 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __up_read() inline asm (and its
call instruction) before the frame pointer setup in up_read(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index a34e0d4b957d..762167afaec0 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -166,14 +166,16 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem)
 static inline void __up_read(struct rw_semaphore *sem)
 {
 	long tmp;
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __up_read\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
+		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
 		     /* subtracts 1, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n"
 		     "# ending __up_read\n"
-		     : "+m" (sem->count), "=d" (tmp)
+		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
 		     : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH v2 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write()
  2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
  2017-09-06 22:44   ` [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
@ 2017-09-06 22:45   ` Miguel Bernal Marin
  2017-09-06 22:45   ` [PATCH v2 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
  2017-09-06 23:05   ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
  3 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06 22:45 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __up_write() inline asm (and its
call instruction) before the frame pointer setup in up_write(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 762167afaec0..d26b6916b935 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -186,14 +186,16 @@ static inline void __up_read(struct rw_semaphore *sem)
 static inline void __up_write(struct rw_semaphore *sem)
 {
 	long tmp;
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __up_write\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
+		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
 		     /* subtracts 0xffff0001, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n\t"
 		     "# ending __up_write\n"
-		     : "+m" (sem->count), "=d" (tmp)
+		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
 		     : "a" (sem), "1" (-RWSEM_ACTIVE_WRITE_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH v2 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
  2017-09-06 22:44   ` [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
  2017-09-06 22:45   ` [PATCH v2 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
@ 2017-09-06 22:45   ` Miguel Bernal Marin
  2017-09-06 23:05   ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
  3 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-06 22:45 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __downgrade_write() inline asm (and
its call instruction) before the frame pointer setup in downgrade_write(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index d26b6916b935..a749dc6a3103 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -205,8 +205,10 @@ static inline void __up_write(struct rw_semaphore *sem)
  */
 static inline void __downgrade_write(struct rw_semaphore *sem)
 {
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __downgrade_write\n\t"
-		     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
+		     LOCK_PREFIX _ASM_ADD "%3,(%2)\n\t"
 		     /*
 		      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
 		      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
@@ -215,7 +217,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
 		     "  call call_rwsem_downgrade_wake\n"
 		     "1:\n\t"
 		     "# ending __downgrade_write\n"
-		     : "+m" (sem->count)
+		     : "+m" (sem->count), "+r" (__sp)
 		     : "a" (sem), "er" (-RWSEM_WAITING_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* Re: [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
                     ` (2 preceding siblings ...)
  2017-09-06 22:45   ` [PATCH v2 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
@ 2017-09-06 23:05   ` Josh Poimboeuf
  3 siblings, 0 replies; 27+ messages in thread
From: Josh Poimboeuf @ 2017-09-06 23:05 UTC (permalink / raw)
  To: Miguel Bernal Marin
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Wed, Sep 06, 2017 at 05:44:58PM -0500, Miguel Bernal Marin wrote:
> Some warning were showed by objtool using gcc 7.2.0
> 
> kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> 
> which means gcc placed an inline asm function and its call instruction before
> the frame pointer setup.
>  
> This series forces a stack frame to be created before the call instruction
> by listing the stack pointer as an output operand in the inline asm statement.
> 
> Changes in v2:
>   - Update first parameter from _ASM_ADD to '%3' at __downgrade_write()
> 
> Miguel Bernal Marin (3):
>   locking/rwsem/x86: Add stack frame dependency for __up_read()
>   locking/rwsem/x86: Add stack frame dependency for __up_write()
>   locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
> 
>  arch/x86/include/asm/rwsem.h | 18 ++++++++++++------
>  1 file changed, 12 insertions(+), 6 deletions(-)

For the series:

Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>

-- 
Josh

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

* Re: [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  2017-09-06 21:33   ` Josh Poimboeuf
  2017-09-06 22:14     ` Miguel Bernal Marin
@ 2017-09-07  7:04     ` Peter Zijlstra
  1 sibling, 0 replies; 27+ messages in thread
From: Peter Zijlstra @ 2017-09-07  7:04 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Miguel Bernal Marin, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin, linux-kernel, x86

On Wed, Sep 06, 2017 at 04:33:02PM -0500, Josh Poimboeuf wrote:
> On Wed, Sep 06, 2017 at 12:26:13AM -0500, Miguel Bernal Marin wrote:
> > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > 
> > The warning means gcc 7.2.0 placed the __downgrade_write() inline asm (and
> > its call instruction) before the frame pointer setup in downgrade_write(),
> > which breaks frame pointer convention and can result in incorrect
> > stack traces.
> > 
> > Force a stack frame to be created before the call instruction by listing
> > the stack pointer as an output operand in the inline asm statement.
> > 
> > Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
> > ---
> >  arch/x86/include/asm/rwsem.h | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
> > index d26b6916b935..a749dc6a3103 100644
> > --- a/arch/x86/include/asm/rwsem.h
> > +++ b/arch/x86/include/asm/rwsem.h
> > @@ -205,8 +205,10 @@ static inline void __up_write(struct rw_semaphore *sem)
> >   */
> >  static inline void __downgrade_write(struct rw_semaphore *sem)
> >  {
> > +	register void *__sp asm(_ASM_SP);
> > +
> >  	asm volatile("# beginning __downgrade_write\n\t"
> > -		     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
> > +		     LOCK_PREFIX _ASM_ADD "%2,(%2)\n\t"
> 
> The '%2' should be changed to '%3'
> 
> 		     LOCK_PREFIX _ASM_ADD "%3,(%2)\n\t"
> 
> because both inputs' indices are shifted by the new output constraint.

Even better would be to used named operands.

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

* Re: [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read()
  2017-09-06 22:44   ` [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
@ 2017-09-07  7:12     ` Ingo Molnar
  2017-09-14 21:42       ` Miguel Bernal Marin
  0 siblings, 1 reply; 27+ messages in thread
From: Ingo Molnar @ 2017-09-07  7:12 UTC (permalink / raw)
  To: Miguel Bernal Marin
  Cc: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin, linux-kernel, x86


* Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> wrote:

> kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> 
> The warning means gcc 7.2.0 placed the __up_read() inline asm (and its
> call instruction) before the frame pointer setup in up_read(),
> which breaks frame pointer convention and can result in incorrect
> stack traces.
> 
> Force a stack frame to be created before the call instruction by listing
> the stack pointer as an output operand in the inline asm statement.
> 
> Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
> ---
>  arch/x86/include/asm/rwsem.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
> index a34e0d4b957d..762167afaec0 100644
> --- a/arch/x86/include/asm/rwsem.h
> +++ b/arch/x86/include/asm/rwsem.h
> @@ -166,14 +166,16 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem)
>  static inline void __up_read(struct rw_semaphore *sem)
>  {
>  	long tmp;
> +	register void *__sp asm(_ASM_SP);
> +
>  	asm volatile("# beginning __up_read\n\t"
> -		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
> +		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
>  		     /* subtracts 1, returns the old value */
>  		     "  jns        1f\n\t"
>  		     "  call call_rwsem_wake\n" /* expects old value in %edx */
>  		     "1:\n"
>  		     "# ending __up_read\n"
> -		     : "+m" (sem->count), "=d" (tmp)
> +		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
>  		     : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
>  		     : "memory", "cc");

Please also convert it to named operands (in separate patches!) - this apparently 
BASIC inspired labeling syntax of GCC is utterly confusing, counterproductive and 
somewhat embarrasing as well, considering that we write 2017.

Thanks,

	Ingo

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

* Re: [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read()
  2017-09-07  7:12     ` Ingo Molnar
@ 2017-09-14 21:42       ` Miguel Bernal Marin
  0 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-14 21:42 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin, linux-kernel, x86

On Thu, Sep 07, 2017 at 09:12:42AM +0200, Ingo Molnar wrote:
> 
> * Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> wrote:
> 
> > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> > 
> > The warning means gcc 7.2.0 placed the __up_read() inline asm (and its
> > call instruction) before the frame pointer setup in up_read(),
> > which breaks frame pointer convention and can result in incorrect
> > stack traces.
> > 
> > Force a stack frame to be created before the call instruction by listing
> > the stack pointer as an output operand in the inline asm statement.
> > 
> > Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
> > ---
> >  arch/x86/include/asm/rwsem.h | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
> > index a34e0d4b957d..762167afaec0 100644
> > --- a/arch/x86/include/asm/rwsem.h
> > +++ b/arch/x86/include/asm/rwsem.h
> > @@ -166,14 +166,16 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem)
> >  static inline void __up_read(struct rw_semaphore *sem)
> >  {
> >  	long tmp;
> > +	register void *__sp asm(_ASM_SP);
> > +
> >  	asm volatile("# beginning __up_read\n\t"
> > -		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
> > +		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
> >  		     /* subtracts 1, returns the old value */
> >  		     "  jns        1f\n\t"
> >  		     "  call call_rwsem_wake\n" /* expects old value in %edx */
> >  		     "1:\n"
> >  		     "# ending __up_read\n"
> > -		     : "+m" (sem->count), "=d" (tmp)
> > +		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
> >  		     : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
> >  		     : "memory", "cc");
> 
> Please also convert it to named operands (in separate patches!) - this apparently 
> BASIC inspired labeling syntax of GCC is utterly confusing, counterproductive and 
> somewhat embarrasing as well, considering that we write 2017.

Sorry for delay response,
So I will add the named operands on the v3

> 
> Thanks,
> 
> 	Ingo

-- 
Regards,

Miguel Bernal Marin                     Open Source Technology Center
https://clearlinux.org                              Intel Corporation

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

* [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-06  5:26 [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
                   ` (3 preceding siblings ...)
  2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
@ 2017-09-19 23:37 ` Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 1/6] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
                     ` (6 more replies)
  4 siblings, 7 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

Some warning were showed by objtool using gcc 7.2.0

kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup

which means gcc placed an inline asm function and its call instruction before
the frame pointer setup.
 
This series forces a stack frame to be created before the call instruction
by listing the stack pointer as an output operand in the inline asm statement.

Also to be easy to maintain and understand the operands from the extended
assembler instructions were converted to named operands.

Changes in v3:
  - Convert to named operands

Changes in v2:
  - Update first parameter from _ASM_ADD to '%3' at __downgrade_write()


Miguel Bernal Marin (6):
  locking/rwsem/x86: Add stack frame dependency for __up_read()
  locking/rwsem/x86: Add stack frame dependency for __up_write()
  locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  x86, asm/rwsem: Use named operands in __up_read()
  x86, asm/rwsem: Use named operands in __up_write()
  x86, asm/rwsem: Use named operands in __downgrade_write()

 arch/x86/include/asm/rwsem.h | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

-- 
2.14.1

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

* [PATCH v3 1/6] locking/rwsem/x86: Add stack frame dependency for __up_read()
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
@ 2017-09-19 23:37   ` Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 2/6] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __up_read() inline asm (and its
call instruction) before the frame pointer setup in up_read(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index a34e0d4b957d..762167afaec0 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -166,14 +166,16 @@ static inline bool __down_write_trylock(struct rw_semaphore *sem)
 static inline void __up_read(struct rw_semaphore *sem)
 {
 	long tmp;
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __up_read\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
+		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
 		     /* subtracts 1, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n"
 		     "# ending __up_read\n"
-		     : "+m" (sem->count), "=d" (tmp)
+		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
 		     : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH v3 2/6] locking/rwsem/x86: Add stack frame dependency for __up_write()
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 1/6] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
@ 2017-09-19 23:37   ` Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 3/6] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __up_write() inline asm (and its
call instruction) before the frame pointer setup in up_write(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 762167afaec0..d26b6916b935 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -186,14 +186,16 @@ static inline void __up_read(struct rw_semaphore *sem)
 static inline void __up_write(struct rw_semaphore *sem)
 {
 	long tmp;
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __up_write\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%2)\n\t"
+		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
 		     /* subtracts 0xffff0001, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n\t"
 		     "# ending __up_write\n"
-		     : "+m" (sem->count), "=d" (tmp)
+		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
 		     : "a" (sem), "1" (-RWSEM_ACTIVE_WRITE_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH v3 3/6] locking/rwsem/x86: Add stack frame dependency for __downgrade_write()
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 1/6] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 2/6] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
@ 2017-09-19 23:37   ` Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 4/6] x86, asm/rwsem: Use named operands in __up_read() Miguel Bernal Marin
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup

The warning means gcc 7.2.0 placed the __downgrade_write() inline asm (and
its call instruction) before the frame pointer setup in downgrade_write(),
which breaks frame pointer convention and can result in incorrect
stack traces.

Force a stack frame to be created before the call instruction by listing
the stack pointer as an output operand in the inline asm statement.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index d26b6916b935..8400ad3e17dc 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -205,8 +205,10 @@ static inline void __up_write(struct rw_semaphore *sem)
  */
 static inline void __downgrade_write(struct rw_semaphore *sem)
 {
+	register void *__sp asm(_ASM_SP);
+
 	asm volatile("# beginning __downgrade_write\n\t"
-		     LOCK_PREFIX _ASM_ADD "%2,(%1)\n\t"
+		     LOCK_PREFIX _ASM_ADD "%3,(%2)\n\t"
 		     /*
 		      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
 		      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
@@ -215,7 +217,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
 		     "  call call_rwsem_downgrade_wake\n"
 		     "1:\n\t"
 		     "# ending __downgrade_write\n"
-		     : "+m" (sem->count)
+		     : "+m" (sem->count), "+r" (__sp)
 		     : "a" (sem), "er" (-RWSEM_WAITING_BIAS)
 		     : "memory", "cc");
 }
-- 
2.14.1

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

* [PATCH v3 4/6] x86, asm/rwsem: Use named operands in __up_read()
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
                     ` (2 preceding siblings ...)
  2017-09-19 23:37   ` [PATCH v3 3/6] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
@ 2017-09-19 23:37   ` Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 5/6] x86, asm/rwsem: Use named operands in __up_write() Miguel Bernal Marin
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

Since GCC version 3.1, it is possible to specify input and output
operands using symbolic names which can be referenced within the
assembler code.

Convert to named operands makes easy to understand and maintain for
future changes.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 8400ad3e17dc..2b3fb6d316f5 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -169,14 +169,14 @@ static inline void __up_read(struct rw_semaphore *sem)
 	register void *__sp asm(_ASM_SP);
 
 	asm volatile("# beginning __up_read\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
+		     LOCK_PREFIX "  xadd      %[tmp],(%[sem])\n\t"
 		     /* subtracts 1, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n"
 		     "# ending __up_read\n"
-		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
-		     : "a" (sem), "1" (-RWSEM_ACTIVE_READ_BIAS)
+		     : "+m" (sem->count), [tmp] "=d" (tmp), "+r" (__sp)
+		     : [sem] "a" (sem), "[tmp]" (-RWSEM_ACTIVE_READ_BIAS)
 		     : "memory", "cc");
 }
 
-- 
2.14.1

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

* [PATCH v3 5/6] x86, asm/rwsem: Use named operands in __up_write()
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
                     ` (3 preceding siblings ...)
  2017-09-19 23:37   ` [PATCH v3 4/6] x86, asm/rwsem: Use named operands in __up_read() Miguel Bernal Marin
@ 2017-09-19 23:37   ` Miguel Bernal Marin
  2017-09-19 23:37   ` [PATCH v3 6/6] x86, asm/rwsem: Use named operands in __downgrade_write() Miguel Bernal Marin
  2017-09-20 21:24   ` [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
  6 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

Since GCC version 3.1, it is possible to specify input and output
operands using symbolic names which can be referenced within the
assembler code.

Convert to named operands makes easy to understand and maintain for
future changes.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 2b3fb6d316f5..3245902e961f 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -189,14 +189,14 @@ static inline void __up_write(struct rw_semaphore *sem)
 	register void *__sp asm(_ASM_SP);
 
 	asm volatile("# beginning __up_write\n\t"
-		     LOCK_PREFIX "  xadd      %1,(%3)\n\t"
+		     LOCK_PREFIX "  xadd      %[tmp],(%[sem])\n\t"
 		     /* subtracts 0xffff0001, returns the old value */
 		     "  jns        1f\n\t"
 		     "  call call_rwsem_wake\n" /* expects old value in %edx */
 		     "1:\n\t"
 		     "# ending __up_write\n"
-		     : "+m" (sem->count), "=d" (tmp), "+r" (__sp)
-		     : "a" (sem), "1" (-RWSEM_ACTIVE_WRITE_BIAS)
+		     : "+m" (sem->count), [tmp] "=d" (tmp), "+r" (__sp)
+		     : [sem] "a" (sem), "[tmp]" (-RWSEM_ACTIVE_WRITE_BIAS)
 		     : "memory", "cc");
 }
 
-- 
2.14.1

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

* [PATCH v3 6/6] x86, asm/rwsem: Use named operands in __downgrade_write()
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
                     ` (4 preceding siblings ...)
  2017-09-19 23:37   ` [PATCH v3 5/6] x86, asm/rwsem: Use named operands in __up_write() Miguel Bernal Marin
@ 2017-09-19 23:37   ` Miguel Bernal Marin
  2017-09-20 21:24   ` [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
  6 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-19 23:37 UTC (permalink / raw)
  To: Josh Poimboeuf, Peter Zijlstra, Ingo Molnar, Thomas Gleixner,
	H . Peter Anvin
  Cc: linux-kernel, x86

Since GCC version 3.1, it is possible to specify input and output
operands using symbolic names which can be referenced within the
assembler code.

Convert to named operands makes easy to understand and maintain for
future changes.

Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
---
 arch/x86/include/asm/rwsem.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/rwsem.h b/arch/x86/include/asm/rwsem.h
index 3245902e961f..1f5d083599ba 100644
--- a/arch/x86/include/asm/rwsem.h
+++ b/arch/x86/include/asm/rwsem.h
@@ -208,7 +208,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
 	register void *__sp asm(_ASM_SP);
 
 	asm volatile("# beginning __downgrade_write\n\t"
-		     LOCK_PREFIX _ASM_ADD "%3,(%2)\n\t"
+		     LOCK_PREFIX _ASM_ADD "%[inc],(%[sem])\n\t"
 		     /*
 		      * transitions 0xZZZZ0001 -> 0xYYYY0001 (i386)
 		      *     0xZZZZZZZZ00000001 -> 0xYYYYYYYY00000001 (x86_64)
@@ -218,7 +218,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
 		     "1:\n\t"
 		     "# ending __downgrade_write\n"
 		     : "+m" (sem->count), "+r" (__sp)
-		     : "a" (sem), "er" (-RWSEM_WAITING_BIAS)
+		     : [sem] "a" (sem), [inc] "er" (-RWSEM_WAITING_BIAS)
 		     : "memory", "cc");
 }
 
-- 
2.14.1

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

* Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
                     ` (5 preceding siblings ...)
  2017-09-19 23:37   ` [PATCH v3 6/6] x86, asm/rwsem: Use named operands in __downgrade_write() Miguel Bernal Marin
@ 2017-09-20 21:24   ` Josh Poimboeuf
  2017-09-21 16:59     ` Miguel Bernal Marin
  2017-09-25 17:34     ` Miguel Bernal Marin
  6 siblings, 2 replies; 27+ messages in thread
From: Josh Poimboeuf @ 2017-09-20 21:24 UTC (permalink / raw)
  To: Miguel Bernal Marin
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote:
> Some warning were showed by objtool using gcc 7.2.0
> 
> kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> 
> which means gcc placed an inline asm function and its call instruction before
> the frame pointer setup.
>  
> This series forces a stack frame to be created before the call instruction
> by listing the stack pointer as an output operand in the inline asm statement.
> 
> Also to be easy to maintain and understand the operands from the extended
> assembler instructions were converted to named operands.

I've got a patch going around which will change the way we do this, so
you'll probably need to do a v3 after my patch gets merged.  I'll add
you to cc for the next revision.

-- 
Josh

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

* Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-20 21:24   ` [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
@ 2017-09-21 16:59     ` Miguel Bernal Marin
  2017-09-25 17:34     ` Miguel Bernal Marin
  1 sibling, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-21 16:59 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Wed, Sep 20, 2017 at 04:24:18PM -0500, Josh Poimboeuf wrote:
> On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote:
> > Some warning were showed by objtool using gcc 7.2.0
> > 
> > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> > kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > 
> > which means gcc placed an inline asm function and its call instruction before
> > the frame pointer setup.
> >  
> > This series forces a stack frame to be created before the call instruction
> > by listing the stack pointer as an output operand in the inline asm statement.
> > 
> > Also to be easy to maintain and understand the operands from the extended
> > assembler instructions were converted to named operands.
> 
> I've got a patch going around which will change the way we do this, so
> you'll probably need to do a v3 after my patch gets merged.  I'll add
> you to cc for the next revision.
> 

Ok, I will wait to see your changes merged.

Thanks.


> -- 
> Josh

-- 
Regards,

Miguel Bernal Marin                     Open Source Technology Center
https://clearlinux.org                              Intel Corporation

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

* Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-20 21:24   ` [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
  2017-09-21 16:59     ` Miguel Bernal Marin
@ 2017-09-25 17:34     ` Miguel Bernal Marin
  2017-09-25 19:00       ` Josh Poimboeuf
  1 sibling, 1 reply; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-25 17:34 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Wed, Sep 20, 2017 at 04:24:18PM -0500, Josh Poimboeuf wrote:
> On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote:
> > Some warning were showed by objtool using gcc 7.2.0
> > 
> > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> > kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > 
> > which means gcc placed an inline asm function and its call instruction before
> > the frame pointer setup.
> >  
> > This series forces a stack frame to be created before the call instruction
> > by listing the stack pointer as an output operand in the inline asm statement.
> > 
> > Also to be easy to maintain and understand the operands from the extended
> > assembler instructions were converted to named operands.
> 
> I've got a patch going around which will change the way we do this, so
> you'll probably need to do a v3 after my patch gets merged.  I'll add
> you to cc for the next revision.
> 

With your new patches (at v4.14.-rc2) the warning is not seen any more,
so I will send only the named operand patches (in separate thread), as
this fix is not more needed.


> -- 
> Josh

-- 
Regards,

Miguel Bernal Marin                     Open Source Technology Center
https://clearlinux.org                              Intel Corporation

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

* Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-25 17:34     ` Miguel Bernal Marin
@ 2017-09-25 19:00       ` Josh Poimboeuf
  2017-09-25 19:03         ` Josh Poimboeuf
  0 siblings, 1 reply; 27+ messages in thread
From: Josh Poimboeuf @ 2017-09-25 19:00 UTC (permalink / raw)
  To: Miguel Bernal Marin
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Mon, Sep 25, 2017 at 12:34:19PM -0500, Miguel Bernal Marin wrote:
> On Wed, Sep 20, 2017 at 04:24:18PM -0500, Josh Poimboeuf wrote:
> > On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote:
> > > Some warning were showed by objtool using gcc 7.2.0
> > > 
> > > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> > > kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> > > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > > 
> > > which means gcc placed an inline asm function and its call instruction before
> > > the frame pointer setup.
> > >  
> > > This series forces a stack frame to be created before the call instruction
> > > by listing the stack pointer as an output operand in the inline asm statement.
> > > 
> > > Also to be easy to maintain and understand the operands from the extended
> > > assembler instructions were converted to named operands.
> > 
> > I've got a patch going around which will change the way we do this, so
> > you'll probably need to do a v3 after my patch gets merged.  I'll add
> > you to cc for the next revision.
> > 
> 
> With your new patches (at v4.14.-rc2) the warning is not seen any more,
> so I will send only the named operand patches (in separate thread), as
> this fix is not more needed.

Any chance you tested with GCC 7?  With GCC 6 and older you might still
see the warnings.

-- 
Josh

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

* Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-25 19:00       ` Josh Poimboeuf
@ 2017-09-25 19:03         ` Josh Poimboeuf
  2017-09-25 21:34           ` Miguel Bernal Marin
  0 siblings, 1 reply; 27+ messages in thread
From: Josh Poimboeuf @ 2017-09-25 19:03 UTC (permalink / raw)
  To: Miguel Bernal Marin
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Mon, Sep 25, 2017 at 02:00:43PM -0500, Josh Poimboeuf wrote:
> On Mon, Sep 25, 2017 at 12:34:19PM -0500, Miguel Bernal Marin wrote:
> > On Wed, Sep 20, 2017 at 04:24:18PM -0500, Josh Poimboeuf wrote:
> > > On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote:
> > > > Some warning were showed by objtool using gcc 7.2.0
> > > > 
> > > > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> > > > kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> > > > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > > > 
> > > > which means gcc placed an inline asm function and its call instruction before
> > > > the frame pointer setup.
> > > >  
> > > > This series forces a stack frame to be created before the call instruction
> > > > by listing the stack pointer as an output operand in the inline asm statement.
> > > > 
> > > > Also to be easy to maintain and understand the operands from the extended
> > > > assembler instructions were converted to named operands.
> > > 
> > > I've got a patch going around which will change the way we do this, so
> > > you'll probably need to do a v3 after my patch gets merged.  I'll add
> > > you to cc for the next revision.
> > > 
> > 
> > With your new patches (at v4.14.-rc2) the warning is not seen any more,
> > so I will send only the named operand patches (in separate thread), as
> > this fix is not more needed.
> 
> Any chance you tested with GCC 7?  With GCC 6 and older you might still
> see the warnings.

Sorry, reading again it looks like your warnings only started showing up
in GCC 7.2.0?  If so, then it does make sense that your fix isn't needed
any more, because my patch fixed this issue for *all* inline asm for GCC
7+.

-- 
Josh

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

* Re: [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm
  2017-09-25 19:03         ` Josh Poimboeuf
@ 2017-09-25 21:34           ` Miguel Bernal Marin
  0 siblings, 0 replies; 27+ messages in thread
From: Miguel Bernal Marin @ 2017-09-25 21:34 UTC (permalink / raw)
  To: Josh Poimboeuf
  Cc: Peter Zijlstra, Ingo Molnar, Thomas Gleixner, H . Peter Anvin,
	linux-kernel, x86

On Mon, Sep 25, 2017 at 02:03:21PM -0500, Josh Poimboeuf wrote:
> On Mon, Sep 25, 2017 at 02:00:43PM -0500, Josh Poimboeuf wrote:
> > On Mon, Sep 25, 2017 at 12:34:19PM -0500, Miguel Bernal Marin wrote:
> > > On Wed, Sep 20, 2017 at 04:24:18PM -0500, Josh Poimboeuf wrote:
> > > > On Tue, Sep 19, 2017 at 06:37:39PM -0500, Miguel Bernal Marin wrote:
> > > > > Some warning were showed by objtool using gcc 7.2.0
> > > > > 
> > > > > kernel/locking/rwsem.o: warning: objtool: up_read()+0x11: call without frame pointer save/setup
> > > > > kernel/locking/rwsem.o: warning: objtool: up_write()+0x17: call without frame pointer save/setup
> > > > > kernel/locking/rwsem.o: warning: objtool: downgrade_write()+0x22: call without frame pointer save/setup
> > > > > 
> > > > > which means gcc placed an inline asm function and its call instruction before
> > > > > the frame pointer setup.
> > > > >  
> > > > > This series forces a stack frame to be created before the call instruction
> > > > > by listing the stack pointer as an output operand in the inline asm statement.
> > > > > 
> > > > > Also to be easy to maintain and understand the operands from the extended
> > > > > assembler instructions were converted to named operands.
> > > > 
> > > > I've got a patch going around which will change the way we do this, so
> > > > you'll probably need to do a v3 after my patch gets merged.  I'll add
> > > > you to cc for the next revision.
> > > > 
> > > 
> > > With your new patches (at v4.14.-rc2) the warning is not seen any more,
> > > so I will send only the named operand patches (in separate thread), as
> > > this fix is not more needed.
> > 
> > Any chance you tested with GCC 7?  With GCC 6 and older you might still
> > see the warnings.
> 
> Sorry, reading again it looks like your warnings only started showing up
> in GCC 7.2.0?  If so, then it does make sense that your fix isn't needed
> any more, because my patch fixed this issue for *all* inline asm for GCC
> 7+.
> 

Yes it was with GCC 7.2.0


> -- 
> Josh

-- 
Regards,

Miguel Bernal Marin                     Open Source Technology Center
https://clearlinux.org                              Intel Corporation

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

end of thread, other threads:[~2017-09-25 21:34 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06  5:26 [PATCH 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
2017-09-06  5:26 ` [PATCH 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
2017-09-06  5:26 ` [PATCH 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
2017-09-06  5:26 ` [PATCH 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
2017-09-06 21:33   ` Josh Poimboeuf
2017-09-06 22:14     ` Miguel Bernal Marin
2017-09-07  7:04     ` Peter Zijlstra
2017-09-06 22:44 ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Miguel Bernal Marin
2017-09-06 22:44   ` [PATCH v2 1/3] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
2017-09-07  7:12     ` Ingo Molnar
2017-09-14 21:42       ` Miguel Bernal Marin
2017-09-06 22:45   ` [PATCH v2 2/3] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
2017-09-06 22:45   ` [PATCH v2 3/3] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
2017-09-06 23:05   ` [PATCH v2 0/3] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
2017-09-19 23:37 ` [PATCH v3 0/6] " Miguel Bernal Marin
2017-09-19 23:37   ` [PATCH v3 1/6] locking/rwsem/x86: Add stack frame dependency for __up_read() Miguel Bernal Marin
2017-09-19 23:37   ` [PATCH v3 2/6] locking/rwsem/x86: Add stack frame dependency for __up_write() Miguel Bernal Marin
2017-09-19 23:37   ` [PATCH v3 3/6] locking/rwsem/x86: Add stack frame dependency for __downgrade_write() Miguel Bernal Marin
2017-09-19 23:37   ` [PATCH v3 4/6] x86, asm/rwsem: Use named operands in __up_read() Miguel Bernal Marin
2017-09-19 23:37   ` [PATCH v3 5/6] x86, asm/rwsem: Use named operands in __up_write() Miguel Bernal Marin
2017-09-19 23:37   ` [PATCH v3 6/6] x86, asm/rwsem: Use named operands in __downgrade_write() Miguel Bernal Marin
2017-09-20 21:24   ` [PATCH v3 0/6] locking/rwsem/x86: Add stack frame dependency for some inline asm Josh Poimboeuf
2017-09-21 16:59     ` Miguel Bernal Marin
2017-09-25 17:34     ` Miguel Bernal Marin
2017-09-25 19:00       ` Josh Poimboeuf
2017-09-25 19:03         ` Josh Poimboeuf
2017-09-25 21:34           ` Miguel Bernal Marin

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.