Message ID | 6d7b45eb-8085-47fa-fc31-5fb26b7dd009@linux-m68k.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 21 Jul 2016, Greg Ungerer wrote: > Hi Nicolas, > > On 21/07/16 05:22, Nicolas Pitre wrote: > > This series provides the necessary changes to allow "flat" executable > > binaries meant for no-MMU systems to actually run on systems with a MMU. > > Also thrown in are various cleanups to binfmt_flat.c. > > I got to the bottom of why I couldn't run m68k flat binaries on > an MMU enabled m68k system. I had to fix the regs setup, with the > patch below. With this I can now run flat binaries on my ColdFire > MMU enabled system. Excellent! > This change is completely independent of your patch series so I'll > push this separately via the linux-m68k list and my m68knommu git > tree. OK. Who should merge my patch series at this point? Nicolas -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 22/07/16 00:48, Nicolas Pitre wrote: > On Thu, 21 Jul 2016, Greg Ungerer wrote: >> Hi Nicolas, >> >> On 21/07/16 05:22, Nicolas Pitre wrote: >>> This series provides the necessary changes to allow "flat" executable >>> binaries meant for no-MMU systems to actually run on systems with a MMU. >>> Also thrown in are various cleanups to binfmt_flat.c. >> >> I got to the bottom of why I couldn't run m68k flat binaries on >> an MMU enabled m68k system. I had to fix the regs setup, with the >> patch below. With this I can now run flat binaries on my ColdFire >> MMU enabled system. > > Excellent! > >> This change is completely independent of your patch series so I'll >> push this separately via the linux-m68k list and my m68knommu git >> tree. > > OK. > > Who should merge my patch series at this point? If no-one else wants to carry it I can take it in the m68knommu git tree. But I would want to be sure everyone is good with it first. Alan: are you happy with where this is at? rmk: ok with the arm flat.h change going via another tree? Al/David: any comments on this? (Link to v4 patches here https://lkml.org/lkml/2016/7/20/508 ) Regards Greg -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, 22 Jul 2016 17:28:13 +1000 Greg Ungerer <gerg@linux-m68k.org> wrote: > On 22/07/16 00:48, Nicolas Pitre wrote: > > On Thu, 21 Jul 2016, Greg Ungerer wrote: > >> Hi Nicolas, > >> > >> On 21/07/16 05:22, Nicolas Pitre wrote: > >>> This series provides the necessary changes to allow "flat" executable > >>> binaries meant for no-MMU systems to actually run on systems with a MMU. > >>> Also thrown in are various cleanups to binfmt_flat.c. > >> > >> I got to the bottom of why I couldn't run m68k flat binaries on > >> an MMU enabled m68k system. I had to fix the regs setup, with the > >> patch below. With this I can now run flat binaries on my ColdFire > >> MMU enabled system. > > > > Excellent! > > > >> This change is completely independent of your patch series so I'll > >> push this separately via the linux-m68k list and my m68knommu git > >> tree. > > > > OK. > > > > Who should merge my patch series at this point? > > If no-one else wants to carry it I can take it in the m68knommu > git tree. But I would want to be sure everyone is good with it > first. > > Alan: are you happy with where this is at? From a first glance yes. I don't have time right now to give it a more detailed audit, but with the correct user accessors it looks as if all the ways you can mess up relocations simply result in faults or running a nonsense binary and the userspace failing. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Jul 22, 2016 at 05:28:13PM +1000, Greg Ungerer wrote: > On 22/07/16 00:48, Nicolas Pitre wrote: > > On Thu, 21 Jul 2016, Greg Ungerer wrote: > >> Hi Nicolas, > >> > >> On 21/07/16 05:22, Nicolas Pitre wrote: > >>> This series provides the necessary changes to allow "flat" executable > >>> binaries meant for no-MMU systems to actually run on systems with a MMU. > >>> Also thrown in are various cleanups to binfmt_flat.c. > >> > >> I got to the bottom of why I couldn't run m68k flat binaries on > >> an MMU enabled m68k system. I had to fix the regs setup, with the > >> patch below. With this I can now run flat binaries on my ColdFire > >> MMU enabled system. > > > > Excellent! > > > >> This change is completely independent of your patch series so I'll > >> push this separately via the linux-m68k list and my m68knommu git > >> tree. > > > > OK. > > > > Who should merge my patch series at this point? > > If no-one else wants to carry it I can take it in the m68knommu > git tree. But I would want to be sure everyone is good with it > first. > > Alan: are you happy with where this is at? > rmk: ok with the arm flat.h change going via another tree? I've no idea, sorry. This is the first I've heard about this as I haven't been copied with any of the patches, neither has the linux-arm-kernel mailing list. > (Link to v4 patches here https://lkml.org/lkml/2016/7/20/508 ) elinks tells me "Unable to retrieve https://lkml.org/lkml/2016/7/20/508: SSL error" which is a common lkml.org error with elinks. Also lkml.org doesn't always work with firefox, especially if you try to follow threads - I often end up with messages that are missing all content. Even openssl s_client gets refused by lkml.org:443 with a fatal SSL error. (elinks gets "Handshake Failure", openssl gets "Internal Error".) So, given that no one has seen this on the ARM side, I think there's a need to post the patches so that it can be reviewed there, especially so that the wider ARM audience can see what's going on, and ARM64 folk can see as well. In any case, I certainly won't be able to review it over this weekend.
diff --git a/arch/m68k/include/asm/flat.h b/arch/m68k/include/asm/flat.h index f3f592d..a97c479 100644 --- a/arch/m68k/include/asm/flat.h +++ b/arch/m68k/include/asm/flat.h @@ -19,4 +19,10 @@ static inline int flat_set_persistent(unsigned long relval, return 0; } +#define FLAT_PLAT_INIT(regs) \ + do { \ + if (current->mm) \ + (regs)->d5 = current->mm->start_data; \ + } while (0) + #endif /* __M68KNOMMU_FLAT_H__ */ diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h index a6ce2ec..46672d1 100644 --- a/arch/m68k/include/asm/processor.h +++ b/arch/m68k/include/asm/processor.h @@ -131,8 +131,6 @@ extern int handle_kernel_fault(struct pt_regs *regs); do { \ (_regs)->pc = (_pc); \ setframeformat(_regs); \ - if (current->mm) \ - (_regs)->d5 = current->mm->start_data; \ (_regs)->sr &= ~0x2000; \ wrusp(_usp); \ } while(0)