lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <nycvar.YFH.7.76.2006050855290.13242@cbobk.fhfr.pm>
Date:   Fri, 5 Jun 2020 08:56:12 +0200 (CEST)
From:   Jiri Kosina <jikos@...nel.org>
To:     Stephen Rothwell <sfr@...b.auug.org.au>
cc:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Miroslav Benes <mbenes@...e.cz>,
        Petr Mladek <pmladek@...e.com>,
        Joe Lawrence <joe.lawrence@...hat.com>,
        Jessica Yu <jeyu@...nel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: linux-next: manual merge of the livepatching tree with the
 modules tree

On Fri, 5 Jun 2020, Stephen Rothwell 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.

I've made Linus aware of this coming when sending livepatching tree, but 
given the fact that the modules tree hasn't been merged yet, Jessica, I 
believe it'd make sense to point it out again once sending your tree.

Thanks,

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ