Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2159536lqt; Mon, 22 Apr 2024 03:18:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGXR6iKh7x3AWFpb4ScopTKAPKD3e6gtY/60BtmacnE4AhvEc0CKgoury8ogDRtAmxXsUzl0FslOYAVOL8/zMsKV8DlssZLaKKIbBOcw== X-Google-Smtp-Source: AGHT+IGV/VOp7THgEEYU48mZ3bQz+XICLIpS6Kmim0lRtEWsUUSU3UPDd7V4YKg23hxMwK6nwUwi X-Received: by 2002:a17:907:7e85:b0:a55:9e34:9ce6 with SMTP id qb5-20020a1709077e8500b00a559e349ce6mr6932272ejc.21.1713781101425; Mon, 22 Apr 2024 03:18:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713781101; cv=pass; d=google.com; s=arc-20160816; b=r6aiBTIyrLhShd/f0BK6hEi8DmO6lwvDlofHYrS2NGiYYXrxrb3BqCPJWihZzCkO1t WFdJqzP4t7a0lr/6x23Gp5S1jn1ne0glaRBcragK2Zwz5RK5XJCUGnJa1SW2UYpvvd7/ wnG8JKZt2mIk/c4LCE8wyT+w2MAxdNo5ybyA72tZ0Z8Tpkl8HbQHn/UmCykwY55fkjxT rxzkY3b87iPV8d71HoiEzb5mKblFBuykVejst7+w0jknreaJFwXpBqwN7GkrpJjsXi03 uwRqS74hRGZLeHHXsEK3Vum4zVX0VbRp5g2jvvFRXwU5zprb5Nyply8K4PyfpsePK5so eIxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:dkim-signature:dkim-signature:date; bh=SEGi5jSmbFvcJ6rHkzMa/iw5xUvXREz8Fj3igLvZIDo=; fh=r4AbGD3+mAlOTyijHQrZyqU42v92N3OwKTAJv4k06CI=; b=iDe3+3RmRizyJpJvMsN0T/+7xUUNTIhiCkEwOgE1YoNeQ75jNQSAaCneCRVw0bJC2I 7EYCo57O0RaINGioqUPz2miAM+U0Pw2MQjQfqVaZojzqvLJIR7WFfpj+XIHzxsPOVj2n vc3O7vfI+Ji7E4+/tRvOr3j658RPhvGgx54Lg0Jxg3w4EFQKOET7H6dxJAI7alMVOo2U jVLw6CBplXbBuL5+oQ4j8LB6zDBquXtDX/LU71uvzqvEEMCmycP1L5iJCeiDYZckRsFQ ne4lWdvjSZPHu4verdBGZFWcHj9ZJu02EB57sIoCu8Gn4tS/eejWv3kqTL6g/RKRA6fV zAlA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vz2COdOy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-153158-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153158-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lf11-20020a170907174b00b00a55ae761731si1744337ejc.377.2024.04.22.03.18.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 03:18:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153158-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Vz2COdOy; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-153158-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153158-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 141651F22C00 for ; Mon, 22 Apr 2024 10:18:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9240413E405; Mon, 22 Apr 2024 10:18:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Vz2COdOy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="g3URnho3" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 97B5E13D50F for ; Mon, 22 Apr 2024 10:18:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713781093; cv=none; b=N+8TP69cG1ayZ31Sw+c2doQnaUIkmJ/O2kVJ3+ksS1OpYKZkN1tPfy2+VNMfpZP1YsNlUw2ikNhY1mAhXkn9jGY4OEjb0ECtfmcszMLKMjbEVTdDAexj4JsoqoMvinYc0ZeLdGbX1dUR8wy4BC0SwXsB5a6XqzudI10haXjwyCk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713781093; c=relaxed/simple; bh=5fri6Do1LWefKjpdkdFuwWYG08OOrxumneX2LJURZpM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M7WjSJYZQT/ZGRLjYjJjcgc9xnfWTlzX03Am4dCfrCYxoEtVYonDNa/ruYgss91sWjW0XpErRStVzbsPSgcdYdQRhLpairbnX7fgxKdbeDO7A+XHskhKEXQ+h9YCaJYkLxUpOMuI4DM1qXA/J8X+gd32DzOhUUBWOGgIl6D5eWM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Vz2COdOy; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=g3URnho3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Mon, 22 Apr 2024 12:18:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713781090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SEGi5jSmbFvcJ6rHkzMa/iw5xUvXREz8Fj3igLvZIDo=; b=Vz2COdOyzc+1o2jJr+YAgI0Rycu3v4MdsLKfW4ILm+Gd0861D+fGU1NpwDflGutA9bHMiV 8R2RkB6JLbkigRAtvztHmQjxGDd5CaSc9Bs2X6Pw6IrwRWOA007Ah5OkHq2Cug/7XxnpR/ iSygOCbqsVOryYTogK+YJnRpJIcKWFpC6IpMaqkw31+zFvp1HVLxEJ0IWTw06vt2+g3v9e pTn8bZtFKa+pPTjcGGpIn+u5mMT41jVOBzNaafwE/nVIOtuERIS1VOEHkfNjoY1G3CwCe9 tBDBjAikSZaziPbkhPbdHFHMo4wUvU9w5L1FkMzWk8Bw6iYYiL/U+K/WSAq/Iw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713781090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SEGi5jSmbFvcJ6rHkzMa/iw5xUvXREz8Fj3igLvZIDo=; b=g3URnho3e2OuY0PBfqEYJ+v/Dml5TfM0Zc12WW8MjB11O/bwt/LFJImI0ygj8v2X3b7ttV 1hIgZ2AXb/KkVwCA== From: Nam Cao To: Mike Rapoport Cc: kernel test robot , oe-lkp@lists.linux.dev, lkp@intel.com, Linux Memory Management List , Andrew Morton , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Andreas Dilger , Arnd Bergmann , Changbin Du , Christophe Leroy , Geert Uytterhoeven , Ingo Molnar , Krister Johansen , Luis Chamberlain , Nick Desaulniers , Stephen Rothwell , Tejun Heo , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [linux-next:master] [init] b8de39bd1b: BUG:kernel_failed_in_early-boot_stage,last_printk:early_console_in_setup_code Message-ID: <20240422101806.NkNd2Ksz@linutronix.de> References: <202404221524.4954a009-oliver.sang@intel.com> <20240422082942.B750cniQ@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Apr 22, 2024 at 12:18:46PM +0300, Mike Rapoport wrote: > The kernel config here has CONFIG_DEBUG_VIRTUAL=y, so __pa translates to > __phys_addr() in arch/x86/mm/physaddr.c and __pa(-PAGE_SIZE) triggers > > VIRTUAL_BUG_ON(y >= KERNEL_IMAGE_SIZE); RISCV also has a similar thing when CONFIG_DEBUG_VIRTUAL=y > > x86 has __pa_nodebug() that does not do bounds check, but it cannot be used > in generic code because no other arch except s390 define it. > > For now I don't have ideas how to make this work in the general case, so > probably we should only fix riscv for now. Agree, let's just fix riscv for now. This time I will cook up something safer, no more __pa() on a potentially invalid address. Best regards, Nam