From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4E15185D for ; Thu, 24 Feb 2022 10:39:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75D07C340E9; Thu, 24 Feb 2022 10:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645699160; bh=JE74vM6F239/HyTrEDsqOE00ec9BmQ42Y4OdvszfnpU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qAs+hGS6Ri7GNCE9Har0J+LPVD+ewhbDdPU45i37O7fJZZKp9bcyVQb4eE4Jvb94e 4P7PTXOxSwb3MNglKP4zsZgu0734lr6EMTGVUWMidtpZi/GhVgwZ526WxmlhJoS4TG YRULgtIp5lITDHTUl9XTZCrjWmaMCwnAGOoYJNecxrXJ6mmAhqGJGnTvqePx+ruLxE ykAsn+5JTIlB+HnsujxgbU1U9Oqd14UR0JDzrh6Cer3YxKsG6gNuVywh/pMQBr6qml W5n6O49t1pX+X4FoiLqeMlFzNIxpXPXlFriizE+cwWKxUdjN7brcP0yLpz3y41GVEr BKjT6Li1tOwig== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nNBWo-00A9YD-5V; Thu, 24 Feb 2022 10:39:18 +0000 Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Thu, 24 Feb 2022 10:39:17 +0000 From: Marc Zyngier To: Ard Biesheuvel Cc: Philip Li , Kalesh Singh , kernel test robot , llvm@lists.linux.dev, kbuild-all@lists.01.org, Will Deacon , Quentin Perret , Fuad Tabba , surenb@google.com, Android Kernel Team , Catalin Marinas , James Morse , Alexandru Elisei , Suzuki K Poulose , Mark Rutland , Pasha Tatashin , Joey Gouly , Peter Collingbourne , Andrew Scull , Paolo Bonzini , Zenghui Yu , Linux ARM , Linux Kernel Mailing List , kvmarm Subject: Re: [kbuild-all] Re: [PATCH v2 6/9] KVM: arm64: Detect and handle hypervisor stack overflows In-Reply-To: References: <20220222165212.2005066-7-kaleshsingh@google.com> <202202231727.L621fVgD-lkp@intel.com> <875yp63ptg.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <89c48bd2a9b32b4607d1515714fa3c1b@kernel.org> X-Sender: maz@kernel.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: ardb@kernel.org, philip.li@intel.com, kaleshsingh@google.com, lkp@intel.com, llvm@lists.linux.dev, kbuild-all@lists.01.org, will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, pasha.tatashin@soleen.com, joey.gouly@arm.com, pcc@google.com, ascull@google.com, pbonzini@redhat.com, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On 2022-02-23 12:56, Ard Biesheuvel wrote: > On Wed, 23 Feb 2022 at 13:54, Marc Zyngier wrote: >> >> On 2022-02-23 12:34, Philip Li wrote: >> > On Wed, Feb 23, 2022 at 09:16:59AM +0000, Marc Zyngier wrote: >> >> On Wed, 23 Feb 2022 09:05:18 +0000, >> >> kernel test robot wrote: >> >> > >> >> > Hi Kalesh, >> >> > >> >> > Thank you for the patch! Perhaps something to improve: >> >> > >> >> > [auto build test WARNING on cfb92440ee71adcc2105b0890bb01ac3cddb8507] >> >> > >> >> > url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/KVM-arm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > base: cfb92440ee71adcc2105b0890bb01ac3cddb8507 >> >> > config: arm64-randconfig-r011-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231727.L621fVgD-lkp@intel.com/config) >> >> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) >> >> > 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 >> >> > # install arm64 cross compiling tool for clang build >> >> > # apt-get install binutils-aarch64-linux-gnu >> >> > # https://github.com/0day-ci/linux/commit/7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > git remote add linux-review https://github.com/0day-ci/linux >> >> > git fetch --no-tags linux-review Kalesh-Singh/KVM-arm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > git checkout 7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > # save the config file to linux build tree >> >> > mkdir build_dir >> >> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/ >> >> > >> >> > If you fix the issue, kindly add following tag as appropriate >> >> > Reported-by: kernel test robot >> >> > >> >> > All warnings (new ones prefixed by >>): >> >> > >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:200:27: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] >> >> > [ESR_ELx_EC_FP_ASIMD] = kvm_hyp_handle_fpsimd, >> >> > ^~~~~~~~~~~~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:196:28: note: previous initialization is here >> >> > [0 ... ESR_ELx_EC_MAX] = NULL, >> >> > ^~~~ >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> >> >> Kalesh, please ignore this nonsense. There may be things to improve, >> >> but this is *NOT* one of them. >> >> >> >> These reports are pretty useless, and just lead people to ignore real >> >> bug reports. >> > >> > Hi Kalesh, sorry there're some irrelevant issues mixed in the report, >> > kindly ignore them. And the valuable ones are the new ones that >> > prefixed by >>, as the below one in original report. >> > >> >>> arch/arm64/kvm/hyp/nvhe/switch.c:372:17: warning: no previous >> >>> prototype for function 'hyp_panic_bad_stack' [-Wmissing-prototypes] >> > void __noreturn hyp_panic_bad_stack(void) >> > ^ >> >> This is only called from assembly code, so a prototype wouldn't bring >> much. >> > > Should probably be marked as 'asmlinkage' then. I've suggested many > times already that this bogus diagnostic should either be disabled, or > disregard 'asmlinkage' symbols. Yes, asmlinkage is definitely missing. But it is pretty obvious that the robot people aren't interested in fixing this particular issue, given how long we have been suggesting this... M. -- Jazz is not dead. It just smells funny... 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 mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84E87C433EF for ; Thu, 24 Feb 2022 10:39:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1EFCC4BF55; Thu, 24 Feb 2022 05:39:25 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QTd4XBU53q1y; Thu, 24 Feb 2022 05:39:23 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E2A794BF5E; Thu, 24 Feb 2022 05:39:23 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C03104BF55 for ; Thu, 24 Feb 2022 05:39:22 -0500 (EST) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ao9sdbT387uc for ; Thu, 24 Feb 2022 05:39:21 -0500 (EST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 69C024BC84 for ; Thu, 24 Feb 2022 05:39:21 -0500 (EST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AEDF36167F; Thu, 24 Feb 2022 10:39:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75D07C340E9; Thu, 24 Feb 2022 10:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645699160; bh=JE74vM6F239/HyTrEDsqOE00ec9BmQ42Y4OdvszfnpU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qAs+hGS6Ri7GNCE9Har0J+LPVD+ewhbDdPU45i37O7fJZZKp9bcyVQb4eE4Jvb94e 4P7PTXOxSwb3MNglKP4zsZgu0734lr6EMTGVUWMidtpZi/GhVgwZ526WxmlhJoS4TG YRULgtIp5lITDHTUl9XTZCrjWmaMCwnAGOoYJNecxrXJ6mmAhqGJGnTvqePx+ruLxE ykAsn+5JTIlB+HnsujxgbU1U9Oqd14UR0JDzrh6Cer3YxKsG6gNuVywh/pMQBr6qml W5n6O49t1pX+X4FoiLqeMlFzNIxpXPXlFriizE+cwWKxUdjN7brcP0yLpz3y41GVEr BKjT6Li1tOwig== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nNBWo-00A9YD-5V; Thu, 24 Feb 2022 10:39:18 +0000 MIME-Version: 1.0 Date: Thu, 24 Feb 2022 10:39:17 +0000 From: Marc Zyngier To: Ard Biesheuvel Subject: Re: [kbuild-all] Re: [PATCH v2 6/9] KVM: arm64: Detect and handle hypervisor stack overflows In-Reply-To: References: <20220222165212.2005066-7-kaleshsingh@google.com> <202202231727.L621fVgD-lkp@intel.com> <875yp63ptg.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <89c48bd2a9b32b4607d1515714fa3c1b@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: ardb@kernel.org, philip.li@intel.com, kaleshsingh@google.com, lkp@intel.com, llvm@lists.linux.dev, kbuild-all@lists.01.org, will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, pasha.tatashin@soleen.com, joey.gouly@arm.com, pcc@google.com, ascull@google.com, pbonzini@redhat.com, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Catalin Marinas , llvm@lists.linux.dev, Joey Gouly , Kalesh Singh , Will Deacon , kvmarm , kernel test robot , surenb@google.com, Android Kernel Team , Pasha Tatashin , Peter Collingbourne , Linux ARM , kbuild-all@lists.01.org, Linux Kernel Mailing List , Philip Li , Paolo Bonzini X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 2022-02-23 12:56, Ard Biesheuvel wrote: > On Wed, 23 Feb 2022 at 13:54, Marc Zyngier wrote: >> >> On 2022-02-23 12:34, Philip Li wrote: >> > On Wed, Feb 23, 2022 at 09:16:59AM +0000, Marc Zyngier wrote: >> >> On Wed, 23 Feb 2022 09:05:18 +0000, >> >> kernel test robot wrote: >> >> > >> >> > Hi Kalesh, >> >> > >> >> > Thank you for the patch! Perhaps something to improve: >> >> > >> >> > [auto build test WARNING on cfb92440ee71adcc2105b0890bb01ac3cddb8507] >> >> > >> >> > url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/KVM-arm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > base: cfb92440ee71adcc2105b0890bb01ac3cddb8507 >> >> > config: arm64-randconfig-r011-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231727.L621fVgD-lkp@intel.com/config) >> >> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) >> >> > 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 >> >> > # install arm64 cross compiling tool for clang build >> >> > # apt-get install binutils-aarch64-linux-gnu >> >> > # https://github.com/0day-ci/linux/commit/7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > git remote add linux-review https://github.com/0day-ci/linux >> >> > git fetch --no-tags linux-review Kalesh-Singh/KVM-arm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > git checkout 7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > # save the config file to linux build tree >> >> > mkdir build_dir >> >> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/ >> >> > >> >> > If you fix the issue, kindly add following tag as appropriate >> >> > Reported-by: kernel test robot >> >> > >> >> > All warnings (new ones prefixed by >>): >> >> > >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:200:27: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] >> >> > [ESR_ELx_EC_FP_ASIMD] = kvm_hyp_handle_fpsimd, >> >> > ^~~~~~~~~~~~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:196:28: note: previous initialization is here >> >> > [0 ... ESR_ELx_EC_MAX] = NULL, >> >> > ^~~~ >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> >> >> Kalesh, please ignore this nonsense. There may be things to improve, >> >> but this is *NOT* one of them. >> >> >> >> These reports are pretty useless, and just lead people to ignore real >> >> bug reports. >> > >> > Hi Kalesh, sorry there're some irrelevant issues mixed in the report, >> > kindly ignore them. And the valuable ones are the new ones that >> > prefixed by >>, as the below one in original report. >> > >> >>> arch/arm64/kvm/hyp/nvhe/switch.c:372:17: warning: no previous >> >>> prototype for function 'hyp_panic_bad_stack' [-Wmissing-prototypes] >> > void __noreturn hyp_panic_bad_stack(void) >> > ^ >> >> This is only called from assembly code, so a prototype wouldn't bring >> much. >> > > Should probably be marked as 'asmlinkage' then. I've suggested many > times already that this bogus diagnostic should either be disabled, or > disregard 'asmlinkage' symbols. Yes, asmlinkage is definitely missing. But it is pretty obvious that the robot people aren't interested in fixing this particular issue, given how long we have been suggesting this... M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 29FD9C433F5 for ; Thu, 24 Feb 2022 10:40:43 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:Cc:To:From :Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8blqg24fkOfj+InttfNBdHjjAMBzpA7GR5qOCQBmphw=; b=cUJBzv2Ri6QRZF8WCkRWZm7/e+ vTW3s9/PocNTU6J/FKKOny028l/XipcV713i0MI/X+simLLJWX8p6Bw0sihI5zaE6OiUnDUB7h4PH QxjnuX+k9GgzCMWXcao4jWfJBYe2fINuQhXp+qB1q/x0EVY2+UcJyXlnw8oEQV8ziUMWWHGcWH+H8 O1+3ONwtmZ/bCDs9o+d4NaMY25/U+8bkX9Ukd3Bh5yF7qkmGEFIVg2+RfNS5cy6Ygld7IGG+qvmCZ u+Q0DnzjQjJBrJKrzSqutOtSG41YoLL8rdoPWJ08YxKr9BDk6oSsBsHAtDLvHEYKUwgrtO/24ZknD ERGq3/pQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNBWz-000Ogq-E2; Thu, 24 Feb 2022 10:39:30 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNBWr-000OfP-8k for linux-arm-kernel@lists.infradead.org; Thu, 24 Feb 2022 10:39:23 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AEDF36167F; Thu, 24 Feb 2022 10:39:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75D07C340E9; Thu, 24 Feb 2022 10:39:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645699160; bh=JE74vM6F239/HyTrEDsqOE00ec9BmQ42Y4OdvszfnpU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qAs+hGS6Ri7GNCE9Har0J+LPVD+ewhbDdPU45i37O7fJZZKp9bcyVQb4eE4Jvb94e 4P7PTXOxSwb3MNglKP4zsZgu0734lr6EMTGVUWMidtpZi/GhVgwZ526WxmlhJoS4TG YRULgtIp5lITDHTUl9XTZCrjWmaMCwnAGOoYJNecxrXJ6mmAhqGJGnTvqePx+ruLxE ykAsn+5JTIlB+HnsujxgbU1U9Oqd14UR0JDzrh6Cer3YxKsG6gNuVywh/pMQBr6qml W5n6O49t1pX+X4FoiLqeMlFzNIxpXPXlFriizE+cwWKxUdjN7brcP0yLpz3y41GVEr BKjT6Li1tOwig== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nNBWo-00A9YD-5V; Thu, 24 Feb 2022 10:39:18 +0000 MIME-Version: 1.0 Date: Thu, 24 Feb 2022 10:39:17 +0000 From: Marc Zyngier To: Ard Biesheuvel Cc: Philip Li , Kalesh Singh , kernel test robot , llvm@lists.linux.dev, kbuild-all@lists.01.org, Will Deacon , Quentin Perret , Fuad Tabba , surenb@google.com, Android Kernel Team , Catalin Marinas , James Morse , Alexandru Elisei , Suzuki K Poulose , Mark Rutland , Pasha Tatashin , Joey Gouly , Peter Collingbourne , Andrew Scull , Paolo Bonzini , Zenghui Yu , Linux ARM , Linux Kernel Mailing List , kvmarm Subject: Re: [kbuild-all] Re: [PATCH v2 6/9] KVM: arm64: Detect and handle hypervisor stack overflows In-Reply-To: References: <20220222165212.2005066-7-kaleshsingh@google.com> <202202231727.L621fVgD-lkp@intel.com> <875yp63ptg.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <89c48bd2a9b32b4607d1515714fa3c1b@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: ardb@kernel.org, philip.li@intel.com, kaleshsingh@google.com, lkp@intel.com, llvm@lists.linux.dev, kbuild-all@lists.01.org, will@kernel.org, qperret@google.com, tabba@google.com, surenb@google.com, kernel-team@android.com, catalin.marinas@arm.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, pasha.tatashin@soleen.com, joey.gouly@arm.com, pcc@google.com, ascull@google.com, pbonzini@redhat.com, yuzenghui@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220224_023921_509964_E83ED36A X-CRM114-Status: GOOD ( 26.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-02-23 12:56, Ard Biesheuvel wrote: > On Wed, 23 Feb 2022 at 13:54, Marc Zyngier wrote: >> >> On 2022-02-23 12:34, Philip Li wrote: >> > On Wed, Feb 23, 2022 at 09:16:59AM +0000, Marc Zyngier wrote: >> >> On Wed, 23 Feb 2022 09:05:18 +0000, >> >> kernel test robot wrote: >> >> > >> >> > Hi Kalesh, >> >> > >> >> > Thank you for the patch! Perhaps something to improve: >> >> > >> >> > [auto build test WARNING on cfb92440ee71adcc2105b0890bb01ac3cddb8507] >> >> > >> >> > url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/KVM-arm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > base: cfb92440ee71adcc2105b0890bb01ac3cddb8507 >> >> > config: arm64-randconfig-r011-20220221 (https://download.01.org/0day-ci/archive/20220223/202202231727.L621fVgD-lkp@intel.com/config) >> >> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) >> >> > 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 >> >> > # install arm64 cross compiling tool for clang build >> >> > # apt-get install binutils-aarch64-linux-gnu >> >> > # https://github.com/0day-ci/linux/commit/7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > git remote add linux-review https://github.com/0day-ci/linux >> >> > git fetch --no-tags linux-review Kalesh-Singh/KVM-arm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > git checkout 7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > # save the config file to linux build tree >> >> > mkdir build_dir >> >> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/ >> >> > >> >> > If you fix the issue, kindly add following tag as appropriate >> >> > Reported-by: kernel test robot >> >> > >> >> > All warnings (new ones prefixed by >>): >> >> > >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:200:27: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] >> >> > [ESR_ELx_EC_FP_ASIMD] = kvm_hyp_handle_fpsimd, >> >> > ^~~~~~~~~~~~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:196:28: note: previous initialization is here >> >> > [0 ... ESR_ELx_EC_MAX] = NULL, >> >> > ^~~~ >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> >> >> Kalesh, please ignore this nonsense. There may be things to improve, >> >> but this is *NOT* one of them. >> >> >> >> These reports are pretty useless, and just lead people to ignore real >> >> bug reports. >> > >> > Hi Kalesh, sorry there're some irrelevant issues mixed in the report, >> > kindly ignore them. And the valuable ones are the new ones that >> > prefixed by >>, as the below one in original report. >> > >> >>> arch/arm64/kvm/hyp/nvhe/switch.c:372:17: warning: no previous >> >>> prototype for function 'hyp_panic_bad_stack' [-Wmissing-prototypes] >> > void __noreturn hyp_panic_bad_stack(void) >> > ^ >> >> This is only called from assembly code, so a prototype wouldn't bring >> much. >> > > Should probably be marked as 'asmlinkage' then. I've suggested many > times already that this bogus diagnostic should either be disabled, or > disregard 'asmlinkage' symbols. Yes, asmlinkage is definitely missing. But it is pretty obvious that the robot people aren't interested in fixing this particular issue, given how long we have been suggesting this... M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2690081929574498326==" MIME-Version: 1.0 From: Marc Zyngier To: kbuild-all@lists.01.org Subject: Re: [PATCH v2 6/9] KVM: arm64: Detect and handle hypervisor stack overflows Date: Thu, 24 Feb 2022 10:39:17 +0000 Message-ID: <89c48bd2a9b32b4607d1515714fa3c1b@kernel.org> In-Reply-To: List-Id: --===============2690081929574498326== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 2022-02-23 12:56, Ard Biesheuvel wrote: > On Wed, 23 Feb 2022 at 13:54, Marc Zyngier wrote: >> = >> On 2022-02-23 12:34, Philip Li wrote: >> > On Wed, Feb 23, 2022 at 09:16:59AM +0000, Marc Zyngier wrote: >> >> On Wed, 23 Feb 2022 09:05:18 +0000, >> >> kernel test robot wrote: >> >> > >> >> > Hi Kalesh, >> >> > >> >> > Thank you for the patch! Perhaps something to improve: >> >> > >> >> > [auto build test WARNING on cfb92440ee71adcc2105b0890bb01ac3cddb850= 7] >> >> > >> >> > url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/KVM-a= rm64-Hypervisor-stack-enhancements/20220223-010522 >> >> > base: cfb92440ee71adcc2105b0890bb01ac3cddb8507 >> >> > config: arm64-randconfig-r011-20220221 (https://download.01.org/0da= y-ci/archive/20220223/202202231727.L621fVgD-lkp(a)intel.com/config) >> >> > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-projec= t d271fc04d5b97b12e6b797c6067d3c96a8d7470e) >> >> > reproduce (this is a W=3D1 build): >> >> > wget https://raw.githubusercontent.com/intel/lkp-tests/mast= er/sbin/make.cross -O ~/bin/make.cross >> >> > chmod +x ~/bin/make.cross >> >> > # install arm64 cross compiling tool for clang build >> >> > # apt-get install binutils-aarch64-linux-gnu >> >> > # https://github.com/0day-ci/linux/commit/7fe99fd40f7c4b297= 3218045ca5b9c9160524db1 >> >> > git remote add linux-review https://github.com/0day-ci/linux >> >> > git fetch --no-tags linux-review Kalesh-Singh/KVM-arm64-Hyp= ervisor-stack-enhancements/20220223-010522 >> >> > git checkout 7fe99fd40f7c4b2973218045ca5b9c9160524db1 >> >> > # save the config file to linux build tree >> >> > mkdir build_dir >> >> > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cr= oss W=3D1 O=3Dbuild_dir ARCH=3Darm64 SHELL=3D/bin/bash arch/arm64/ >> >> > >> >> > If you fix the issue, kindly add following tag as appropriate >> >> > Reported-by: kernel test robot >> >> > >> >> > All warnings (new ones prefixed by >>): >> >> > >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:200:27: warning: initializer ov= errides prior initialization of this subobject [-Winitializer-overrides] >> >> > [ESR_ELx_EC_FP_ASIMD] =3D kvm_hyp_handle_fpsim= d, >> >> > ^~~~~~~~~~~~~~~~~~~~~ >> >> > arch/arm64/kvm/hyp/nvhe/switch.c:196:28: note: previous initiali= zation is here >> >> > [0 ... ESR_ELx_EC_MAX] =3D NULL, >> >> > ^~~~ >> >> > include/linux/stddef.h:8:14: note: expanded from macro 'NULL' >> >> > #define NULL ((void *)0) >> >> > ^~~~~~~~~~~ >> >> >> >> Kalesh, please ignore this nonsense. There may be things to improve, >> >> but this is *NOT* one of them. >> >> >> >> These reports are pretty useless, and just lead people to ignore real >> >> bug reports. >> > >> > Hi Kalesh, sorry there're some irrelevant issues mixed in the report, >> > kindly ignore them. And the valuable ones are the new ones that >> > prefixed by >>, as the below one in original report. >> > >> >>> arch/arm64/kvm/hyp/nvhe/switch.c:372:17: warning: no previous >> >>> prototype for function 'hyp_panic_bad_stack' [-Wmissing-prototypes] >> > void __noreturn hyp_panic_bad_stack(void) >> > ^ >> = >> This is only called from assembly code, so a prototype wouldn't bring >> much. >> = > = > Should probably be marked as 'asmlinkage' then. I've suggested many > times already that this bogus diagnostic should either be disabled, or > disregard 'asmlinkage' symbols. Yes, asmlinkage is definitely missing. But it is pretty obvious that the robot people aren't interested in fixing this particular issue, given how long we have been suggesting this... M. -- = Jazz is not dead. It just smells funny... --===============2690081929574498326==--