public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@kernel.org>, X86 ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 02/14] x86/alternatives: Add nested alternatives macros
Date: Fri, 31 May 2024 17:10:08 +0200	[thread overview]
Message-ID: <d3969a10-7cd2-3dfb-2e49-37ebad2d6440@gmail.com> (raw)
In-Reply-To: <20240531143625.GHZlngaQfx6CiJlujI@fat_crate.local>



Borislav Petkov je 31. 05. 24 ob 16:36 napisal:
> On Fri, May 31, 2024 at 04:30:31PM +0200, Uros Bizjak wrote:
>> Please don't resurrect the %P modifier, use %c instead.
> 
> Btw, out of curiosity, is %P being phased out?

No ;)

> I'm looking at
> 
> 41cd2e1ee96e ("x86/asm: Use %c/%n instead of %P operand modifier in asm templates")
> 
> and yeah, %c is the generic one while %P is the x86-specific one but
> phasing latter out is probably going to take a bunch of gcc releases...

The intention of '%P' operand modifier is primarily to be used with PIC, 
where:

'P'        If used for a function, print the PLT
            suffix and generate PIC code.  For
            example, emit 'foo@PLT' instead of 'foo'
            for the function foo().  If used for a
            constant, drop all syntax-specific
            prefixes and issue the bare constant.  See
            'p' above.

the fact that is handles constants is due to historic reasons.

The '%c' operand modifier will also check its operand that it is indeed 
an immediate integer operand, so should be used with 'i' operand constraint:

'c'        Require a constant operand and print the
            constant expression with no punctuation.

Uros.

  reply	other threads:[~2024-05-31 15:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31 12:34 [PATCH 00/14] x86/alternatives: Nest them Borislav Petkov
2024-05-31 12:34 ` [PATCH 01/14] x86/alternative: Zap alternative_ternary() Borislav Petkov
2024-05-31 12:34 ` [PATCH 02/14] x86/alternatives: Add nested alternatives macros Borislav Petkov
2024-05-31 14:30   ` Uros Bizjak
2024-05-31 14:32     ` Borislav Petkov
2024-05-31 14:36     ` Borislav Petkov
2024-05-31 15:10       ` Uros Bizjak [this message]
2024-05-31 18:09         ` Borislav Petkov
2024-05-31 12:35 ` [PATCH 03/14] x86/alternative: Convert alternative() Borislav Petkov
2024-05-31 12:35 ` [PATCH 04/14] x86/alternative: Convert alternative_2() Borislav Petkov
2024-05-31 12:35 ` [PATCH 05/14] x86/alternative: Convert alternative_input() Borislav Petkov
2024-05-31 12:35 ` [PATCH 06/14] x86/alternative: Convert alternative_io() Borislav Petkov
2024-05-31 12:35 ` [PATCH 07/14] x86/alternative: Convert alternative_call() Borislav Petkov
2024-05-31 12:35 ` [PATCH 08/14] x86/alternative: Convert alternative_call_2() Borislav Petkov
2024-05-31 12:35 ` [PATCH 09/14] x86/alternative: Convert ALTERNATIVE_TERNARY() Borislav Petkov
2024-05-31 12:35 ` [PATCH 10/14] x86/alternative: Convert ALTERNATIVE_3() Borislav Petkov
2024-05-31 17:00   ` Brian Gerst
2024-06-01  9:04     ` Borislav Petkov
2024-05-31 12:35 ` [PATCH 11/14] x86/alternative: Convert the asm ALTERNATIVE() macro Borislav Petkov
2024-05-31 12:35 ` [PATCH 12/14] x86/alternative: Convert the asm ALTERNATIVE_2() macro Borislav Petkov
2024-05-31 12:35 ` [PATCH 13/14] x86/alternative: Convert the asm ALTERNATIVE_3() macro Borislav Petkov
2024-05-31 12:35 ` [PATCH 14/14] x86/alternative: Replace the old macros Borislav Petkov

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=d3969a10-7cd2-3dfb-2e49-37ebad2d6440@gmail.com \
    --to=ubizjak@gmail.com \
    --cc=bp@alien8.de \
    --cc=bp@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --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