Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1533089pxb; Tue, 8 Feb 2022 21:21:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQebu17nFFoxrmvsk9Tvru9a/Ez8yfjHqSM6YoQcfTtvCrlE4qsFiGe4t8usdrJcvE4Dhe X-Received: by 2002:a63:e16:: with SMTP id d22mr586171pgl.625.1644384101443; Tue, 08 Feb 2022 21:21:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644384101; cv=none; d=google.com; s=arc-20160816; b=ewoMH7hQ4wEGvkHx+M+MfFqg+JIPk/PKSL/4N8BYVyvS2ZRoSdFMqKvhSNMx+oh/1a CETvxAaIFRJhN3qyL+yYVHTpeSI+VLlgIdHlvHYAMdrjZ2/0r5ry6MrVO3NSwPPiTOS/ COjSV2EUN9FVGKR8sD9mbrwW0H71wVxuj2Iq89chbubwWRZJOHSBN3nBMGzZLTK+i0eW tz2q7/oYjD20TAlo67Hy/G7r7OQZsLLBqBwpICvba9FVU/CmEEktuXG18KT1aF0+Cp87 VYmoRxhht9xHKr6zia3n788tpByMMwLqthTE4qv41IZecNqaa6rz54uLstEP46Am8lT4 cKLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=wGN0aCaJ6VNVrO8pLls0lDkqT7d3PIX0pXAwRUixJPc=; b=UCyKOIxhlPCRgfaXcGX/mbmIj50p+lO2c6vEfjYSRdYqY+5apFed6tCB8nOyCgMuk+ w4D7K426abEPc7Co2CNkcnu2gmRqAm6KXTjN5Etjgt17nxKqZa+fgfQY0OTIKvX+ZYYL YxUJgFC7ae6WwuFw1lo34GzsqgyFOUcKbzJlilw2ibj1GMHgdIuAotYr7AW66mdGbQLV 2xD9BRMnm0AFQBb2ktOWbJYpX4rEyszKg0TEv2bIkRozWb2KLsjzlyL8ivrrn9x3o40X 1Ri5+lbX9uN5Fk7tj2ksepZTS1vFVT7dD9NDf1gh0NIGDvnJvt8bP8YgEZr+J1lSgQ5P RdAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Bkfy/5bM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 128si10225570pgb.541.2022.02.08.21.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 21:21:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Bkfy/5bM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5316BC03BFDA; Tue, 8 Feb 2022 21:21:11 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245498AbiBFQzB (ORCPT + 99 others); Sun, 6 Feb 2022 11:55:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238545AbiBFQy6 (ORCPT ); Sun, 6 Feb 2022 11:54:58 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 680E7C043185 for ; Sun, 6 Feb 2022 08:54:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644166496; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wGN0aCaJ6VNVrO8pLls0lDkqT7d3PIX0pXAwRUixJPc=; b=Bkfy/5bMfK/X3aVgBorpjHaLrl3ybZb3wgkQZDXQQPpYOH7cUTr23e7X0qntvpETnUyCwp udQcqkPb3EtTOpWx9Vifg/Uq7/ZuYLy473dqxHij9e39wlAqLmB44olqoDSEUpcQcaSpv8 0P+FTDCRFEERXynZj5qVGWIC0swQhu8= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-322-7HInp5mpMxGu5pnXhyA1qQ-1; Sun, 06 Feb 2022 11:54:55 -0500 X-MC-Unique: 7HInp5mpMxGu5pnXhyA1qQ-1 Received: by mail-wm1-f70.google.com with SMTP id s187-20020a1ca9c4000000b0037bb8547d64so2075085wme.0 for ; Sun, 06 Feb 2022 08:54:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wGN0aCaJ6VNVrO8pLls0lDkqT7d3PIX0pXAwRUixJPc=; b=NCYvpgv3DLfeqJITEIXqVgHraYdA5w1aZQDEZXraOve+i5i/TAo5wC0cs6x5Qr/wkO dU2UokeVxuKhYYsRCSpnEBuFtQ3sRpx2Ny+UT6OCb7qMfbH3Lcfx9ZnEbP3KhPtqADWf vS7C5Dz2QEMZMLekdX88zxIDyY0zHuWQTr7ygyVKFYPh7XQ236wSNiMALPMhj7hppd6r BrNr7etH/mJ2dufQ8PbmMcyXUTJR0IvI5MrdirHcqoMapTuFWEj+whP/Rh+VT3HAmSgJ qy0krkGZrja94bXoGQ0iXAl8xr9oMWBeOJR3xxD6pDqv4edu0W+nhUM4T7L5SJOYLMZC hU4Q== X-Gm-Message-State: AOAM532MfQn3tzU9Bj7rPM5vCbS3iYcxICvSuYPmuPo/7Lk2Ek+nw3dL f617z5a5Jq17fTXK2Tts3MhRb8NMtsbC3cdXTpT82/3h0rU5zmGQEzGaldqMCvmlxUgKglHNiyc byBv1O4+Ve5r7MAEWwpNi5Zo= X-Received: by 2002:a05:600c:3584:: with SMTP id p4mr7346532wmq.69.1644166494012; Sun, 06 Feb 2022 08:54:54 -0800 (PST) X-Received: by 2002:a05:600c:3584:: with SMTP id p4mr7346509wmq.69.1644166493777; Sun, 06 Feb 2022 08:54:53 -0800 (PST) Received: from localhost (cpc111743-lutn13-2-0-cust979.9-3.cable.virginm.net. [82.17.115.212]) by smtp.gmail.com with ESMTPSA id p15sm7506809wrq.66.2022.02.06.08.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Feb 2022 08:54:53 -0800 (PST) Date: Sun, 6 Feb 2022 16:54:52 +0000 From: Aaron Tomlin To: Christophe Leroy Cc: Luis Chamberlain , Michal Suchanek , "cl@linux.com" , "pmladek@suse.com" , "mbenes@suse.cz" , "akpm@linux-foundation.org" , "jeyu@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-modules@vger.kernel.org" , "live-patching@vger.kernel.org" , "atomlin@atomlin.com" , "ghalat@redhat.com" , "allen.lkml@gmail.com" , "void@manifault.com" , "joe@perches.com" Subject: Re: [RFC PATCH v4 00/13] module: core code clean up Message-ID: <20220206165452.ytpk4epltqr6pgyu@ava.usersys.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 References: <20220130213214.1042497-1-atomlin@redhat.com> <1ae3a950-8c1e-a212-e557-8f112a16457d@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1ae3a950-8c1e-a212-e557-8f112a16457d@csgroup.eu> X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2022-02-03 18:01 +0000, Christophe Leroy wrote: > I have another comment: I think patch 5 should be dropped. Fair enough. > Having something behave based on a CONFIG_ARCH_HAS_SOMETHING item is > wrong. It is not because a plateform selects > CONFIG_ARCH_HAS_STRICT_MODULE_RWX that the module core should behave > differentely than with other platforms as far as the user has not > selected CONFIG_STRICT_MODULE_RWX. > > And the topic here is wrong. It is a coincidence if making that stuff > depend on CONFIG_ARCH_HAS_STRICT_MODULE_RWX works. This is just because > the only architectures that do the module allocation without Exec flag > are architectures that have also selected > CONFIG_ARCH_HAS_STRICT_MODULE_RWX. But it should also work on other > architectures. > > I don't know exactly what was the motivation for commit 93651f80dcb6 > ("modules: fix compile error if don't have strict module rwx") at the > first place but it is just wrong and we should fix it. > > module_enable_x() should work just fine regardless of > CONFIG_ARCH_HAS_STRICT_MODULE_RWX. The above does make sense, to me. Kind regards, -- Aaron Tomlin