Re: Did I ever post my sh fdpic-on-mmu patch here?

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <0fa5c6c87fd38d71fcd4bee24affa3c57ed180c1.camel@physik.fu-berlin.de>
Hi Rob,

On Tue, 2025-04-08 at 07:59 -0500, Rob Landley wrote:
> > Could you post the patch with git-send-email so that it's inline and can be
> > reviewed on the list?
> 
> Dreamhost's outgoing smtp server requires ssl and a login, so probably 
> not easily? But let's see...
> 
> $ man git-send-email
> No manual entry for git-send-email
> $ git help send-email
> No manual entry for gitsend-email
> $ git send-email
> git: 'send-email' is not a git command. See 'git --help'.
> $ git-send-email
> bash: git-send-email: command not found

On Ubuntu/Debian, Fedore and openSUSE, you need to install the package
git-email for git send-email to work.

To set it up and send a kernel patch with, I recommend this guide:

https://nickdesaulniers.github.io/blog/2017/05/16/submitting-your-first-patch-to-the-linux-kernel-and-responding-to-feedback/

> Oh good grief, here:
> 
> From: Rob Landley <[email protected]>
> 
> Allow CONFIG_BINFMT_ELF_FDPIC loader to build on sh4 with mmu, same as arm.
> 
> --
> 
>   arch/sh/kernel/setup.c |   25 +++++++++++++++++++++++++
>   fs/Kconfig.binfmt      |    2 +-
>   2 files changed, 26 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
> index d3175f09b3aa..effda8b21370 100644
> --- a/arch/sh/kernel/setup.c
> +++ b/arch/sh/kernel/setup.c
> @@ -404,3 +404,28 @@ void __init arch_cpu_finalize_init(void)
>   #endif
>   	*p = '\0';
>   }
> +
> +#if defined(CONFIG_MMU) && defined(CONFIG_BINFMT_ELF_FDPIC)
> +
> +#include <linux/personality.h>
> +#include <linux/elf-fdpic.h>
> +
> +void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params,
> +                               struct elf_fdpic_params *interp_params,
> +                               unsigned long *start_stack,
> +                               unsigned long *start_brk)
> +{
> +	set_personality((current->personality & ~PER_MASK) | PER_LINUX);
> +
> +        exec_params->load_addr = 0x8000;
> +        interp_params->load_addr = ELF_ET_DYN_BASE;
> +        *start_stack = TASK_SIZE - SZ_16M;
> +
> +        if ((exec_params->flags & ELF_FDPIC_FLAG_ARRANGEMENT) == 
> ELF_FDPIC_FLAG_INDEPENDENT) {
> +                exec_params->flags &= ~ELF_FDPIC_FLAG_ARRANGEMENT;
> +                exec_params->flags |= ELF_FDPIC_FLAG_CONSTDISP;
> +        }
> +}
> +
> +#endif
> +
> diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
> index f5693164ca9a..ba8c5fc81da4 100644
> --- a/fs/Kconfig.binfmt
> +++ b/fs/Kconfig.binfmt
> @@ -58,7 +58,7 @@ config ARCH_USE_GNU_PROPERTY
>   config BINFMT_ELF_FDPIC
>   	bool "Kernel support for FDPIC ELF binaries"
>   	default y if !BINFMT_ELF
> -	depends on ARM || ((M68K || RISCV || SUPERH || XTENSA) && !MMU)
> +	depends on ARM || SUPERH || ((M68K || RISCV || XTENSA) && !MMU)
>   	select ELFCORE
>   	help
>   	  ELF FDPIC binaries are based on ELF, but allow the individual load
> 
> > This makes it easier for review and pick up with the
> > b4 utility
> 
> https://landley.net/notes-2024.html#09-04-2024
> 
> > and it's easily accessible though patchwork.
> 
> The above is "xclip -sel c < file.patch" which I then pasted "as 
> quotation" into thunderbird and hit delete twice at the start of each 
> line to take the "> " off but it's still in the magic "blue text because 
> quotation" state that _should_ prevent line wrapping? (It does for the 
> UI, I _think_ that carries through to sending? No of course disabling 
> HTML email doesn't stop the compose window from maintaining unwanted 
> markup...)
> 
> If that doesn't work, I have to track down a version of the no-wordwrap 
> plugin that works with current thunderbird. (The one I was using went 
> away in plugin api version skew du jour during the distro upgrade that 
> might let me back onto the python version treadmill b4 enforces.)

Please try to follow the guide above first and if that fails, we can still
find a way. I just want to make sure the proper format is chosen so it goes
through the right channels.

If everything else fails, I can send the patch on your behalf while keeping
your authorship.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.