Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-20 Thread Chris Smart
On Thu, Jun 16, 2016 at 11:04:12PM -0500, Segher Boessenkool wrote: On Fri, Jun 17, 2016 at 09:33:45AM +1000, Chris Smart wrote: +#define PPC_INST_COPY 0x7c00060c +#define PPC_INST_COPY_FIRST0x7c20060c +#define PPC_INST_PASTE 0x7c00070c +#define PP

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-19 Thread Balbir Singh
On 20/06/16 09:48, Chris Smart wrote: > On Fri, Jun 17, 2016 at 05:20:05PM +1000, Balbir Singh wrote: >> >> >> On 17/06/16 09:33, Chris Smart wrote: > > [snip] > >>> + >>> +/* >>> + * ISA 3.0 (such as P9) copy, copy_first, paste and paste_last >>> alignment >>> + * check. >>> +

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-19 Thread Chris Smart
On Fri, Jun 17, 2016 at 05:20:05PM +1000, Balbir Singh wrote: On 17/06/16 09:33, Chris Smart wrote: [snip] + +/* + * ISA 3.0 (such as P9) copy, copy_first, paste and paste_last alignment + * check. + * + * Send a SIGBUS to the process that caused the fault. + * +

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-17 Thread Balbir Singh
On 17/06/16 09:33, Chris Smart wrote: > Calling ISA 3.0 instructions copy, copy_first, paste and paste_last > generates an alignment fault when copying or pasting unaligned > data (128 byte). We catch this and send SIGBUS to the userspace > process that caused it. > > We do not emulate these bec

Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-16 Thread Segher Boessenkool
On Fri, Jun 17, 2016 at 09:33:45AM +1000, Chris Smart wrote: > +#define PPC_INST_COPY0x7c00060c > +#define PPC_INST_COPY_FIRST 0x7c20060c > +#define PPC_INST_PASTE 0x7c00070c > +#define PPC_INST_PASTE_LAST 0x7c20070d That's not quite

[Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste

2016-06-16 Thread Chris Smart
Calling ISA 3.0 instructions copy, copy_first, paste and paste_last generates an alignment fault when copying or pasting unaligned data (128 byte). We catch this and send SIGBUS to the userspace process that caused it. We do not emulate these because paste may contain additional metadata when pas