mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Borislav Petkov <bp@alien8.de>
Cc: Mathias Krause <minipli@googlemail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86-ml <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/alternatives: Fix alt_max_short macro to really be a max()
Date: Thu, 5 Oct 2017 14:52:19 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LSU.2.21.1710051445420.30711@wotan.suse.de> (raw)
In-Reply-To: <20171005123906.n362s66dve3xplqm@pd.tnic>

Hi,

On Thu, 5 Oct 2017, Borislav Petkov wrote:

> On Thu, Oct 05, 2017 at 02:35:33PM +0200, Mathias Krause wrote:
> > Note the "<"! ...comment is wrong, though the implementation works!
> 
> I know, I realized that when I looked at alternative-asm.h. Wanted to
> double-check it with Micha first.

Yeah, for bit-twiddling the result of arithmetic would need to be 
booleanized first, or alternatively the boolean operators be used in the 
first place.  So if '<' works then that's better in this context.

(In a different context, or in the same one there definitely was a problem 
with using '<', but I can't remember the details, it's too long ago we 
discussed about this; maybe it even was a problem only with some binutils 
versions.  So I'd suggest using the more obvious way until problems 
reoccur, and then document why exactly using relational ops was a problem 
;-) )


Ciao,
Michael.

  reply	other threads:[~2017-10-05 12:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 18:08 Mathias Krause
2017-10-05  7:38 ` Borislav Petkov
2017-10-05  7:58   ` Mathias Krause
2017-10-05 12:35     ` Mathias Krause
2017-10-05 12:39       ` Borislav Petkov
2017-10-05 12:52         ` Michael Matz [this message]
2017-10-05 13:01           ` Mathias Krause
2017-10-05 14:55       ` 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=alpine.LSU.2.21.1710051445420.30711@wotan.suse.de \
    --to=matz@suse.de \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=minipli@googlemail.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®