Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp1295678lqb; Thu, 18 Apr 2024 06:08:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIm4phL0jFm4xH7luErsUcryx4pjEtM711FUs96Ki2+PKbHNRKe3qnImSaM1AL41DqzY4R/B6PpIcvZc0Jn5FHoifUpksk3brSm/w9Gg== X-Google-Smtp-Source: AGHT+IFELJuVRKYwSoVMngRWNqONtkSwQslUCOxSdCDrfEpcLY/7XzaZR72UAvPpZw5K1jrkWI9J X-Received: by 2002:a50:954e:0:b0:56e:2a3d:eccc with SMTP id v14-20020a50954e000000b0056e2a3decccmr1780521eda.1.1713445697547; Thu, 18 Apr 2024 06:08:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713445697; cv=pass; d=google.com; s=arc-20160816; b=rChnTkTtInJzs9c7eS47zNf6mkJFEIKas6mMbJ5Xkj3jHCM0YkGexSS0are5NLCQQV qj8WzuJc5BYkSUtgBrobF9UfSwLhyZIJ6fVc34968OUmhRZvFe22zar/ArzLtwZn9yVk jK1jvOLbAuEKR4GyxYUIQh9E2Y2N7rNHmVbN7DALqRJGPSxJDDlKcGK/eLPggOdkUK5n MzR/duftgpEdt1lqluVVrNkKRTx6r16rTbhznvctctvtJwkyFagwsM9I2LR4TS3g3nE1 63njLnyDAtPXgPeqctetIUgl0JdmqV6rdTK0fS4w8DqGbH/VHoGTNbc/55h49d9odIVd e0HQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:dkim-signature:dkim-signature:date; bh=Jvo4IB9EX2vgtvJVoBdjCViGeeUjaKsOvZ3vCy38w78=; fh=b037kyeuPOSWZrgwNr9eqq57a7kPstGHxe/RC09DF28=; b=I/u+5/yQsZeTN5WqiOJpG34Bj1pZOzatdwwWErq7q/2XzHwArZDE+OPUx/PZwG62R2 3FpvO0zZNQyynmCHvL0HkYWDAHwpsFnM5z4ECiNwaNUilRmJ7ITYjqvrfBSQf0EMprn/ +Neh7L7EIjFvSbgGMarSSrSZTPjX7JcbznELSHt4WNd+nLVwAYU6julY7GDG/urqneSL 2zojXGjfiK6r2GvYqImqLxdJfMLUmMyy5m7XUvHjbd0I7W9I050NVjwz5MSb15QI4PkM kj2yBkc26LLxFj+4mHyejcU4jsuIx2NtupC+6oMhIaTMckkUesQ5adhAIGt+i8kUqqEl w2Ww==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=c2SdpSPf; 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-150133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150133-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id df7-20020a05640230a700b0056e2e962f95si856258edb.164.2024.04.18.06.08.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 06:08:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=c2SdpSPf; 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-150133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150133-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 E19E31F2225A for ; Thu, 18 Apr 2024 13:07:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75F6D15FD0C; Thu, 18 Apr 2024 13:07:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="c2SdpSPf"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="43Uwr8Sp" 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 4E8627D3F4; Thu, 18 Apr 2024 13:07:23 +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=1713445645; cv=none; b=f8zyn86hkTPL8MJVFi5/evi52xgShcZLyz1FmsTpys6viWbc3x8f0vtstUmZ+kgnWUn3tXDVOEQge9teK2Ik0fAqYmcHLswIpZ1nWXGf0tNfnJvb+GFlWInvFIWJTMYVpI6b9/mbKLvNdmQUjgumHDuOWFwhxtr4xyh1BgRV7bE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713445645; c=relaxed/simple; bh=1v4N5EsQsjae7OpqL2Q9UvstpG6p/njXQau7/gZ2zuw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aTExTHl+18RSnbcyZGWqPaVbzqkcktKByPYohiaRpy3Ma2jl6kH9MpyxQC5+M4ucNAwh8NjtIc8iRk5NEDjkKcIBlkKXf/qdKSRBxeauAVQIcBi3LIXu/VDi5qExI0pyi0OG+h7Y6UNIp6/73NogJ77QrydjR2Xysm/3NPPgE0U= 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=c2SdpSPf; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=43Uwr8Sp; 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: Thu, 18 Apr 2024 15:07:21 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713445642; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jvo4IB9EX2vgtvJVoBdjCViGeeUjaKsOvZ3vCy38w78=; b=c2SdpSPfmg8garIOwBGnXvJv+xZ574a6J0d+i6DmmczkYNsWCT1YJnHLNMguhg/C2xkOXx cCdeYwnJmftxBmq8OOHCS1zzpnMSxVrb/84exI26N/KDpVKbTVRvBAi6Dnty/SzPQFkZxh Aj63zVR9bT2z8Wo+8PiOBaDZQ6XU82YW6AbudIXj4FNLOXwH8bhvwSBmv6zeDMAOUli0KN NzlpiBoi7ShRCggyBm2Vp+wrXAL7QFHbGNa79vLUwtTvaVvXtbKYASJCMeIrb+DjyKj3hU b5UpUIYtpPLOjMIeAvlaVGH8G65L+TKxTROEHUR3i8gcPZ2bCtB6MlXc8UEvfg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713445642; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Jvo4IB9EX2vgtvJVoBdjCViGeeUjaKsOvZ3vCy38w78=; b=43Uwr8Spr789PRY19/kpBrkAVJmwqG6R+wfHSCcTUl4PAEWCZfc2pvl7hw6yFtOqkJyayk MQvkZ6u8hA2H+IDQ== From: Nam Cao To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: Mike Rapoport , Andreas Dilger , linux-riscv@lists.infradead.org, Thomas Gleixner , Andrew Morton , "ndesaulniers @ google . com" , Luis Chamberlain , Ingo Molnar , Christophe Leroy , Tejun Heo , Krister Johansen , Changbin Du , Arnd Bergmann , Geert Uytterhoeven , linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] init: fix allocated page overlapping with PTR_ERR Message-ID: <20240418150721.25d0e82b@namcao> In-Reply-To: <20240418150148.6a0b4664@namcao> References: <20240418102943.180510-1-namcao@linutronix.de> <20240418131238.636bee2c@namcao> <87edb2sv0d.fsf@all.your.base.are.belong.to.us> <20240418150148.6a0b4664@namcao> 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-Transfer-Encoding: 7bit On 2024-04-18 Nam Cao wrote: > > Mike hints that's *not* the case > > (https://lore.kernel.org/linux-riscv/ZiAkRMUfiPDUGPdL@kernel.org/). > > memblock_reserve() should disallow allocation as well, no? > > He said it can't be removed if we set max_low_pfn instead of using > memblock_reserve() > > If max_low_pfn() is used, then it can be removed: ^ I mean memblock_reserve() > https://lore.kernel.org/linux-riscv/Zh6n-nvnQbL-0xss@kernel.org > > Best regards, > Nam >