> On Jun 28, 2018, at 5:18 PM, Linus Torvalds <[email protected]> > wrote: > >> On Thu, Jun 28, 2018 at 4:30 PM Andy Lutomirski <[email protected]> wrote: >> >> The idea is that, if someone screws up and sticks a number like >> 0xbaadf00d00045678 into their rseq abort_ip in a 32-bit x86 program >> (when they actually mean 0x00045678), we want to something consistent. > > I think the "something consistent" is perfectly fine with just "it won't > work". > > Make it do > > if (rseq_cs->abort_ip != (unsigned long)rseq_cs->abort_ip) > return -EINVAL; > > at abort time. You sure? Because, unless I remember wrong, a 32-bit user program on a 64-bit kernel will actually work at least most of the time even if high bits are set. I’m okay with straight-up promising “will always work” or “will never work”, but “sometimes” is bad. > > Done. > > If it's a 32-bit kernel, the above will reject the thing, and if it's > a 64-bit kernel, it will be a no-op, but the abort won't work in a > 32-bit caller. > > Problem solved. > > Linus
- [RFC PATCH for 4.18 2/2] rseq: check that rseq->rseq_... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 2/2] rseq: check that rseq-... Will Deacon
- Re: [RFC PATCH for 4.18 2/2] rseq: check that r... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] rseq: validate rseq_cs fiel... Andy Lutomirski
- Re: [RFC PATCH for 4.18 1/2] rseq: validate rseq_cs... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] rseq: validate rseq_cs... Linus Torvalds
- Re: [RFC PATCH for 4.18 1/2] rseq: validate rse... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] rseq: validate rse... Andy Lutomirski
- Re: [RFC PATCH for 4.18 1/2] rseq: validate... Linus Torvalds
- Re: [RFC PATCH for 4.18 1/2] rseq: vali... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] rseq: vali... Andy Lutomirski
- Re: [RFC PATCH for 4.18 1/2] rseq:... Linus Torvalds
- Re: [RFC PATCH for 4.18 1/2] r... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] r... Linus Torvalds
- Re: [RFC PATCH for 4.18 1/2] r... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] r... Linus Torvalds
- Re: [RFC PATCH for 4.18 1/2] r... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] r... Linus Torvalds
- Re: [RFC PATCH for 4.18 1/2] r... Mathieu Desnoyers
- Re: [RFC PATCH for 4.18 1/2] r... Andy Lutomirski
- Re: [RFC PATCH for 4.18 1/2] r... Mathieu Desnoyers

