Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2133223lqt; Mon, 22 Apr 2024 02:20:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdoXfX4CSy2axFYRiH+SRm7ukn20APAQOUOtewKirSNEYhcIP9MWA7k/JVNVhGPuCo9RfMiBw0zU6AdUCmPCsyNf/FgzNePaUEKEEaMg== X-Google-Smtp-Source: AGHT+IE9/MohUYg2BEYaqyVg/lo1AhPUaqc3bx5C26RmLOINzAoOqcPBDBnQBgK/gkUMx8SJpUwY X-Received: by 2002:ac2:5dcd:0:b0:51a:bee1:f45c with SMTP id x13-20020ac25dcd000000b0051abee1f45cmr5820501lfq.12.1713777656037; Mon, 22 Apr 2024 02:20:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713777656; cv=pass; d=google.com; s=arc-20160816; b=fTGJ2dT+hvPsYJ7ZM4Xjl+oHw+BVU4zwZDuCeHTIofr7RjZ0tKXmxKbOQDcY7Rq2Ym A+x/EByITWMk5Kvmwl3rIV+KL4IiKghwddgfemqBTUb3HJtyJY521ehcBR8ooePn5fzp TGMUH6BOfTmFH4w2YMX4thw0dq/zGmG8vTJ5ZjbZZo20WK6FMxp+MVsrqNiXGS1V0E1F mPDD78kqnqs7For08+jXyxL8+RYT2lqPgReFBlYWYDl76SUL/2KrbyFjW8DRtQJArxPZ Q6PaCwjKwT9QwblKptOIx3qx3g4vdWdG6DeV//WFsWZ875fvQgVvTKLwQnmjT9uXzXVU Iksg== 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:date:dkim-signature; bh=OVmwFJzmlp6pR8gmS0c9f8Wt+33QqURIFU8urUBMwiw=; fh=eaFYShMivHknDAMcqXGlw29r8wniKWWo6kdTMYvOoFc=; b=NvbF8pvQx4io/iFsnHIyS0/wA6Orm4RnKSQLdPOilYSHy1heQqTuSarjiNGliiBqNN Os6IUVYay1Ax7lG7njXjeL+ctQ5AvvGUmiopBQ49/Fa93Q5KrlNM0ojht8NAmAL5U5xL yTt96wT9YlkrCoXoo9vp5bHjsQEkAxNuDKveKntE5D3mYxNl2j26Gx7dB/cgieD3xCBQ PvUvVU7+OyxWOr4rJ4BjeLu6m4uPqqQy65nFQt/gus5Cg9Zh5NW7eVRAhXQ/EA3E/N7V TSCNfVAI5REkcCdOICHfv+ZSv0/epqdZpmQPspZ6nXnWAmitrM+JRA2p5mkU6R5yqknK k7RA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dnXjpYmU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id n10-20020a170906688a00b00a5563f42eafsi5563908ejr.295.2024.04.22.02.20.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Apr 2024 02:20:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-153080-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=@kernel.org header.s=k20201202 header.b=dnXjpYmU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-153080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-153080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 BC1AD1F213DC for ; Mon, 22 Apr 2024 09:20:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4773E5644B; Mon, 22 Apr 2024 09:20:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dnXjpYmU" 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 6D9E913D297; Mon, 22 Apr 2024 09:20:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713777604; cv=none; b=Oy5WSjBKOhXBj5d7kNr1YKLwoCo9amfoRcgk31b/V8r68AQ5N937amDvcCK2aRgEH62M4MdIrrqWyUuDjCJ4gMogZ0aPBfxlYlkQNxcIAqjH74f3sMbWyAf1gNKeXENBfjyx60AaU8NKU4zYzceNabL63QEaTG6tBZcguZHQrQk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713777604; c=relaxed/simple; bh=nZb1WqOKzpgix7JF8C81SkQWvG7tYsydr8OknjFa2/s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JAbpt1SHVX5g/wnb3i6EhVeeZbDwL/a+A3thMc+LhBu2VsDOxCuuGkDDfePBJ5CA+LN2i5HM+z6/AsNbcpj/FXB1WJUJZg7lyARmkqcy+eKto159kHG1zpWmtKTtxNsWgZRh/ExpXHVgBCsQ5ItXtMwoXGACWXOlRzCZ1EP/ox0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dnXjpYmU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA1DEC113CC; Mon, 22 Apr 2024 09:19:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713777604; bh=nZb1WqOKzpgix7JF8C81SkQWvG7tYsydr8OknjFa2/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dnXjpYmUkjd+sbGilXiYyKMgQijrPvrQxNUMTxQ3sCteoQlQ9gwJrU+mjHtH7VFLF vI0fWmNdDFGFUTO2uSdbQAgCsgN0TYLHBv4GgxGsDt6Tdjnkf+8BcV5YTK9dKjJi42 xMqJTi+n5IaSYLNCgyWiOBX+FOWNPapwGiYEXWHNQmKNx56SORlAmAAxDM9WAG/8yj 77Z4zt/izUVens3e3PVA4u2ldSvZTEREiEa0FvNE5L4i+Ic8IuJgTuE6mQw4ANKMfT 0h4kVTKQiijNjfUmYt3wyWUFmZ2XZhi6UqafkbOuSAiKbM+MTIgMAhPnIMMXcfw3dd iRITs0SPZNKOQ== Date: Mon, 22 Apr 2024 12:18:46 +0300 From: Mike Rapoport To: Nam Cao 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: 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: <20240422082942.B750cniQ@linutronix.de> On Mon, Apr 22, 2024 at 10:29:42AM +0200, Nam Cao wrote: > On Mon, Apr 22, 2024 at 03:45:00PM +0800, kernel test robot wrote: > > kernel test robot noticed "BUG:kernel_failed_in_early-boot_stage,last_printk:early_console_in_setup_code" on: > > > > commit: b8de39bd1b76faffe7cd91e148a6d7d9bf4e38f7 ("init: fix allocated page overlapping with PTR_ERR") > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > I can reproduce the problem. I rebased this commit onto v6.8.7, I can still > observe the problem. > > No immediate idea what is the problem. Backtrace from gdb goes crazy: > > (gdb) bt > #0 0xffffffffb2074ded in ?? () > #1 0x00000000000000a1 in ?? () > #2 0x00000000000000a1 in ?? () > #3 0x000000007ffff000 in ?? () > #4 0x00000000543ff000 in ?? () > #5 0x0000000000000000 in ?? () 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); 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. > @akpm: drop this commit until this is figured out? > > Best regards, > Nam > -- Sincerely yours, Mike.