From patchwork Mon Sep 9 07:53:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 1982404 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=bVc1t/ae; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=WUtSBdgR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X2K1D295pz1y1l for ; Mon, 9 Sep 2024 17:57:04 +1000 (AEST) 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=Bl6Kqmy3SbYAbbjddiKnf92niN6Bev7Y6SJR4ofhSnc=; b=bVc1t/aewwyUgy PSeQZektmoEeAMhe532CkESofpeyXFjolOtVgDA6ctNsoPzFy8Co0AE8uAUKshDrX6U863h4IDCDM UD0ag8vzP9ZeKVmVIPOz9xdtxci7KTfKw8dOJJ3jCIR7oJ8gMot/Ic5u0OCFe2cV7JUJBJihm3d75 6GnxCc960fky5UzL31I+0PQ4uxJ95fr6VfPCd6CrJByasLJ8D/72qniivfNBqit16TOfsijqbCPBW cGBnsas2vElS4rmh1FD3cDCeiMDyCAI7R874k9OwU64/98Ro6LOCiHwZXdeo0gaKfWE41nJ1eVmRE AS1RCn3GzoM3aeMAI/Ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1snZGX-00000000vzh-08Tu; Mon, 09 Sep 2024 07:56:53 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1snZGS-00000000vxd-3mk4 for linux-mtd@lists.infradead.org; Mon, 09 Sep 2024 07:56:50 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-42cb0f28bfbso14486545e9.1 for ; Mon, 09 Sep 2024 00:56:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725868607; x=1726473407; 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=R4NS6jV5fKGk/mwoZluVrj+7uJlJEVUPyFdbxV7oRHQ=; b=WUtSBdgRLsm5pk759dZDwaPSxR0EayqwcfQcfbp6LNn1bSIiBhoUEwGmdQ/RDAWKAz HSh4ddJvsbZuYIQqHL71wo1X7Ce6Xr/DpgOeIQRt0gOhsDPjWqxC4947wopn/84tTXb0 nAB08Lbv9/EgQHf5z0nRnvpL5NWpVBwJ79DGwa4msPB5EvfjDSujrrzO83yySHcIbLIw c1szKyS/5TqbtfdWux7zSOdAKcmfIQtWxWnSRFjpp/n+bBqEbG4XL+iIQKwlbiU8+NPq zB3+O/5pffxPKlWrJblT+hn9qxI3P1nhrKVuMN4VWT+Tq10cLx3V9XvaqMrJpy32MAZq XK2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725868607; x=1726473407; 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=R4NS6jV5fKGk/mwoZluVrj+7uJlJEVUPyFdbxV7oRHQ=; b=SugxxoBKocaOqcdCbxVlk+ID1E+vnYn1Uf7XlJEyYZlIz4K8MJSlOzL8aGTTH0ntky +6cvxB2rsnm9YxsttvPT77KZcrifckvNyGkTo92Hwajj6QBnPvmG+7VZcqLdPAfRi9Ul pMCI4lPme6FTSgfWVfXuG3Z3d09mKOSOGaMc4NXL3ddMY0erN+XDokHXkH1WH6gKyVe1 oLcrwPwgpDMt6Wu4/8zP9ErX5ZcUNfXc7zOrIOXg2lkmyRHbUoK/nquCC91VxR3s6ly7 1s5FWw3WXZ3YXmlprLGTJQEFfDwGxM1qjzEL2glYpG+KYb3KWQ95CskyGPaNoMFy9gej FbOw== X-Forwarded-Encrypted: i=1; AJvYcCXrUuNnSxFWk373+KR0CWL6DpAIFgL4LfursxaXg8cJIJl05pdAEoY3a6v0cjW2bJt+ARi1tImedio=@lists.infradead.org X-Gm-Message-State: AOJu0YxHIeGdb/jtLrJjhzG5DZmI/N+q5Lez09xuIsUDWj+E1gDQUmSH oqv6jfLn3AaNu5m0G7HbWJJZzeY6qMdSfcmHFPT1nhA4Aea0e7Lv X-Google-Smtp-Source: AGHT+IEA5yak33SFTx+YZRupolj5vmzjBVIUunnRVoxkecwVhW5D0ABKP0ZK9jxMzGmcV67/WpIyKA== X-Received: by 2002:a05:600c:310a:b0:42c:8812:82a6 with SMTP id 5b1f17b1804b1-42c9f98a81cmr79250105e9.21.1725868606867; Mon, 09 Sep 2024 00:56:46 -0700 (PDT) Received: from fedora.iskraemeco.si ([193.77.86.250]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37895675b7esm5303001f8f.50.2024.09.09.00.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Sep 2024 00:56:46 -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 RESEND v2 00/19] random: Resolve circular include dependency and include Date: Mon, 9 Sep 2024 09:53:43 +0200 Message-ID: <20240909075641.258968-1-ubizjak@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240909_005648_969994_5B6759B1 X-CRM114-Status: GOOD ( 23.63 ) X-Spam-Score: -2.1 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Resent due to missing linux-kernel@ mailing list inclusion. 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"), c0842fb [...] Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:32f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ubizjak(at)gmail.com] 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: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Resent due to missing linux-kernel@ mailing list inclusion. 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: x86@kernel.org 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:. 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 instead of 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(-)