lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170409113836.08f3f68b@sf>
Date:   Sun, 9 Apr 2017 11:38:36 +0100
From:   Sergei Trofimovich <slyfox@...too.org>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:     linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org,
        Andrew Morton <akpm@...ux-foundation.org>,
        Fenghua Yu <fenghua.yu@...el.com>,
        "H . J . Lu" <hjl.tools@...il.com>, Tony Luck <tony.luck@...el.com>
Subject: Re: ia64: fix module loading for gcc-5.4

On Sun, 9 Apr 2017 11:02:43 +0200
SF Markus Elfring <elfring@...rs.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

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ