Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1898621ybg; Fri, 5 Jun 2020 00:00:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAfh/gULq2TQUyb3Mf/2PT+L3rZFr5k2wH8CagNUEEhrVdg6MdTZskZZgflNOiEznO3iuV X-Received: by 2002:a17:906:2507:: with SMTP id i7mr134383ejb.419.1591340438605; Fri, 05 Jun 2020 00:00:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591340438; cv=none; d=google.com; s=arc-20160816; b=PwpvRTL3PbFqM6izsjdAduGd58tJFzoIomJZMA8G832kjozzbOrt+g8ds0oKCkQwmY +ApJZVql7LwMAAL/yFAuQ1yG9VvuO22O1ZV3czydozQHjKurk/1Jsl9/094willAJMyD 8Ujz04eOFwJ50HuT98NG2EGFcsojxWinSLDk+1L+oh5KbfL7RI4a1kRrMKz6JR9agLFz 5xobnDsW8Qc55gg246uSNeaNJME+qe5d/3PIu9dp8reke4ADJ2p2t98X82dOpYfvo9Mm Y3qvCtoX+pFfY1wMRhcgJvxn4Lx6emsupuzRuTMxnpm4nxR6ePn5Exh7q3ExYp0kc7jk 4jyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=di1OuwF3TyLgfr3Z2tVwJS9eFNqdtVGHtAjY/SdExYU=; b=r47bUZj9KnuhRqHj0CjN48QvTUq+hSR6hwnx2tvTu3zVGvORjwFuY2UbX8+4lsmsh/ 0Vi7kKkF6fXXnNMQwLmsn9pLoIPxhI8XIS4IIZCuXhOSCrfOOEL0Gkts2XS8VUS8oNAV yiE3ILo1JhW4C2c9PdzOgmBH+1eVwaHPhs4OYJpYvnDKh5D37yuyCefnORX+N3/HY0si oCq/kHsBjGuhUf2RWdz+dpMcoF+182kXbWKKpXMzy+rqdFEefiLtQJxFbETXNhBBJ6A7 YvgTRtUnqjnItBihfjBA7TEe9TrXti2YMTv+CuDujRPYc6lrAdbOKw7M3vAHI2qEapTi /dFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2j6uEMWb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f24si3118099ejx.91.2020.06.05.00.00.15; Fri, 05 Jun 2020 00:00:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2j6uEMWb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726099AbgFEG4R (ORCPT + 99 others); Fri, 5 Jun 2020 02:56:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:53822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgFEG4R (ORCPT ); Fri, 5 Jun 2020 02:56:17 -0400 Received: from pobox.suse.cz (nat1.prg.suse.com [195.250.132.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 2063A207ED; Fri, 5 Jun 2020 06:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591340176; bh=Fueqi0VOnS4+2D9oOQ/CGjLpvS+cOsGXs8w5iOdBcB0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=2j6uEMWbPUNJk8U83wz+VEGBDqTNxoRXGj8jeev6zL+SaPUgKnAyCgTXrutW4Jzun OxK9j6H8oCO3mCE1pe01pq8bipzT5aamc3pXaiZ7tSHl2t+j3YecG1rzi7Cv7baIhS obWDnxD9KHlkrr3Ppfw1rSl5UT3xK7TENeIZOj0w= Date: Fri, 5 Jun 2020 08:56:12 +0200 (CEST) From: Jiri Kosina To: Stephen Rothwell cc: Josh Poimboeuf , Miroslav Benes , Petr Mladek , Joe Lawrence , Jessica Yu , Linux Next Mailing List , Linux Kernel Mailing List , Peter Zijlstra Subject: Re: linux-next: manual merge of the livepatching tree with the modules tree In-Reply-To: <20200605144557.4f8e2a42@canb.auug.org.au> Message-ID: References: <20200508180524.6995b07e@canb.auug.org.au> <20200605144557.4f8e2a42@canb.auug.org.au> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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