Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp477079lqp; Tue, 11 Jun 2024 09:42:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXstXSfD5zCnFWtL2ni4Juvubwt6jd7uBiNZJuizqDiDzTZ7pPDg5Rq1jyEkZFOzgVGiy/Cc78KmQYvwE/2waj1JKzak9NA+uDWRNuzNg== X-Google-Smtp-Source: AGHT+IGhLguxWyx4LJjMj/RIBrLWkK+ACDbDcKaaqWVbQJxbqu00qjjtQL28qav6lCPpvE5ujL/3 X-Received: by 2002:a17:903:2308:b0:1f7:317f:5454 with SMTP id d9443c01a7336-1f7317f5657mr21712635ad.51.1718124120434; Tue, 11 Jun 2024 09:42:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718124120; cv=pass; d=google.com; s=arc-20160816; b=Sxkr0hzyxNa+nO0d5H8AkMs1L5mI+c/W3SN0AFoEh6Jxl8W9H8Fv3OpYN4CG6QdAq8 4BuT3qWmhlp5y6uVyc5LWeUzGJwxUn5gWwPLE6L16E6GP2ea1afR9yy9TIum+1KSDE1+ /EE8djQ4nISm/V/a3LzMQay0/RvvRpN+ltc7xZf/SmD7SlHxs8ls8suB5pqFNQbQwVRx BYyog/d8l48S8z7cAa3XvokvzmaDX7mtS3KeilwzhofU5FeFmOKmDoPgBYRE34cW/Tkf d6idknpiCq5WUGz8GPyQXFCOQMlEoK5uY0P9reyI8YdEARlgQody3siPSA8ioKWu9lX2 s+Tw== 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=RSRFIPyua+NghJjLjdMIVM7qpgO03eFR28BXwMenbLw=; fh=gRLjbJVE6/ZOM67WxTvzT+SK07PCjR7/xJfopMhqk2s=; b=CM/4YUDugmJX+TzO/03eS09aGU/9+EGreaLSFjaq8IJ4r/c+eIUoRoW8gFnmFxRj+l Ji9Pqjpkd826ajm/HP4jF0xwV7Q50ahPR5E2PSR7DGckufFfLHt00eULce/45/Qcs0fh fIt+SvB31Ib9bPaY8H3ZqNL383cbhrIQy70OZ1mkWoOm9L6GRHFGs+/rwnk/r6LrbTNL kl4nT//KfIF5mAcHrwkegIB19AhhOqyLN9Zvz26eVcd3kXt15jCwPYszu8hLnMosjFG2 fX2PPScXS+y/raN5nKq7qWxAK7tAJD3eGWp/TNWQSJgBPOeNheVJKAXBSXHFXAVMvGXT 9HVg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r0SeGOy3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210254-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f70838151dsi46446255ad.126.2024.06.11.09.41.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 09:42:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r0SeGOy3; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210254-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210254-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B77B4B26A2D for ; Tue, 11 Jun 2024 16:33:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6860446AC; Tue, 11 Jun 2024 16:33:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="r0SeGOy3" 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 07C1E43AC5; Tue, 11 Jun 2024 16:32:59 +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=1718123580; cv=none; b=DKuinD71/eXNacXUV+qzzRfCp38pDgswnKy7QkGSqR0+dczBSGoi7nIFXmnqkA/KxgyNJVCYAmxg0sowgyyAZSlWNcnFg8dW+ai9ktE/7rtNbjMQdN3B7M/ocws+o54zkt17vC2IWfT5T7epE9Gpz9LUcX07PQgMeJjWWa4uRfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718123580; c=relaxed/simple; bh=lMxIU0XrRl1uDi4V9mQvR4uYAOJm3ABeMJ3659SyNfk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YT4jXQFFVRX14SPPRyXV3JVgQDFt47/1iYHk7kFLLaF8WPWGhB3ZN3RnBtezLQr7+M6aMJ1ZkA1eiWLV/LRPvmUoJTHbvNgfvmcXnFhDjgkA4nta7YXYEqpJty1G8jbute7dQVCHiCuaaYXsnHRosBp6h3AMhNyYkTwvOI8TfC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=r0SeGOy3; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3BE2C2BD10; Tue, 11 Jun 2024 16:32:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718123579; bh=lMxIU0XrRl1uDi4V9mQvR4uYAOJm3ABeMJ3659SyNfk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r0SeGOy39UxoSlhAVdG/eluwXKp2QUawAC6eypf/lhxLj2IwA1gM1z8lmQek294p+ GLzRrfwOaIjPKGOBjrQyqnAZuX2GsKHDggIVMiZBtedF7VIN+zFpE23EE3qFnZ+m/Y mChR4oemg9D9kd47zNiYzEYJhGlUemQtN6DtWwFZB14M/JHL6FGy+fEptHHt968qTu cb624KQo3PzMm+RZ5w7xryiNG4sCp74j2XCTNoEMvTBWNwrwy8GtHfMIF+RONjOUdn iiII/twh0quHERH/7BmNby08G2J3iqHq5xrIJy9hrrV6fTyEQ8sXh+3DKZXSSiBMzI GJv3BakXu2fZw== Date: Tue, 11 Jun 2024 19:30:47 +0300 From: Mike Rapoport To: Steven Rostedt Cc: Wei Yang , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton , "Liam R. Howlett" , Vlastimil Babka , Lorenzo Stoakes , linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Peter Zijlstra , Kees Cook , Tony Luck , "Guilherme G. Piccoli" , linux-hardening@vger.kernel.org, Guenter Roeck , Ross Zwisler , wklin@google.com, Vineeth Remanan Pillai , Joel Fernandes , Suleiman Souhlal , Linus Torvalds , Catalin Marinas , Will Deacon , Ard Biesheuvel Subject: Re: [PATCH v2 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up Message-ID: References: <20240606150143.876469296@goodmis.org> <20240606150316.751642266@goodmis.org> <20240611144029.h7egl4aif5mjlrwf@master> <20240611111218.71e57e0f@gandalf.local.home> 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: <20240611111218.71e57e0f@gandalf.local.home> On Tue, Jun 11, 2024 at 11:12:18AM -0400, Steven Rostedt wrote: > On Tue, 11 Jun 2024 14:40:29 +0000 > Wei Yang wrote: > > > >+ > > >+ align = memparse(p+1, &p); > > >+ if (*p != ':') > > >+ return -EINVAL; > > >+ > > > > Make sure command line parameters are valid before doing the allocation. > > You mean that size is non zero? > > I don't know if we care what the align is. Zero is valid. memblock won't like zero align, it should be SMP_CACHE_BYTES at least. No point requiring it from user, just update the alignment if the user passed zero. > > >+ start = memblock_phys_alloc(size, align); > > >+ if (!start) > > >+ return -ENOMEM; > > >+ -- Sincerely yours, Mike.