From mboxrd@z Thu Jan 1 00:00:00 1970 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 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" 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