Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3844568pxb; Mon, 21 Feb 2022 06:52:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUNrSv+2Zvm8ZVTESSzVQK5WELFM3ybRfJjrHQ1SH+NfZY8l+Rfs3vrJHaYIsuvMOCxJgu X-Received: by 2002:a50:9dcf:0:b0:410:80df:d864 with SMTP id l15-20020a509dcf000000b0041080dfd864mr21670463edk.270.1645455170330; Mon, 21 Feb 2022 06:52:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645455170; cv=none; d=google.com; s=arc-20160816; b=SO+CJ2ZieZ674YJdQG1zOnsvi6D+CpMrwMu+wzivJL8KYsilFKm0T8w8ddS0vOmJKD s8kRF+KPuf2WczUrr1RAyQv4aOcS9Md7wrfHg6k/cKOLoE5sbsQW2LrsaSInHSqUfTvU rgCJOuu6xXtTD6r5NO3HQ3KYCgWcy1cPXWj8meU3gk9wG3KTtyMbP+MuvnqY5q3oG+5w lpfmCeNUSzTYy/MCONKqYTNeeurMLa3xn8JIqIVEMNCyICV2gfFJGmcokxgoLCGKBfe6 1svqC72m+V63HOXvpWNQcahP25OCvDdS+2hP29Ree/RGqgpGFeUJaT3dQHXbY8Zsjpj3 UzsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=XZrTlvfXotnswsvjd0YUM1RHyK8H1Vt0nzlWoZF1MZ8=; b=bepNxvujKgdf+SV1+TCXaZZSHjFFh/SS0YbOonvsIajDHzWFOfFg08Y/cStqvHHp+C xD3pS6H1TU5szLul2Aq5AUBz3NDy7hnDAXdO7/U1mGWkOL/sAq3wbGT0mgg6UsuNgXs4 AsNRZ0M9YqBFD2cVbZK7yPlxJ+3K30j/v/cUfvFDDfSg4+zRbK6vy7o+C4xybP3pHVZD Pys0tHpj6L0Q0Hgcm9GCxT8qUmoo6Dha4ts5FM0xzCrQZQIj6CTzPLSgKoJqTEqX+e8w vklGQqZAkUiCLR76qWUQQsfk1xmOiQT3qHo4zm8u3A3yAgOArq3icYVUKPHJB/oRNJGg BDBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jpc6N6pQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e7si8807399ejz.851.2022.02.21.06.52.27; Mon, 21 Feb 2022 06:52:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Jpc6N6pQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353504AbiBUKRM (ORCPT + 99 others); Mon, 21 Feb 2022 05:17:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354640AbiBUKQe (ORCPT ); Mon, 21 Feb 2022 05:16:34 -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 A18312B19A for ; Mon, 21 Feb 2022 01:35:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645436117; 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=XZrTlvfXotnswsvjd0YUM1RHyK8H1Vt0nzlWoZF1MZ8=; b=Jpc6N6pQduzbigZ7mQbBny61HM+t4qxqu6QTMg+appmLOIA294AePnp2rwz3pEOSgbIzMN u3ORcrEqylLJSg0aW1ZZgS3k4DVIP6peIB1rrq9g5t1PjmG2kaFcaQe5BHGSOJxMLayGZ3 /3hHLcAHXfBkmToLAly0OneMfgaeojc= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-512-XyHzEgC7NDOmDWIpKjZLOg-1; Mon, 21 Feb 2022 04:35:16 -0500 X-MC-Unique: XyHzEgC7NDOmDWIpKjZLOg-1 Received: by mail-lf1-f70.google.com with SMTP id z25-20020ac25df9000000b004435ff4bf94so2380451lfq.16 for ; Mon, 21 Feb 2022 01:35:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XZrTlvfXotnswsvjd0YUM1RHyK8H1Vt0nzlWoZF1MZ8=; b=VYQa2EQ5BqeOLEa4c3cYfbNtWX3kLrfYT3xx50J1HvMTxbAr3aZ0K6KbneZhAgsc/c reLbw0XMJpFnYMdZNRr2KVAE55heM4MAskYnS16aCqVK9vK9P2WmJmbpv+wh7PrTkKmj UYUdR4N5RLvXXMRzDqryKU1DUTDWRUOr8gLVolHSa8hiAIXg26aiB9T6LEzIpMj1/pFu u9acMfS8ejo2OzCH8IR5tVf6YxFd9Qsbd4QCUog8QuRHuzEo0UAk/HW69rovMY91wEYc 6z60DfhkrxGYsuEm0+ztTZ73nK64hWaVohJBsQWXHbC/3IYuPReOGRAq/upVFMlv9pY7 P7sg== X-Gm-Message-State: AOAM533ZEQyKfa3QZYdF9+r8IwomoHmO+47wWDOBJBggK/5fxeVnuTj1 eFUKqZuYDBx7NuZI9L81XgpihoSizNDH/QcHJc9G4RghiwggFc4B/Q6M6EuDabMeA6UiyNBP98L vr47HKJsdx11d6ReeSllaKMu9LdGfQLNhtrgrE30= X-Received: by 2002:a05:6512:308b:b0:443:5f54:dcae with SMTP id z11-20020a056512308b00b004435f54dcaemr14171284lfd.79.1645436114931; Mon, 21 Feb 2022 01:35:14 -0800 (PST) X-Received: by 2002:a05:6512:308b:b0:443:5f54:dcae with SMTP id z11-20020a056512308b00b004435f54dcaemr14171262lfd.79.1645436114662; Mon, 21 Feb 2022 01:35:14 -0800 (PST) MIME-Version: 1.0 References: <20220218212511.887059-1-atomlin@redhat.com> <20220218212511.887059-7-atomlin@redhat.com> <0555ad08-365c-ae49-0f6b-973fd16866c9@csgroup.eu> In-Reply-To: <0555ad08-365c-ae49-0f6b-973fd16866c9@csgroup.eu> From: Aaron Tomlin Date: Mon, 21 Feb 2022 09:35:03 +0000 Message-ID: Subject: Re: [PATCH v6 06/13] module: Move strict rwx support to a separate file To: Christophe Leroy Cc: "mcgrof@kernel.org" , "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" , "joe@perches.com" , "msuchanek@suse.de" , "oleksandr@natalenko.name" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,WEIRD_PORT autolearn=ham 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 Mon 2022-02-21 06:31 +0000, Christophe Leroy wrote: > CC kernel/module/strict_rwx.o > In file included from ./include/linux/build_bug.h:5, > from ./include/linux/container_of.h:5, > from ./include/linux/list.h:5, > from ./include/linux/module.h:12, > from kernel/module/strict_rwx.c:8: > kernel/module/strict_rwx.c: In function 'frob_rodata': > kernel/module/strict_rwx.c:16:17: error: implicit declaration of > function 'PAGE_ALIGNED'; did you mean 'IS_ALIGNED'? > [-Werror=implicit-function-declaration] > 16 | BUG_ON(!PAGE_ALIGNED(layout->base)); > | ^~~~~~~~~~~~ > ./include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' > 78 | # define unlikely(x) __builtin_expect(!!(x), 0) > | ^ > kernel/module/strict_rwx.c:16:9: note: in expansion of macro 'BUG_ON' > 16 | BUG_ON(!PAGE_ALIGNED(layout->base)); > | ^~~~~~ > cc1: some warnings being treated as errors > make[2]: *** [scripts/Makefile.build:288 : kernel/module/strict_rwx.o] > Erreur 1 > > > > You have to include Christophe, Strange, I have not seen this before. Locally, looking at kernel/module/strict_rwx.i it is eventually included. Anyhow, you are right. Also, it will not hurt due to the multiple-include optimisation found in include/linux/mm.h. Kind regards, -- Aaron Tomlin