From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Jiri Kosina <jikos@kernel•org>,
Josh Poimboeuf <jpoimboe@redhat•com>,
Miroslav Benes <mbenes@suse•cz>, Petr Mladek <pmladek@suse•com>,
Joe Lawrence <joe.lawrence@redhat•com>,
Jessica Yu <jeyu@kernel•org>
Cc: Linux Next Mailing List <linux-next@vger•kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
Peter Zijlstra <peterz@infradead•org>
Subject: Re: linux-next: manual merge of the livepatching tree with the modules tree
Date: Fri, 5 Jun 2020 14:45:57 +1000 [thread overview]
Message-ID: <20200605144557.4f8e2a42@canb.auug.org.au> (raw)
In-Reply-To: <20200508180524.6995b07e@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]
Hi all,
On Fri, 8 May 2020 18:05:24 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Today's linux-next merge of the livepatching tree got a conflict in:
>
> kernel/module.c
>
> between commits:
>
> db991af02f11 ("module: break nested ARCH_HAS_STRICT_MODULE_RWX and STRICT_MODULE_RWX #ifdefs")
> 5c3a7db0c7ec ("module: Harden STRICT_MODULE_RWX")
>
> from the modules tree and commit:
>
> e6eff4376e28 ("module: Make module_enable_ro() static again")
>
> from the livepatching tree.
>
> diff --cc kernel/module.c
> index c69291362676,a26343ea4d50..000000000000
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@@ -2055,29 -2023,20 +2042,30 @@@ static void module_enable_nx(const stru
> frob_writable_data(&mod->init_layout, set_memory_nx);
> }
>
> +static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
> + char *secstrings, struct module *mod)
> +{
> + const unsigned long shf_wx = SHF_WRITE|SHF_EXECINSTR;
> + int i;
> +
> + for (i = 0; i < hdr->e_shnum; i++) {
> + if ((sechdrs[i].sh_flags & shf_wx) == shf_wx)
> + return -ENOEXEC;
> + }
> +
> + return 0;
> +}
> +
> #else /* !CONFIG_STRICT_MODULE_RWX */
> +/* module_{enable,disable}_ro() stubs are in module.h */
> static void module_enable_nx(const struct module *mod) { }
> + static void module_enable_ro(const struct module *mod, bool after_init) {}
> -#endif /* CONFIG_STRICT_MODULE_RWX */
> -static void module_enable_x(const struct module *mod)
> +static int module_enforce_rwx_sections(Elf_Ehdr *hdr, Elf_Shdr *sechdrs,
> + char *secstrings, struct module *mod)
> {
> - frob_text(&mod->core_layout, set_memory_x);
> - frob_text(&mod->init_layout, set_memory_x);
> + return 0;
> }
> -#else /* !CONFIG_ARCH_HAS_STRICT_MODULE_RWX */
> -static void module_enable_nx(const struct module *mod) { }
> -static void module_enable_x(const struct module *mod) { }
> -#endif /* CONFIG_ARCH_HAS_STRICT_MODULE_RWX */
> -
> +#endif /* CONFIG_STRICT_MODULE_RWX */
>
> #ifdef CONFIG_LIVEPATCH
> /*
This is now a conflict between the modules tree and Linus' tree.
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-06-05 4:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 8:05 linux-next: manual merge of the livepatching tree with the modules tree Stephen Rothwell
2020-05-11 11:43 ` Miroslav Benes
2020-06-05 4:45 ` Stephen Rothwell [this message]
2020-06-05 6:56 ` Jiri Kosina
2020-06-05 7:37 ` Jessica Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200605144557.4f8e2a42@canb.auug.org.au \
--to=sfr@canb$(echo .)auug.org.au \
--cc=jeyu@kernel$(echo .)org \
--cc=jikos@kernel$(echo .)org \
--cc=joe.lawrence@redhat$(echo .)com \
--cc=jpoimboe@redhat$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=mbenes@suse$(echo .)cz \
--cc=peterz@infradead$(echo .)org \
--cc=pmladek@suse$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox