From patchwork Tue Jul 4 07:43:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Ghiti X-Patchwork-Id: 115594 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1044632vqx; Tue, 4 Jul 2023 00:50:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlE8C+HDle3e7nujWKoHQdvt/2ObmL3nCM8cVLjXS72XzZssGnKX9FlScoZojdwrXm1lS4EU X-Received: by 2002:a17:902:74c7:b0:1b8:78e:7c1 with SMTP id f7-20020a17090274c700b001b8078e07c1mr9817700plt.51.1688457036171; Tue, 04 Jul 2023 00:50:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688457036; cv=none; d=google.com; s=arc-20160816; b=ePq72pNg+hcTl+uQirG5aZ2MYlIePvWUEpGMw8NVwhN9snL3my/kBSMX1IdXPVcwiI yaoAIt3v7y2iLMCZ520QYkkRnYbP2Pq7OXD/+vVr9iuMRayO0rko/N9ngmQra/ZP7w54 0fZOzMhN4OPfmSjeGNH/4bG29M15hOrvH+vnf4H4ox3Qxo9uB04hMTIMJe/hKrwsAky1 bBXzYmwpxYMP0jtgw4p7D1h2qDUPcE5RSCXxg/0GpLPgbptP7Urh2iCSPFDmpLVmIQMz O6PIWfnPWdiBSi+tcrxFqx3PeLhd1WnXdbrPdSB+jxCYPtFi3LT/+u+0ULkzSRkG2fcy +HSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=NaN7FLuvwVnpnxsPOCNUh4V539jNJliF9+H8DZcJ4YM=; fh=RbTE1J6EfaEzAWTbKDeuhlHuAC6wrdW3lG4e15iXlSw=; b=j8MtCTkFgJj3LyYWVwdgjvMRPCLLFSO2m55M1j4nnYG7X/lQUCwXAs+njxbB5DmcwC 6tiGTwYx8JzBtKYE9MjHoYWlrojCNARP7rqJlL6w2V2pWDYvzH+4yIg3YIVmZXOgH5zT r2V0lyGvM9hXfxrx7ZtuEuV8rZBWWZZo8fGnbwFohq6yGkXp1fOVS1fnAuwzXF3Keb7/ ZiFU2WZ9KaLjPNoREQRc/8Df4u74fUsRo0xqcOoIFTSCXNVPxFuUUVHQ8vkIUrwG6izf +h2wncwEd7qV24oWTJ655UZ1zcsEfot0ClDC6aC6S/HuFhs9UjAgCnkpe8OgWhRuqjm3 WAfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=UW+p9aqo; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a1709026a8a00b001b11168bdddsi16427119plk.520.2023.07.04.00.50.23; Tue, 04 Jul 2023 00:50:36 -0700 (PDT) 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=@rivosinc-com.20221208.gappssmtp.com header.s=20221208 header.b=UW+p9aqo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231482AbjGDHoH (ORCPT + 99 others); Tue, 4 Jul 2023 03:44:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbjGDHoD (ORCPT ); Tue, 4 Jul 2023 03:44:03 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44814BB for ; Tue, 4 Jul 2023 00:44:02 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-3fbc63c2e84so50713965e9.3 for ; Tue, 04 Jul 2023 00:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1688456640; x=1691048640; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=NaN7FLuvwVnpnxsPOCNUh4V539jNJliF9+H8DZcJ4YM=; b=UW+p9aqobog562ULP3FjwFIYW3w4oDw/L8bG6v3uAVk7Cgjoh9ylTtxrzwp0ioAakV SSd2Lq69ada7NGqCwOziqGEuQ4msC0QC0h2Pp30r3LgXqI7pwM4PUvdmQvjH5A6Rha6f BihFqeSFAM2bpNbzqU9jtLX2jxaC+LBSiajG5EiQbKg3KWCIzhEZJBmBSBMCITwZFUHF nIFOW0h+8qoFJOm7OA/JkmvHCJKlWgKzrAcXicREr52rqEpQKiHB35ySdtOOPlawua7+ ZYotALMumf7cWbBsp2Szn29OyUpN0xzrm5rHtZjStkTUvz6zv3gSbQpgIAsDWx0qSbTC tj4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688456640; x=1691048640; 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=NaN7FLuvwVnpnxsPOCNUh4V539jNJliF9+H8DZcJ4YM=; b=Ua6WCyafUOc9QLD+AHeqlMfXwDiie5lDmWh2nZ+fb/gX7w8VnZjOYXHF8aHB8M7l0K S7XzA+GKslI5lmKs5Qs61fgwKPPKZ8PJqSXA2DbS1qtwE6mlYY2kZIYbinjaBG6hlMXl 7LzTx7VEOqgV6Eh3WaqZvItB3DOXrL++Es8AG1NnGWdCf1AHEmq4VJwjWDYg2TcONh1k fZhdjah9ZGF+JiUw4VbL0ZzFY0Kg0ArV4+BDxgoUuRL2z2UIHFkqobLvWzeNR/9Ti6o7 oW2TDro/x5sgngWht20tDMWUhsJHihsQONtB7uUoe5uSY6Y1l9xSDupRzCpMatbYIwxG 9F+w== X-Gm-Message-State: AC+VfDz7YR48Jk9cy7pohjTncQReuhjb1ZujBWCiRYsKBYOVRLIku7Yq kfiG+SST1Y5FqycctmQ7XgBNvw== X-Received: by 2002:a7b:cc82:0:b0:3fb:b008:2002 with SMTP id p2-20020a7bcc82000000b003fbb0082002mr10415933wma.0.1688456640324; Tue, 04 Jul 2023 00:44:00 -0700 (PDT) Received: from alex-rivos.ba.rivosinc.com ([93.23.105.195]) by smtp.gmail.com with ESMTPSA id y5-20020a05600c364500b003fbc9d178a8sm10790933wmq.4.2023.07.04.00.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jul 2023 00:43:59 -0700 (PDT) From: Alexandre Ghiti To: Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , kasan-dev@googlegroups.com, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel test robot Subject: [PATCH 1/2] riscv: Mark KASAN tmp* page tables variables as static Date: Tue, 4 Jul 2023 09:43:56 +0200 Message-Id: <20230704074357.233982-1-alexghiti@rivosinc.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770475524963915047?= X-GMAIL-MSGID: =?utf-8?q?1770475524963915047?= tmp_pg_dir, tmp_p4d and tmp_pud are only used in kasan_init.c so they should be declared as static. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306282202.bODptiGE-lkp@intel.com/ Fixes: 96f9d4daf745 ("riscv: Rework kasan population functions") Signed-off-by: Alexandre Ghiti --- arch/riscv/mm/kasan_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/riscv/mm/kasan_init.c b/arch/riscv/mm/kasan_init.c index 8fc0efcf905c..b88914741f3d 100644 --- a/arch/riscv/mm/kasan_init.c +++ b/arch/riscv/mm/kasan_init.c @@ -23,9 +23,9 @@ */ extern pgd_t early_pg_dir[PTRS_PER_PGD]; -pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss; -p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss; -pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss; +static pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss; +static p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss; +static pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss; static void __init kasan_populate_pte(pmd_t *pmd, unsigned long vaddr, unsigned long end) {