linux-ia64.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Fenghua Yu <fenghua.yu@intel.com>,
	"H . J . Lu" <hjl.tools@gmail.com>,
	Tony Luck <tony.luck@intel.com>
Subject: Re: ia64: fix module loading for gcc-5.4
Date: Sun, 09 Apr 2017 10:38:36 +0000	[thread overview]
Message-ID: <20170409113836.08f3f68b@sf> (raw)
In-Reply-To: <bc2dbb55-54b3-e62e-a54f-aa1bbbc3aa5f@users.sourceforge.net>

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

On Sun, 9 Apr 2017 11:02:43 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> >>> That caused ia64 module loader to choke
> >>> on such instructions:
> >>>     fuse: invalid slot number 1 for IMM64    
> >>
> >> Why does it matter to check such a value?  
> > 
> > I'm not sure I follow the question. Is your question about
> > linux kernel relocation code handler, gcc or ia64 instruction format?  
> 
> I am just curious if this source code could also work without
> the mentioned check.

It should work for valid code, yes. The flip side of check removal
is to miss malformed relocation (say, when instruction "address" is
wrong due to obscure toolchain bug). In this case apply_imm64()
would silently corrupt unrelated memory instead of crashing kernel.

> Would it make sense to check more than two values there?

AFAIU ia64 does not allow encoding imm64/imm60 instructions
spanning slot=0 at all.

ia64_patch_imm64() can handle only imm64 bundles that span
only both slot 1 and slot 2 at the same time. It can accept
either slot=1 "address" or slot=2 "address". Anything else would
be malformed.

-- 

  Sergei

[-- Attachment #2: =?unknown-8bit?b?0KbQuNGE0YDQvtCy0LDRjyDQv9C+0LTQv9C40YHRjA==?= OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2017-04-09 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <to=<20170408081449.4872-1-slyfox@gentoo.org>
2017-04-08 19:53 ` [PATCH v3] ia64: fix module loading for gcc-5.4 Sergei Trofimovich
2017-04-09  8:27   ` SF Markus Elfring
2017-04-09  8:51     ` Sergei Trofimovich
2017-04-09  9:02       ` SF Markus Elfring
2017-04-09 10:38         ` Sergei Trofimovich [this message]
2017-04-10 17:23   ` [PATCH v3] ia64: fix module loading for gcc-5.4+ SF Markus Elfring
2017-04-10 21:53     ` Sergei Trofimovich
2017-04-29 18:14   ` [PATCH v3] ia64: fix module loading for gcc-5.4 Sergei Trofimovich

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=20170409113836.08f3f68b@sf \
    --to=slyfox@gentoo.org \
    --cc=akpm@linux-foundation.org \
    --cc=elfring@users.sourceforge.net \
    --cc=fenghua.yu@intel.com \
    --cc=hjl.tools@gmail.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).