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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A5DEC05027 for ; Thu, 2 Feb 2023 14:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231907AbjBBOAa (ORCPT ); Thu, 2 Feb 2023 09:00:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231888AbjBBOAZ (ORCPT ); Thu, 2 Feb 2023 09:00:25 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58B4D8E6AD for ; Thu, 2 Feb 2023 06:00:15 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id h12so1774393wrv.10 for ; Thu, 02 Feb 2023 06:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=eMycSpSWqkLdJLuPU1kAliRBYKe3vnTJI8phLtEWdDI=; b=aX1rwy2YkRI6JACyuVKP5etYUZPG7JUA1R0As0ErGFAkMlpt62aDBJPcsvUThjjLom aHdlUs0Y6cY8dMz8yVgjfbpxGSITYHw/tENe8vYZTa+C3VCETc9gVSndANh7BGPRucVP R0tKqZXPEBxJK7CU1Jh9mDaIMl2DIWJbDIMxIO+/uu35JSJIVJD1vWZOt1mmc88NiiR8 0uJvVQMHzoOz3hCH1BMHW6gHyKotDAAsfCIhxpAyANFwjLQYuQ8JhLBmZX6MsjH+pc2S 9Z3ShGePx1zGree3SOmONdQ8tYPk7U1WvD59xKqM+rfje4EhiK03hKx4EFr7ihC5IVvW ZjHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eMycSpSWqkLdJLuPU1kAliRBYKe3vnTJI8phLtEWdDI=; b=tTiXXT927M1za30TJ3ooPYYGvGHO8PaNrd3NdNuHzS8+/NMaO3BisaUHKquk3kZtc/ 5eeG5vUi6VSONvo1MczeSzCUxD5OYvGXlCWFFW8fzQF1+VI0k8dkzYip5tliSY+VstZu oi5EPENxoZ8t/K1aKBPq7WWKwTNI42Jq+nJtxcNTZgVDDUCoi/QL4eATB+nNEBPwQWOS +QO8OXdROyl2IY3Ni0dGC5aHK7QFEajgTznSJnl3filAXVwdRXDHJ4K69cFSsIYrHR4e 7CGhGdWrWPsjH3Xb37QFiaWTFiIBGT5BmxuIihxOSg+HxJIJddkCI2JRTbc831qrPDeH VVvQ== X-Gm-Message-State: AO0yUKWvOrUVtfbKrDTO7XQ6N4iD/5BXDmhIMU1t15Y2I7DyOw39aDMC npcyJIZ3bCSYwAgMDpY2N7zVdyKjOaxF4ZTxFihqAg== X-Google-Smtp-Source: AK7set991hy80LggrGKuE0EGDn0gAr/4aLuvD+To3+bf8l/YlM8w4oAxF3edTa+/NMUuSWyoDpk+UbMMdtjLXw/6knk= X-Received: by 2002:adf:ffcb:0:b0:2bf:e95c:9918 with SMTP id x11-20020adfffcb000000b002bfe95c9918mr211434wrs.330.1675346413910; Thu, 02 Feb 2023 06:00:13 -0800 (PST) MIME-Version: 1.0 References: <20230125082333.1577572-3-alexghiti@rivosinc.com> <202302010819.RAsjyv6V-lkp@intel.com> In-Reply-To: <202302010819.RAsjyv6V-lkp@intel.com> From: Alexandre Ghiti Date: Thu, 2 Feb 2023 15:00:02 +0100 Message-ID: Subject: Re: [PATCH v3 2/6] riscv: Rework kasan population functions To: kernel test robot Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Vincenzo Frascino , Ard Biesheuvel , Conor Dooley , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-efi@vger.kernel.org, oe-kbuild-all@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 1, 2023 at 1:16 AM kernel test robot wrote: > > Hi Alexandre, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v6.2-rc6 next-20230131] > [If your patch is applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch#_base_tree_information] > > url: https://github.com/intel-lab-lkp/linux/commits/Alexandre-Ghiti/riscv-Split-early-and-final-KASAN-population-functions/20230125-163113 > patch link: https://lore.kernel.org/r/20230125082333.1577572-3-alexghiti%40rivosinc.com > patch subject: [PATCH v3 2/6] riscv: Rework kasan population functions > config: riscv-randconfig-r006-20230201 (https://download.01.org/0day-ci/archive/20230201/202302010819.RAsjyv6V-lkp@intel.com/config) > compiler: riscv64-linux-gcc (GCC) 12.1.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # https://github.com/intel-lab-lkp/linux/commit/c18726e8d14edbd59ec19854b4eb06d83fff716f > git remote add linux-review https://github.com/intel-lab-lkp/linux > git fetch --no-tags linux-review Alexandre-Ghiti/riscv-Split-early-and-final-KASAN-population-functions/20230125-163113 > git checkout c18726e8d14edbd59ec19854b4eb06d83fff716f > # save the config file > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash arch/riscv/mm/ > > If you fix the issue, kindly add following tag where applicable > | Reported-by: kernel test robot > > All warnings (new ones prefixed by >>): > > >> arch/riscv/mm/kasan_init.c:442:6: warning: no previous prototype for 'create_tmp_mapping' [-Wmissing-prototypes] > 442 | void create_tmp_mapping(void) > | ^~~~~~~~~~~~~~~~~~ > > > vim +/create_tmp_mapping +442 arch/riscv/mm/kasan_init.c > > 441 > > 442 void create_tmp_mapping(void) > 443 { > 444 void *ptr; > 445 p4d_t *base_p4d; > 446 > 447 /* > 448 * We need to clean the early mapping: this is hard to achieve "in-place", > 449 * so install a temporary mapping like arm64 and x86 do. > 450 */ > 451 memcpy(tmp_pg_dir, swapper_pg_dir, sizeof(pgd_t) * PTRS_PER_PGD); > 452 > 453 /* Copy the last p4d since it is shared with the kernel mapping. */ > 454 if (pgtable_l5_enabled) { > 455 ptr = (p4d_t *)pgd_page_vaddr(*pgd_offset_k(KASAN_SHADOW_END)); > 456 memcpy(tmp_p4d, ptr, sizeof(p4d_t) * PTRS_PER_P4D); > 457 set_pgd(&tmp_pg_dir[pgd_index(KASAN_SHADOW_END)], > 458 pfn_pgd(PFN_DOWN(__pa(tmp_p4d)), PAGE_TABLE)); > 459 base_p4d = tmp_p4d; > 460 } else { > 461 base_p4d = (p4d_t *)tmp_pg_dir; > 462 } > 463 > 464 /* Copy the last pud since it is shared with the kernel mapping. */ > 465 if (pgtable_l4_enabled) { > 466 ptr = (pud_t *)p4d_page_vaddr(*(base_p4d + p4d_index(KASAN_SHADOW_END))); > 467 memcpy(tmp_pud, ptr, sizeof(pud_t) * PTRS_PER_PUD); > 468 set_p4d(&base_p4d[p4d_index(KASAN_SHADOW_END)], > 469 pfn_p4d(PFN_DOWN(__pa(tmp_pud)), PAGE_TABLE)); > 470 } > 471 } > 472 Ok, I have to declare this function static to quiet this warning, there will be a v4 soon then. > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests