From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D13D7CFD376 for ; Sun, 30 Nov 2025 17:42:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C37010E267; Sun, 30 Nov 2025 17:42:38 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="GvpNvrV2"; dkim-atps=neutral Received: from mail-yx1-f52.google.com (mail-yx1-f52.google.com [74.125.224.52]) by gabe.freedesktop.org (Postfix) with ESMTPS id 00B5210E1A0 for ; Sun, 30 Nov 2025 17:42:36 +0000 (UTC) Received: by mail-yx1-f52.google.com with SMTP id 956f58d0204a3-640f2c9ccbdso2649121d50.1 for ; Sun, 30 Nov 2025 09:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764524556; x=1765129356; darn=lists.freedesktop.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=haLVYkWZOmKHtpHDbk/b7m3f6L/rKnHvLY96AT2R3kQ=; b=GvpNvrV2kPOdAF6F0Gfg6I1st6gbKXuEyfYwZJWUTOJBXgVZL3+l1rva70wJtaxnUb gnev2blzc0IHC7TquZCMPejP5LS7QzbF7X1ywYtGOyYBDIno2sJTC+OyzE/+/z7szE0/ aacbJbAwZJBHshzHA/Tg2PNNh07+jOJvKZ8gT6I4YIlUZ244piz6s1DKP5Uad3uBdm4J QqE/4vcgJULXU0cH0aExEzFZ8lVOH7z34XB9qxJRF8XGE7lKSXYKqvPay0ONJ0XThulA AoTQ53+v1ysElZWuK1ZndfdDnUS6L4Omiq+3wtgAo6DgdOid3XZhTX9f7tyjoBujGqdE lCGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764524556; x=1765129356; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=haLVYkWZOmKHtpHDbk/b7m3f6L/rKnHvLY96AT2R3kQ=; b=fElTEYHgAXsA2AKvGTcfXhI5HJWpG9pjnTBpwffmZdroO1Z6KmIxsEJNjs65ZUeuue hWEMAI2PFcq5NKKLizD1PZqc+yYOcKO+ojYSOlAWRtNLA+dETRdUtx6bCPRS/u89CNov mh9fZ9tz0Z9G1V40wXEyRArf0pQN3rbb7VZ45r26R68U/8PoKiaw46q7nX3UAWPsvjoE 20VGle7Nv+PTBX1SuoK/D/hWlnOfZVtzdryeBC70vHOjJQaRqYMW2o1bimsSIecjF7kC C4VSEVoMjs3pLmCONncwieYXVz5QQXaPUi8h3nwBw5ufwDJ4rlBxn7F4Azd2It+SFcbb x1lA== X-Forwarded-Encrypted: i=1; AJvYcCU8tyFqQBG9D64oI5x/H0xX3WSXrn8lV/Go4AM2zv/vv6f39OYce62Ea9lHQP+VTqyKVKp3mhKqIf8=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yy+NYFEMwyTxx/hAj+p3fSaJfTr6nKrY9PW82rysQRN9yvAYyZR Aa0odkyQEqfxpTa8bmzYRHk9WHxWVtj1EyUTa94/0CKHtTbygujIgmzA X-Gm-Gg: ASbGnctdMVzD1qdiAUP+VvziE30B/GbVZEvNZodr44ZjwxA+GSFz0zZ/cauZsyQbtkR sD8X1EbEGoAwwYv+wIhZ6O4N3XKPyr89StTGJHYOWKKUu83Xte3G6cgkrgs9XxhF10jXN3CPo2o y7904xJL3DS4kIdaXHCPWbB2gevvCbtjCI2LjwtbsjmuSzuTR6QX8bWgwLEtkN8zDr5BE6Ddy5v C/dhPf/aW5szDjQdGEGCFTbiQo519yfPKtZMfYasgFbki0bjp4d2Fdt2yq2euFT921vJtg9CKCY /6S7WtX5+a67Nx+SBMPsielOkNx9KhaoPvKQiHbel0Sv1MLz7AQlafP+/T3wL7c4ldLu7B/36tT j3D732Cy3gm4Ip+H0MklKmnt94K7M5SIQ0UCBRCOKfMOREO0pgcK13jVle//1RZqDOypsuDcIUP iBuqd4L/U= X-Google-Smtp-Source: AGHT+IGF0tX2hZjw3AGlknQ4v+/l0LWFo5zB2gFptAlJjQKMRQgk4Vh85OcdRysXZbzgzlA3JZDqcQ== X-Received: by 2002:a05:690e:14c4:b0:63f:b2ca:80e1 with SMTP id 956f58d0204a3-6432913f51dmr15585557d50.0.1764524555929; Sun, 30 Nov 2025 09:42:35 -0800 (PST) Received: from localhost ([2601:346:0:79bd:b42b:4ad9:10af:cabc]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-6433c443ce5sm3870009d50.12.2025.11.30.09.42.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Nov 2025 09:42:35 -0800 (PST) Date: Sun, 30 Nov 2025 12:42:35 -0500 From: Yury Norov To: Randy Dunlap Cc: Andy Shevchenko , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Ingo Molnar , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , Petr Pavlu , Daniel Gomez , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Andrew Morton , linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-modules@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] kernel.h: move VERIFY_OCTAL_PERMISSIONS() to sysfs.h Message-ID: References: <20251129195304.204082-1-yury.norov@gmail.com> <20251129195304.204082-3-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Sat, Nov 29, 2025 at 10:19:29PM -0800, Randy Dunlap wrote: > > > On 11/29/25 12:24 PM, Andy Shevchenko wrote: > > On Sat, Nov 29, 2025 at 02:53:01PM -0500, Yury Norov (NVIDIA) wrote: > >> The macro is related to sysfs, but is defined in kernel.h. Move it to > >> the proper header, and unload the generic kernel.h. > > > > Tough guy :-) > > I hope it builds well in your case. > > > > FWIW, > > https://lore.kernel.org/lkml/20220603172101.49950-1-andriy.shevchenko@linux.intel.com/ > > https://lore.kernel.org/lkml/20240212115500.2078463-1-max.kellermann@ionos.com/ > > https://lore.kernel.org/lkml/20240215093646.3265823-1-max.kellermann@ionos.com/ > > > > Assuming it builds in allmodconfig, allyesconfig on x86_32/64 and arm/64 > > Reviewed-by: Andy Shevchenko > > I don't build allyesconfigs any more (final? linking takes too long). > It builds successfully for arm64 allmodconfig, arm allmodconfig, > i386 allmodconfig, and x86_64 allmodconfig. > > And the source files that use VERIFY_OCTAL_PERMISSIONS() all build successfully > (which means that they possibly include indirectly, i.e., > by luck). There aren't many of them, so I checked: > > arch/arc/kernel/perf_event.c: arc_pmu->attr[j].attr.attr.mode = VERIFY_OCTAL_PERMISSIONS(0444); > INDIRECT > drivers/edac/thunderx_edac.c: .mode = VERIFY_OCTAL_PERMISSIONS(_mode), \ > INDIRECT > drivers/media/platform/amphion/vpu_dbg.c: VERIFY_OCTAL_PERMISSIONS(0644), > INDIRECT > drivers/soc/aspeed/aspeed-uart-routing.c: .mode = VERIFY_OCTAL_PERMISSIONS(0644) }, \ > INDIRECT > fs/xfs/xfs_error.c: .mode = VERIFY_OCTAL_PERMISSIONS(S_IWUSR | S_IRUGO) }, \ > INDIRECT > include/linux/moduleparam.h: VERIFY_OCTAL_PERMISSIONS(perm), level, flags, { arg } } > INDIRECT > > so all of them got lucky. :) > > Acked-by: Randy Dunlap > Tested-by: Randy Dunlap Thanks, Randy. This series was tested by 0-day and LKP. 0-day runs allyesconfig, as far as I know. It only sends email in case of errors. LKP is OK, find the report below. All but XFS include it via linux/module.h -> linux/moduleparam.h path. XFS has a linkage layer: xfs.h -> xfs_linux.h-> linux/module.h, so it's pretty much the same. I think, module.h inclusion path is OK for this macro and definitely better than kernel.h. Notice, none of them, except for vgpu_dbg, include kernel.h directly. Thanks, Yury tree/branch: https://github.com/norov/linux stack_magic branch HEAD: d8dffbf7bce40e2fbfe077f9c9f4a3471786666f tracing: move tracing declarations from kernel.h to a dedicated header elapsed time: 1669m configs tested: 103 configs skipped: 2 The following configs have been built successfully. More configs may be tested in the coming days. tested configs: alpha allnoconfig gcc-15.1.0 alpha defconfig gcc-15.1.0 arc allnoconfig gcc-15.1.0 arc defconfig gcc-15.1.0 arc randconfig-001-20251128 gcc-8.5.0 arc randconfig-002-20251128 gcc-15.1.0 arm allnoconfig clang-22 arm am200epdkit_defconfig gcc-15.1.0 arm aspeed_g5_defconfig gcc-15.1.0 arm randconfig-001-20251128 gcc-14.3.0 arm randconfig-002-20251128 gcc-8.5.0 arm randconfig-003-20251128 clang-22 arm randconfig-004-20251128 clang-17 arm s3c6400_defconfig gcc-15.1.0 arm u8500_defconfig gcc-15.1.0 arm64 allnoconfig gcc-15.1.0 arm64 randconfig-001-20251129 clang-22 arm64 randconfig-002-20251129 clang-22 arm64 randconfig-003-20251129 gcc-8.5.0 arm64 randconfig-004-20251129 clang-22 csky allnoconfig gcc-15.1.0 csky randconfig-001-20251129 gcc-15.1.0 csky randconfig-002-20251129 gcc-15.1.0 hexagon allnoconfig clang-22 hexagon randconfig-001-20251129 clang-22 hexagon randconfig-002-20251129 clang-22 i386 allnoconfig gcc-14 i386 randconfig-001-20251129 gcc-14 i386 randconfig-002-20251129 gcc-12 i386 randconfig-003-20251129 clang-20 i386 randconfig-004-20251129 gcc-14 i386 randconfig-005-20251129 clang-20 i386 randconfig-006-20251129 clang-20 i386 randconfig-007-20251129 gcc-14 i386 randconfig-011-20251129 clang-20 i386 randconfig-012-20251129 gcc-13 i386 randconfig-013-20251129 clang-20 i386 randconfig-014-20251129 clang-20 i386 randconfig-015-20251129 gcc-14 loongarch allnoconfig clang-22 loongarch defconfig clang-19 loongarch randconfig-001-20251129 gcc-15.1.0 loongarch randconfig-002-20251129 gcc-14.3.0 m68k allnoconfig gcc-15.1.0 m68k defconfig gcc-15.1.0 microblaze allnoconfig gcc-15.1.0 microblaze defconfig gcc-15.1.0 mips allnoconfig gcc-15.1.0 nios2 allnoconfig gcc-11.5.0 nios2 defconfig gcc-11.5.0 nios2 randconfig-001-20251129 gcc-11.5.0 nios2 randconfig-002-20251129 gcc-11.5.0 openrisc allnoconfig gcc-15.1.0 openrisc defconfig gcc-15.1.0 parisc allnoconfig gcc-15.1.0 parisc defconfig gcc-15.1.0 parisc generic-64bit_defconfig gcc-15.1.0 parisc randconfig-001-20251128 gcc-14.3.0 parisc randconfig-002-20251128 gcc-15.1.0 parisc64 defconfig gcc-15.1.0 powerpc allnoconfig gcc-15.1.0 powerpc pcm030_defconfig clang-22 powerpc randconfig-001-20251128 gcc-11.5.0 powerpc randconfig-002-20251128 clang-22 powerpc64 randconfig-001-20251128 clang-22 powerpc64 randconfig-002-20251128 gcc-8.5.0 riscv allnoconfig gcc-15.1.0 riscv defconfig clang-22 s390 allnoconfig clang-22 s390 defconfig clang-22 sh allnoconfig gcc-15.1.0 sh defconfig gcc-15.1.0 sparc allnoconfig gcc-15.1.0 sparc defconfig gcc-15.1.0 sparc randconfig-001-20251129 gcc-8.5.0 sparc randconfig-002-20251129 gcc-8.5.0 sparc64 defconfig clang-20 sparc64 randconfig-001-20251129 gcc-8.5.0 sparc64 randconfig-002-20251129 gcc-14.3.0 um allnoconfig clang-22 um defconfig clang-22 um i386_defconfig gcc-14 um randconfig-001-20251129 clang-22 um randconfig-002-20251129 gcc-14 um x86_64_defconfig clang-22 x86_64 allnoconfig clang-20 x86_64 defconfig gcc-14 x86_64 randconfig-011-20251129 gcc-14 x86_64 randconfig-012-20251129 gcc-14 x86_64 randconfig-013-20251129 gcc-14 x86_64 randconfig-014-20251129 clang-20 x86_64 randconfig-015-20251129 gcc-12 x86_64 randconfig-016-20251129 clang-20 x86_64 randconfig-071-20251129 gcc-14 x86_64 randconfig-072-20251129 clang-20 x86_64 randconfig-073-20251129 gcc-14 x86_64 randconfig-074-20251129 gcc-12 x86_64 randconfig-075-20251129 gcc-14 x86_64 randconfig-076-20251129 gcc-14 xtensa allnoconfig gcc-15.1.0 xtensa randconfig-001-20251129 gcc-10.5.0 xtensa randconfig-002-20251129 gcc-14.3.0 xtensa xip_kc705_defconfig gcc-15.1.0 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki