Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1076196pxm; Wed, 23 Feb 2022 17:30:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQvallQWKVokr8bg2kaP7IhA8Hho4cjSrf46ArsYGy7HrC/ImvCfEwalsbittcoWmqfcDn X-Received: by 2002:a63:eb02:0:b0:370:41e4:6ae6 with SMTP id t2-20020a63eb02000000b0037041e46ae6mr438099pgh.229.1645666205169; Wed, 23 Feb 2022 17:30:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645666205; cv=none; d=google.com; s=arc-20160816; b=fbDZFPScBpv7w5Zj0kmcSIpie9cZgTUd+C3K88e8JtR4RFUOFZMlUVvL9cdR1RX3UH 4Tlc1Xb7oNDQOjub0g+RLjA675CHA7S7XtOkloIVT93qNN7BFeSkdce62zz6KaWVOS9J gg+DjN44A3h0+G95TwuUogfKr3ZGAN+hHbTj78Kets/AXH+8Q+eJbiatUwgPfHWXdonM HxwQ7q0iikI56X5V9kh7QOmd77fZazmQzuoCcGpt3XSPLSVcTbage7SwqbD1J3nKbS67 wTHBl0w2LBMOfSKbeylGr7gziLmGRKv2gS9FVlW4FoOTb26Q7ArMSi+Ab8b9PJuwRfHd Fnbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6yuwE2y5y0DeXwaUiNPvH7nru70j6oem6If5O/x9B44=; b=WMC1Y8rgrnODw6oJRtZjKnBsSaZfkgVYk+irhI+j80pMFmUqikDj/VN2XRY0VwfTzD voGE6ZmHBSEevAq+jMjJ9cOuTO/Qjc94z7xED4XaMdkSR5XYUhiH85vy5YKCxOKQUoOV Uy0N+8uYhEolPXZpVISWkFIg3CKVoFVOm5rODb5vtXwKftNXngyQrI5cBcdWfl2ZZBPk 1LS8u1EccFp9IDI5rkrBxB6d2i4qzbfK9dOR24mVjA+qkCAzlO5t0uFQw/MpKxDfUn4G OKomW8qTXLbfXDCrWwwpmUeiO7LrMdUgq4Og/vpWKQfXO5DGEvH6weZsz7UGPdCtUpeC zZ7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oRYCnN+J; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id s5si1129388pgs.859.2022.02.23.17.30.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:30:05 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oRYCnN+J; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 717CB1520F2; Wed, 23 Feb 2022 17:10:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240693AbiBWM5q (ORCPT + 99 others); Wed, 23 Feb 2022 07:57:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240675AbiBWM5m (ORCPT ); Wed, 23 Feb 2022 07:57:42 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7280646B for ; Wed, 23 Feb 2022 04:57:14 -0800 (PST) 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 sin.source.kernel.org (Postfix) with ESMTPS id 20A03CE1AFF for ; Wed, 23 Feb 2022 12:57:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63124C340E7 for ; Wed, 23 Feb 2022 12:57:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645621031; bh=T3RPLphnpfjwjFji7iWJDHhlKcmc/lW8LSE7GNk2LKQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=oRYCnN+JtWTk+ZS+CT7d6jaqcSPRpUuFonbOK9xP0xB7QUUTpeIRYil0Z6yC0IrpP +STyaafk7/Yc//R5yR3Na6Wq8JTsYEQhJulAeoMOY2cxmshWudggYn9SYfYhvPbjqz S1XqLyRVOh1UX3uZwyDM/14Yi7HSPfG4EpA2kazhE8+xmwWUoOWTd1WMI99ANMWTg5 oUulsYyUXWW2XP5os7plGfrs4dIepLnvkI1ZUGsK82KQIbU31vVFcj+qNNgPrdztYc n9a+b11/5Pe1Vquy+iQtBZEfvkVQqFxTCFvave+ELkO89WpT/CSxx1FVOJ2uZ5FkkF B3pJD/7n4mIIQ== Received: by mail-yb1-f170.google.com with SMTP id w63so26496619ybe.10 for ; Wed, 23 Feb 2022 04:57:11 -0800 (PST) X-Gm-Message-State: AOAM533jjBOE66cnNeKeADrhz3+99nQbefKwwt9tgmjR5asQQ+ZohRcG vVCaOkG3HbemklQSTHP8yjIf0DZIoxNsY5xyceg= X-Received: by 2002:a25:e014:0:b0:619:a368:c3b5 with SMTP id x20-20020a25e014000000b00619a368c3b5mr27062454ybg.383.1645621030432; Wed, 23 Feb 2022 04:57:10 -0800 (PST) MIME-Version: 1.0 References: <20220222165212.2005066-7-kaleshsingh@google.com> <202202231727.L621fVgD-lkp@intel.com> <875yp63ptg.wl-maz@kernel.org> In-Reply-To: From: Ard Biesheuvel Date: Wed, 23 Feb 2022 13:56:59 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [kbuild-all] Re: [PATCH v2 6/9] KVM: arm64: Detect and handle hypervisor stack overflows To: Marc Zyngier 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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.