Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp772442pxa; Wed, 12 Aug 2020 13:01:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1sVIwKnFsfkcBtsP1kpmKIlwDVqvR5pN7Frc020mVme09/Mq5eSQV556S75Y4Z8PQ/8+j X-Received: by 2002:a05:6402:3135:: with SMTP id dd21mr1613354edb.123.1597262484400; Wed, 12 Aug 2020 13:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597262484; cv=none; d=google.com; s=arc-20160816; b=Hxb/ifeenJOJN9Mi9bNQTs14dIVMM17X6Rlo1/Yco3fgRL23SCR0vTXo6ih98+Aj8y afyWNknSd8Xsi6EhoUxdZnpH+tr4RTHOAcsKKzD+8KGW2pnEv0ILEB6Atqk1/GnuCMcC +D4XezKRfVQ8HJCuh8GvqL4tiDItvyrnPNIYo5U+qM0y1YTaH0Wp0UNoz5VzBZ3Au3yx qfTIV+o0AfTWoOusxvUC/0xGYZrvOZd00QNX74D82hQtXAcy64cV3HbLHZhXfRGlyZpV yGGw4WeTwumGQrggSnTaxguTmCnDMgMxfIQrr01aHsMSEKkOtTSEaCcauIHe6XTZNbq9 YZzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KrxCJwFdZ4E7XIwBDMBb4m+4zd0Ve77BHKwErS67suU=; b=fBfeCvCv7HEpBXtFNW9V1JGd1U0lGiGwXrzIKDrBHnTO1xQetTGEKehQLKthuKKdxp T56miNDk88Xm+u8otZVSmKUTR5HDktZhPO+lC49Q0L7T/qlDK1U7+2TqVHX7Q3iZUgwu OJ6Wa59yotFHLRS1jfUyQ+o029Mrg6lU4RqiA+lY9ei8L5xQkvyw8aYwsy/HE+5hphcu MiO3bxNB51Ubg5P08z1Kh4JEfbr4SbZZ12jLtm1LZ9SVGs1+kv5tLpgd0LhxpfDQBzV2 X/V4il49VuSWgd6sKIOCN7QlOQo+BOKu36WNYxj1msBemLB8WfMGTqCzo/BrJcpuKje5 qu5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YeE8QRql; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o3si1843064ejm.346.2020.08.12.13.01.01; Wed, 12 Aug 2020 13:01:24 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YeE8QRql; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727079AbgHLUAa (ORCPT + 99 others); Wed, 12 Aug 2020 16:00:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbgHLUA2 (ORCPT ); Wed, 12 Aug 2020 16:00:28 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 928DCC061383 for ; Wed, 12 Aug 2020 13:00:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KrxCJwFdZ4E7XIwBDMBb4m+4zd0Ve77BHKwErS67suU=; b=YeE8QRqlJhzEqIYndaE2AU++E4 COMk0ELdWfMnxUsdgn0u/iPpX2aksP1HZb376gW7opp/mgt6vwNRw9ZJB4MVTDR8jIefz3Pby3vZj Dg8K1xb5tbQ+VFscuz1bpgR6Ve5AOaCRYqpr5dyeMswPCn6rxhlKtQdqeh8KRAky5sRYzc9c8Luam 9JNU6xMxTXFcjHyCoDdVtKlbHGsPzN9AIf2QKEUcWR/809P5eeyQbq5qaU8h80ARxIQW2y8Ngt/VO 4WfaQCRB9LX9MLiXJg2CYlpj3Civ/KtR+JhN5u5bV0x9o4kEgds0cwZoh4dUFiH1jbn2YS27qvWZk cabxMGSA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5wv7-00021Y-6W; Wed, 12 Aug 2020 20:00:21 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 1E3A8980C68; Wed, 12 Aug 2020 22:00:19 +0200 (CEST) Date: Wed, 12 Aug 2020 22:00:19 +0200 From: Peter Zijlstra To: Ard Biesheuvel Cc: Jessica Yu , Szabolcs Nagy , Will Deacon , Mauro Carvalho Chehab , Linux Kernel Mailing List , Thomas Gleixner , Kees Cook , Josh Poimboeuf , Miroslav Benes , Mark Rutland , nd Subject: Re: [PATCH v2] module: Harden STRICT_MODULE_RWX Message-ID: <20200812200019.GY3982@worktop.programming.kicks-ass.net> References: <20200811163427.6edbf343@coco.lan> <20200811145524.GE2674@hirez.programming.kicks-ass.net> <20200811172738.2d632a09@coco.lan> <20200811160134.GA13652@linux-8ccs> <20200812104005.GN2674@hirez.programming.kicks-ass.net> <20200812125645.GA8675@willie-the-truck> <20200812141557.GQ14398@arm.com> <20200812160017.GA30302@linux-8ccs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2020 at 06:37:57PM +0200, Ard Biesheuvel wrote: > I know there is little we can do at this point, apart from ignoring > the permissions - perhaps we should just defer the w^x check until > after calling module_frob_arch_sections()? My earlier suggestion was to ignore it for 0-sized sections.