Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-28 Thread Madhavan T. Venkataraman
Hi, I sent this suggestion to linux-arm-kernel in response to the Reliable Stacktrace RFC from Mark Brown and Mark Rutland. I am repeating it here for two reasons: - It involves objtool. - There are many more recipients in this thread that may be interested in this topic. Please let me know

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-25 Thread Josh Poimboeuf
On Fri, Jan 22, 2021 at 10:43:09PM +0100, Ard Biesheuvel wrote: > On Fri, 22 Jan 2021 at 22:15, Madhavan T. Venkataraman > wrote: > > On 1/22/21 11:43 AM, Mark Brown wrote: > > > On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > > > > > >> 2) The shadow stack idea sounds

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-22 Thread Madhavan T. Venkataraman
On 1/22/21 3:43 PM, Ard Biesheuvel wrote: > On Fri, 22 Jan 2021 at 22:15, Madhavan T. Venkataraman > wrote: >> >> >> >> On 1/22/21 11:43 AM, Mark Brown wrote: >>> On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: >>> 2) The shadow stack idea sounds promising -- how hard

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-22 Thread Ard Biesheuvel
On Fri, 22 Jan 2021 at 22:15, Madhavan T. Venkataraman wrote: > > > > On 1/22/21 11:43 AM, Mark Brown wrote: > > On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > > > >> 2) The shadow stack idea sounds promising -- how hard would it be to > >>make a prototype reliable

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-22 Thread Madhavan T. Venkataraman
On 1/22/21 11:43 AM, Mark Brown wrote: > On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > >> 2) The shadow stack idea sounds promising -- how hard would it be to >>make a prototype reliable unwinder? > > In theory it doesn't look too hard and I can't see a particular

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-22 Thread Madhavan T. Venkataraman
On 1/22/21 11:43 AM, Mark Brown wrote: > On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > >> 2) The shadow stack idea sounds promising -- how hard would it be to >>make a prototype reliable unwinder? > > In theory it doesn't look too hard and I can't see a particular

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-22 Thread Ard Biesheuvel
On Fri, 22 Jan 2021 at 18:44, Mark Brown wrote: > > On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > > > 2) The shadow stack idea sounds promising -- how hard would it be to > >make a prototype reliable unwinder? > > In theory it doesn't look too hard and I can't see a

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-22 Thread Mark Brown
On Thu, Jan 21, 2021 at 12:54:52PM -0600, Josh Poimboeuf wrote: > 2) The shadow stack idea sounds promising -- how hard would it be to >make a prototype reliable unwinder? In theory it doesn't look too hard and I can't see a particular reason not to try doing this - there's going to be edge

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Josh Poimboeuf
Ard, Sorry, I was late to the party, attempting to reply to the entire thread at once. Also, adding the live-patching ML. I agree with a lot of your concerns. Reverse engineering the control flow of the compiled binary is kind of ridiculous. I was always surprised that it works. I still am!

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Mark Brown
On Thu, Jan 21, 2021 at 02:23:53PM +0100, Julien Thierry wrote: > On 1/21/21 12:08 PM, Ard Biesheuvel wrote: > > I am not aware of any plans to enable this in GCC, but the Clang > > implementation is definitely intended for production use (it's a CFI > > feature for ROP/JOP mitigation) > I think

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Julien Thierry
On 1/21/21 12:08 PM, Ard Biesheuvel wrote: On Thu, 21 Jan 2021 at 11:26, Julien Thierry wrote: Hi Ard, On 1/21/21 10:03 AM, Ard Biesheuvel wrote: Hello Julien, On Wed, 20 Jan 2021 at 18:38, Julien Thierry wrote: Hi, This series enables objtool to start doing stack validation on

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Ard Biesheuvel
On Thu, 21 Jan 2021 at 12:23, Peter Zijlstra wrote: > > On Thu, Jan 21, 2021 at 12:08:23PM +0100, Ard Biesheuvel wrote: > > On Thu, 21 Jan 2021 at 11:26, Julien Thierry wrote: > > > > I'm not familiar with toolcahin code models, but would this approach be > > > able to validate assembly code

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Peter Zijlstra
On Thu, Jan 21, 2021 at 12:08:23PM +0100, Ard Biesheuvel wrote: > On Thu, 21 Jan 2021 at 11:26, Julien Thierry wrote: > > I'm not familiar with toolcahin code models, but would this approach be > > able to validate assembly code (either inline or in assembly files?) > > > > No, it would not.

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Ard Biesheuvel
On Thu, 21 Jan 2021 at 11:26, Julien Thierry wrote: > > Hi Ard, > > On 1/21/21 10:03 AM, Ard Biesheuvel wrote: > > Hello Julien, > > > > On Wed, 20 Jan 2021 at 18:38, Julien Thierry wrote: > >> > >> Hi, > >> > >> This series enables objtool to start doing stack validation on arm64 > >> kernel

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Julien Thierry
Hi Ard, On 1/21/21 10:03 AM, Ard Biesheuvel wrote: Hello Julien, On Wed, 20 Jan 2021 at 18:38, Julien Thierry wrote: Hi, This series enables objtool to start doing stack validation on arm64 kernel builds. Could we elaborate on this point, please? 'Stack validation' means getting an

Re: [RFC PATCH 00/17] objtool: add base support for arm64

2021-01-21 Thread Ard Biesheuvel
Hello Julien, On Wed, 20 Jan 2021 at 18:38, Julien Thierry wrote: > > Hi, > > This series enables objtool to start doing stack validation on arm64 > kernel builds. Could we elaborate on this point, please? 'Stack validation' means getting an accurate picture of all kernel code that will be

[RFC PATCH 00/17] objtool: add base support for arm64

2021-01-20 Thread Julien Thierry
Hi, This series enables objtool to start doing stack validation on arm64 kernel builds. It relies on the previous series I sent, refactoring the arm64 decoder [1]. First, the aarch64 instruction decoder needed to be made available to code under tools/. This is done in a similar manner to x86