Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20438830rwd; Thu, 29 Jun 2023 02:13:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7b3U7KwVc7LVg/YzpCdjxJ+BK5coIhBZ29Msv7iUIHSpHvEpY/+y7XtS1iqnLhLWh8J/ym X-Received: by 2002:a05:6808:3ab:b0:3a1:e85f:33c3 with SMTP id n11-20020a05680803ab00b003a1e85f33c3mr9134925oie.50.1688030008936; Thu, 29 Jun 2023 02:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688030008; cv=none; d=google.com; s=arc-20160816; b=FiAfCo6FUmqxw3h9l7XCdLtA9uSYCdWW1x/KyyD09eNzTC01kuBRHLYF0KV8XRCdxT h21Ggnn8P1NMRxJPlEdeAP9mQsgSmvlyOLZCu4+LBhYh4I0AheU1oAva4p68lDUU7dgU Pzr26FpkwojdkUaCkrg925lUKG18ZNMNZ1Vf+z0p8xVgJAUbKkZSfitMAFv5EeeOutco p2nzh7tJVoHiRHM5bXlaCFr3YtS+r6OH9RDkoCsDmnSFKOKSOHSJqYZpQpnmzU32FB4I FAiqTqpK0yvdvIKU49apY35SYs2v6erz7kHJ1biW57q84DgDzMKqzA579V2+yUbmpbXA ihLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oRg+k30DySFMprH1obj4xzxPGz6M+G9ssFtYdJAnKw0=; fh=9aMkeFZAmcNFK+63HtL8i13NegWpne8YpGKKaZMpmZM=; b=snz7xZsfq1s8sj9X9sAd1KeCMFYY9xIIyR2P9DcFP9g4z04j+JQdsnIcx/XeHRgpSM GwYBaf7EggO4R8LlIYxfng7Kqaazk6JMGht6n5DSXceA1uTghD+dMag4IWTkLRLT2IJk gbP2CN/eS1ZLmTwvR1dhhm7LSawe71KnVn+JxdSDBumBLGhR4ofNWqBefie5gSARgGQa Th3c+xOnsVGs+YuScAwwjJDdK59H5HeFQ1mixXWdqrkXOi9iSTqAM6TdlHSjK6pkHFPG ckmwrYJrXMMiGUhc5Tfl/6tIL7quxuIpLM04quJ9nQrst92TAgmDwpZhG6nsIJY14eQ2 v4yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iJf3c2K3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020a17090a9dcb00b00262ca6c0ad7si10110493pjv.116.2023.06.29.02.13.15; Thu, 29 Jun 2023 02:13:28 -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=@intel.com header.s=Intel header.b=iJf3c2K3; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231777AbjF2IRg (ORCPT + 99 others); Thu, 29 Jun 2023 04:17:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232224AbjF2IQW (ORCPT ); Thu, 29 Jun 2023 04:16:22 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AB4944B7 for ; Thu, 29 Jun 2023 01:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688025920; x=1719561920; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=5Y+YCSow5LvUte0a0y0qeDa2mDYP7COwAuMVhjDb7ms=; b=iJf3c2K3RmPpiseOjIXOzKXXbQVmwrqZRk9MEghLANCKbWgC1LRT7DwZ BeqOtXlcfb1AdFGaKFittx8ktZ2T9U1DaC9/+npj453CTcRfTi0+SRWZP Oo9JnLqtZeU55bGE2av98eQxdw/rhRXinJhQa97/rl1BI6RQHys+7ESgn s9L8wOPpQz6quZW/CAevXvGGH2UfeMVtmbdAHJns+YVhf7cdghBTnyhhE 9QunDjCsfKruclAK4DaRIwknkSaLmAc+JinhYKrRlZsmFFP5Iv67YZwUY CsxawfRrVgGTZFUWKAdn3xuNOEJsKhJFjcgKl6Mw3kpXr/R/gfBYcvcVe w==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="364596598" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="364596598" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2023 01:05:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="807220312" X-IronPort-AV: E=Sophos;i="6.01,168,1684825200"; d="scan'208";a="807220312" Received: from lkp-server01.sh.intel.com (HELO 783282924a45) ([10.239.97.150]) by FMSMGA003.fm.intel.com with ESMTP; 29 Jun 2023 01:05:16 -0700 Received: from kbuild by 783282924a45 with local (Exim 4.96) (envelope-from ) id 1qEmeR-000Dys-37; Thu, 29 Jun 2023 08:05:15 +0000 Date: Thu, 29 Jun 2023 16:04:21 +0800 From: kernel test robot To: =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Andy Chiu Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , linux-kernel@vger.kernel.org, linux@rivosinc.com, =?iso-8859-1?Q?R=E9mi?= Denis-Courmont , Darius Rad Subject: Re: [PATCH v3] riscv: Discard vector state on syscalls Message-ID: <202306291513.DwaMo6k7-lkp@intel.com> References: <20230629062730.985184-1-bjorn@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230629062730.985184-1-bjorn@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 Hi Bj?rn, kernel test robot noticed the following build errors: [auto build test ERROR on 488833ccdcac118da16701f4ee0673b20ba47fe3] url: https://github.com/intel-lab-lkp/linux/commits/Bj-rn-T-pel/riscv-Discard-vector-state-on-syscalls/20230629-142852 base: 488833ccdcac118da16701f4ee0673b20ba47fe3 patch link: https://lore.kernel.org/r/20230629062730.985184-1-bjorn%40kernel.org patch subject: [PATCH v3] riscv: Discard vector state on syscalls config: riscv-randconfig-r042-20230629 (https://download.01.org/0day-ci/archive/20230629/202306291513.DwaMo6k7-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) reproduce: (https://download.01.org/0day-ci/archive/20230629/202306291513.DwaMo6k7-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202306291513.DwaMo6k7-lkp@intel.com/ All errors (new ones prefixed by >>): | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/traps.c:15: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:751:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 751 | insw(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:105:53: note: expanded from macro 'insw' 105 | #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/traps.c:15: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:759:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 759 | insl(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:106:53: note: expanded from macro 'insl' 106 | #define insl(addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/traps.c:15: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:768:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 768 | outsb(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:118:55: note: expanded from macro 'outsb' 118 | #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/traps.c:15: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:777:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 777 | outsw(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:119:55: note: expanded from macro 'outsw' 119 | #define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/traps.c:15: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:786:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 786 | outsl(addr, buffer, count); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ arch/riscv/include/asm/io.h:120:55: note: expanded from macro 'outsl' 120 | #define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count) | ~~~~~~~~~~ ^ In file included from arch/riscv/kernel/traps.c:15: In file included from include/linux/kprobes.h:28: In file included from include/linux/ftrace.h:10: In file included from include/linux/trace_recursion.h:5: In file included from include/linux/interrupt.h:11: In file included from include/linux/hardirq.h:11: In file included from ./arch/riscv/include/generated/asm/hardirq.h:1: In file included from include/asm-generic/hardirq.h:17: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/riscv/include/asm/io.h:136: include/asm-generic/io.h:1134:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 1134 | return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port; | ~~~~~~~~~~ ^ >> arch/riscv/kernel/traps.c:299:3: error: call to undeclared function 'riscv_v_vstate_discard'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 299 | riscv_v_vstate_discard(regs); | ^ arch/riscv/kernel/traps.c:299:3: note: did you mean 'riscv_v_vstate_query'? arch/riscv/include/asm/vector.h:206:20: note: 'riscv_v_vstate_query' declared here 206 | static inline bool riscv_v_vstate_query(struct pt_regs *regs) { return false; } | ^ 13 warnings and 1 error generated. vim +/riscv_v_vstate_discard +299 arch/riscv/kernel/traps.c 290 291 asmlinkage __visible __trap_section void do_trap_ecall_u(struct pt_regs *regs) 292 { 293 if (user_mode(regs)) { 294 ulong syscall = regs->a7; 295 296 regs->epc += 4; 297 regs->orig_a0 = regs->a0; 298 > 299 riscv_v_vstate_discard(regs); 300 301 syscall = syscall_enter_from_user_mode(regs, syscall); 302 303 if (syscall < NR_syscalls) 304 syscall_handler(regs, syscall); 305 else 306 regs->a0 = -ENOSYS; 307 308 syscall_exit_to_user_mode(regs); 309 } else { 310 irqentry_state_t state = irqentry_nmi_enter(regs); 311 312 do_trap_error(regs, SIGILL, ILL_ILLTRP, regs->epc, 313 "Oops - environment call from U-mode"); 314 315 irqentry_nmi_exit(regs, state); 316 } 317 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki