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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D542DCE8346 for ; Mon, 30 Sep 2024 13:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XLXgo3xwUYkYQovXaH0RD4Wc4V/DCRWUgmcWvuAjUvs=; b=gFjvgU96szYpP5 5DW0WUb33Yw3Xr2MRywwtYfyPNjJaJUMZo3qQLF1IL+sNFomARhDTlssWeWqvSxYARiB/gSvjQDxQ Y+LtwWzkcUeiBqiwcWTlVOpNkt4lt5BvfZGdJ30fTBCCvtH2Jhg9O7zKUMMcTFEBZlA5TAlVUbC1U VCYP7kK5wUL34c3NDM3Jprsv27ZuySIQezM7XSUNemrlZCxjuX2k9WEyT+NA1E0zGEorgfsEZiZZd T09tQI0J+H8jdpWqKXeP+XxFN2QIMEaYftOCcSR33+u2AmmyRM4640FvpmktDB7QoVueJXG2PWCj6 r9Erq2AjMi3SjfyCdwNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svGAy-0000000HDe8-0nyQ; Mon, 30 Sep 2024 13:10:56 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svFeJ-0000000H4lO-2Rjm for linux-mtd@lists.infradead.org; Mon, 30 Sep 2024 12:37:13 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-42cbbb1727eso38090415e9.2 for ; Mon, 30 Sep 2024 05:37:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727699829; x=1728304629; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=F/SrlIJXoXLKGiLt5PvQw/mV4o2zsSYJUePPb/Z+Dd8=; b=S7wUeiy3ibZYWjHHrbLxM+Pgn6rgCK5O8rgwSZ+tvbYoW06Zp4NjQmKEoVP1BSvPY8 ga4HMmK7Fks5GSsUjx5G9t15hPpIwoNRbvfA1asdJL4hZPf/jsWu8cwt2Dul0lKMhpck DXWp9MDAqYhSSExO6RvknIE1BzF8OilTmnashOO11AKRua9iluwoqOIot4cW6qz8nXMM T3EG9Q3XBhKJsoT2TkYiNTwYk/IC/QwNJfsCkMQSdGxUSYcFCzl/PfpcvUp1HYaxDzno Zdck5XQJHKCKJKQZ2sUG9zuQhehGjmxuqPTygcpwJlzXbMI6dT9RIfb/OXQR9aGt7N9G hsVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727699829; x=1728304629; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F/SrlIJXoXLKGiLt5PvQw/mV4o2zsSYJUePPb/Z+Dd8=; b=URk1G3SuoXYcliFNE+39wh6F3FimBsHBxu+K+8zn+e5xQBuL+XSoX7uEwgtwwvBX2X 6ser80PQPu8anvvUTQLRcKlNhGOvqB5mz7bG7nNbtBi4alYDG+IEOiXLxLLVSaJWgRlZ fyd27g1AtoETUTMjlXRyRJWRLfuccAyCe398jI+aoay4o5kJkdBUNEScqRw5on6hN32r /4eFIGUo5JjW1HsDYfvRCTOFibCuOGgBMOIxlvhr66S8cqVJEO2MbDi06nrKpM4fCpea 61Dv6omkWun6OXGRupRne1axuOQkRGI6Xsjeg0cvp5ENcFkjNMxM2+c2dfoO0OeVdc5C npzg== X-Forwarded-Encrypted: i=1; AJvYcCUHFpvS5Jc8xxb5iKvdx8nrf+nkdwhXKbf2W0yig6hPNg4TBmszfZY1DO+pGnyCZ3B8AwHZ9kfCQ68=@lists.infradead.org X-Gm-Message-State: AOJu0Yxoq2mbEza3kLHiFrEg7OtFkQrdCbZ5IgWuTbYySI2r2iLmMrGl imp6D2mC1G8VQ601dPNuzUhDR/0htK4obwlGVVGLH/lKcr9aWVlL X-Google-Smtp-Source: AGHT+IF/2i/VrNcu+rhudxHU7EwUt1cUgREAQFrWqhKqroWgeyt01AtDZZ3Ml2SacGAQnu+k2Q1CzQ== X-Received: by 2002:a05:600c:5251:b0:42c:b8cc:205a with SMTP id 5b1f17b1804b1-42f58491029mr88602375e9.32.1727699828718; Mon, 30 Sep 2024 05:37:08 -0700 (PDT) Received: from fedora.iskraemeco.si ([193.77.86.250]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a52308sm149011355e9.43.2024.09.30.05.37.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 05:37:07 -0700 (PDT) From: Uros Bizjak To: x86@kernel.org, linux-crypto@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fscrypt@vger.kernel.org, linux-scsi@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org Cc: Uros Bizjak , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Hans Verkuil , Mauro Carvalho Chehab , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Eric Biggers , "Theodore Y. Ts'o" , Jaegeuk Kim , "Jason A. Donenfeld" , Linus Torvalds , Hannes Reinecke , "James E.J. Bottomley" , "Martin K. Petersen" , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Andrew Morton , Brendan Higgins , David Gow , Rae Moar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jiri Pirko , Petr Mladek , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Stephen Hemminger , Jamal Hadi Salim , Cong Wang , Kent Overstreet Subject: [PATCH v3 00/19] random: Resolve circular include dependency and include Date: Mon, 30 Sep 2024 14:33:11 +0200 Message-ID: <20240930123702.803617-1-ubizjak@gmail.com> X-Mailer: git-send-email 2.46.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240930_053711_651675_1F93C259 X-CRM114-Status: GOOD ( 23.90 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org There were several attempts to resolve circular include dependency after the addition of percpu.h: 1c9df907da83 ("random: fix circular include dependency on arm64 after addition of percpu.h"), c0842fbc1b18 ("random32: move the pseudo-random 32-bit definitions to prandom.h") and finally d9f29deb7fe8 ("prandom: Remove unused include") that completely removes the inclusion of . Due to legacy reasons, includes , but with the commit entry remark: --quote-- A further cleanup step would be to remove this from entirely, and make people who use the prandom infrastructure include just the new header file. That's a bit of a churn patch, but grepping for "prandom_" and "next_pseudo_random32" "struct rnd_state" should catch most users. But it turns out that that nice cleanup step is fairly painful, because a _lot_ of code currently seems to depend on the implicit include of , which can currently come in a lot of ways, including such fairly core headfers as . So the "nice cleanup" part may or may never happen. --/quote-- We would like to include in . In [1] we would like to repurpose __percpu tag as a named address space qualifier, where __percpu macro uses defines from . The major roadblock to inclusion of is the above mentioned legacy inclusion of in that causes circular include dependency that prevents inclusion. This patch series is the "nice cleanup" part that: a) Substitutes the inclusion of with the inclusion of where needed (patches 1 - 17). b) Removes legacy inclusion of from (patch 18). c) Includes in (patch 19). The whole series was tested by compiling the kernel for x86_64 allconfig and some popular architectures, namely arm64 defconfig, powerpc defconfig and loongarch defconfig. [1] https://lore.kernel.org/lkml/20240812115945.484051-4-ubizjak@gmail.com/ Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Eric Biggers Cc: "Theodore Y. Ts'o" Cc: Jaegeuk Kim Cc: "Jason A. Donenfeld" Cc: Linus Torvalds Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: John Fastabend Cc: Andrii Nakryiko Cc: Martin KaFai Lau Cc: Eduard Zingerman Cc: Song Liu Cc: Yonghong Song Cc: KP Singh Cc: Stanislav Fomichev Cc: Hao Luo Cc: Jiri Olsa Cc: Andrew Morton Cc: Brendan Higgins Cc: David Gow Cc: Rae Moar Cc: "David S. Miller" Cc: Eric Dumazet Cc: Jakub Kicinski Cc: Paolo Abeni Cc: Jiri Pirko Cc: Petr Mladek Cc: Steven Rostedt Cc: Andy Shevchenko Cc: Rasmus Villemoes Cc: Sergey Senozhatsky Cc: Stephen Hemminger Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Kent Overstreet --- v2: - Reword commit messages to mention the removal of legacy inclusion of from - Add missing substitution in crypto/testmgr.c (reported by kernel test robot) - Add Acked-by: tags. v3: - Update to linux 6.12rc1. - Add more Acked-by: tags. Uros Bizjak (19): x86/kaslr: Include instead of crypto: testmgr: Include instead of drm/i915/selftests: Include instead of drm/lib: Include instead of media: vivid: Include in vivid-vid-cap.c mtd: tests: Include instead of fscrypt: Include in fs/crypto/keyring.c scsi: libfcoe: Include instead of bpf: Include instead of lib/interval_tree_test.c: Include instead of kunit: string-stream-test: Include random32: Include instead of lib/rbtree-test: Include instead of bpf/tests: Include instead of lib/test_parman: Include instead of lib/test_scanf: Include instead of netem: Include in sch_netem.c random: Do not include in prandom: Include in arch/x86/mm/kaslr.c | 2 +- crypto/testmgr.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 2 +- drivers/gpu/drm/i915/selftests/i915_random.h | 2 +- drivers/gpu/drm/i915/selftests/scatterlist.c | 2 +- drivers/gpu/drm/lib/drm_random.h | 2 +- drivers/media/test-drivers/vivid/vivid-vid-cap.c | 1 + drivers/mtd/tests/oobtest.c | 2 +- drivers/mtd/tests/pagetest.c | 2 +- drivers/mtd/tests/subpagetest.c | 2 +- fs/crypto/keyring.c | 1 + include/linux/prandom.h | 1 + include/linux/random.h | 7 ------- include/scsi/libfcoe.h | 2 +- kernel/bpf/core.c | 2 +- lib/interval_tree_test.c | 2 +- lib/kunit/string-stream-test.c | 1 + lib/random32.c | 2 +- lib/rbtree_test.c | 2 +- lib/test_bpf.c | 2 +- lib/test_parman.c | 2 +- lib/test_scanf.c | 2 +- net/sched/sch_netem.c | 1 + 23 files changed, 22 insertions(+), 24 deletions(-) -- 2.46.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/