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>] [day] [month] [year] [list]
Message-ID: <20191115084538.1bf2612c@blackhole.lan>
Date:   Fri, 15 Nov 2019 08:45:38 +0100
From:   Torsten Duwe <duwe@....de>
To:     Itaru Kitayama <itaru.kitayama@...il.com>
Cc:     Mark Rutland <mark.rutland@....com>,
        James.Bottomley@...senpartnership.com, amit.kachhap@....com,
        catalin.marinas@....com, deller@....de, duwe@...e.de,
        james.morse@....com, jeyu@...nel.org, jpoimboe@...hat.com,
        jthierry@...hat.com, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
        mingo@...hat.com, peterz@...radead.org, rostedt@...dmis.org,
        svens@...ckframe.org, takahiro.akashi@...aro.org, will@...nel.org
Subject: Re: [PATCHv2 7/8] arm64: implement ftrace with regs

On Fri, 15 Nov 2019 07:05:39 +0900
Itaru Kitayama <itaru.kitayama@...il.com> wrote:

> Is this feature avail even when building kernel with Clang?

If your compiler can ...

[...]
> > compiler insert a configurable number of NOPs between the function
> > entry point and the usual prologue. This also ensures functions are
> > AAPCS compliant (e.g. disabling inter-procedural register
> > allocation).
> >
> > For example, with -fpatchable-function-entry=2, GCC 8.1.0 compiles
> > the following:
> >
> > | unsigned long bar(void);
> > |
> > | unsigned long foo(void)
> > | {
> > |         return bar() + 1;
> > | }
> >
> > ... to:
> >
> > | <foo>:
> > |         nop
> > |         nop
> > |         stp     x29, x30, [sp, #-16]!

* insert e.g. 2 NOPs
* record all those locations in a section called
  "patchable_function_entries"
* stick to the AAPCS

then: yes. So far I only implemented this for gcc.

	Torsten

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ