public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Peter Zijlstra' <peterz@infradead.org>,
	Mikulas Patocka <mpatocka@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] objtool: fix objtool regression on x32 systems
Date: Tue, 17 May 2022 08:26:42 +0000	[thread overview]
Message-ID: <738a941ba2ff4e2db8f2268b281d9bd5@AcuMS.aculab.com> (raw)
In-Reply-To: <20220516212517.GP76023@worktop.programming.kicks-ass.net>

From: Peter Zijlstra
> Sent: 16 May 2022 22:25
...
> A quick look seems to suggest at least all the 'offset' fields should be
> u64 or something. The only reason that works is because -mcmodel=kernel
> keeps everything in the 2G range to make s32 immediates work. But it
> isn't right.

Offsets in instructions are only 8bit or 32bit.
The mod/reg/rm and SiB encodings don't support anything else.
If offsets might be large then they have to be loaded into
registers - which will slow things down.

Immediates can be 64bit (but not if the addressing mode
includes an offset).

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  reply	other threads:[~2022-05-17  8:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 15:06 [PATCH] objtool: fix objtool regression on x32 systems Mikulas Patocka
2022-05-16 15:41 ` Peter Zijlstra
2022-05-16 15:56   ` Mikulas Patocka
2022-05-16 21:25     ` Peter Zijlstra
2022-05-17  8:26       ` David Laight [this message]
2022-05-17  9:42         ` Peter Zijlstra
2022-05-18 13:28       ` [PATCH v2] " Mikulas Patocka
2022-05-18 18:08         ` Josh Poimboeuf

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=738a941ba2ff4e2db8f2268b281d9bd5@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.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