Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp139688lqs; Thu, 13 Jun 2024 06:20:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPoBESMDZXoWodJ/aV6Gx4VLdMb4tiS7wvHrtax+LC04ZxxtLMr1i/LnHqj+CoVauDzwgEyUbZSpOyud9BeGGcO+mu/s9SjhZBtbB9tg== X-Google-Smtp-Source: AGHT+IGm+9ITTRrZ+DlSn0vEjUPlhyRsdRcsiBoNZ+INBvQOh8LauUWSSj5g9VQf6HROG43mTc5k X-Received: by 2002:a05:6808:128b:b0:3d2:27c7:21b8 with SMTP id 5614622812f47-3d23e0cf698mr5714386b6e.37.1718284821668; Thu, 13 Jun 2024 06:20:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718284821; cv=pass; d=google.com; s=arc-20160816; b=KYFp3hoOTO8+gEh0n7rA+lRQoiPP5hA7MezmbVgynRKjKDT+cgXdDUVpKer7ztDDEq 2Y7IC8yk7eE8mU5OWeMJi8aQVFKFBSNLMIJs9ifPdy5ZH9dm54zS9eAD4Qdp1a7p1MP/ gsgtFBNhbYRdbHG3bOHJPkyEs37EZIsjVZuGoVDgktDZCgjZZkT9Y+TqzDk3LRx89gBU 26oqlJqmF2Y0ZSFNgEFqNK6rZvg+Q9IxAWnsHO6BY0REXQIFBZt7FHO3xaNSY6hsfivJ i0MWTnKY7r0dXasLxzJoYwaVLhI/I9s5UWRrmjJOBGis0PCQ5/LPFZRUBzPGRhQP4oOr Wf4g== 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:date; bh=zGFP+b/COca0mlG4yMNIePS5t0koFu7QdtN6l55WWac=; fh=/LKHazGfgenY0SkBe4lfjW00SBY9rBwsAjtvCYO5Fvs=; b=kREzjtBL7EbeeGRX7PiNU3k8P8n8phv6hhA9IZf2HT+Tibj3exUT8yQVqnAvt0Ppan MpCIXEZfSkEbGKfJST1NgEqlZ9MpSS9/SYuCPOgAFcFobLAeHhiNrJez4iaquYNDO4Yo XJoMrE/Toue0WndQs/9C+pwv9QydU9uCyP682r0KKv+vPN2DHQJ4oxt1wAItcskd5yMk Prz0NiLRJElnnkBDJDHTm7Yi2knCOx9m8SKF9Vi9wRqZplmZsjV45V7ahyWTahKTgQJF 6p5uaT5nUE3mptYXhjhyDOD1C+YigzvC8ByIYbyPDbiLXWXY2HiERCUL3Cc1c8otCFpo dj4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-213285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213285-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ada2fe7eead31-48da44b28a0si199814137.620.2024.06.13.06.20.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:20:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-213285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213285-linux.lists.archive=gmail.com@vger.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 58F8B1C229C6 for ; Thu, 13 Jun 2024 13:20:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E12D14430A; Thu, 13 Jun 2024 13:20:16 +0000 (UTC) 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 D9A2F142623; Thu, 13 Jun 2024 13:20:15 +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=1718284816; cv=none; b=CaN66/Fx1aCNq6W7ua7sexHRNmqiu30vVP15OeQ6zaSk5Q/Q4e8KJz8oFsCJDpxiK/JLjSJpxTyQSzMt9gqREunbErG+368kYxRkibSIwY5NRoKPm9+8PA01mkpF2+nOVFI1Bf673FJL+S6nJd0cXXYLib8ANiGwKIqeHFR2zwY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718284816; c=relaxed/simple; bh=j+ZRgUOzIDJat4u1tQYC1sCLBDeq6cEI5sb5AQpJBjY=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=o9flraEfpXtPV8FeTr8/Ho9U7fUN8phTzQEqtVtImC/IMPkiJtVwcQoXWe+dg69hPQA8226s/P3X/oEiCcKzxmLhO5uvJV+P87ulk8B5JSN3LZOJKkP1FS+FaYsvo5lOfUmbyyqdt+c634ShSewVMAmfCyO+kli5U6pyeaBvyPY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAD09C2BBFC; Thu, 13 Jun 2024 13:20:11 +0000 (UTC) Date: Thu, 13 Jun 2024 09:20:09 -0400 From: Steven Rostedt To: Mike Rapoport Cc: 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 v5 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up Message-ID: <20240613092009.5fffa4f3@rorschach.local.home> In-Reply-To: References: <20240613003435.401549779@goodmis.org> <20240613003508.752963299@goodmis.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 Thu, 13 Jun 2024 09:00:31 +0300 Mike Rapoport wrote: > > + /* Make sure the name is not already used (size is only updated if found) */ > > + if (reserve_mem_find_by_name(name, &start, &size)) > > + return -EBUSY; > > I'd prefer another variable here rather than size. Will be more robust IMO. It's a damn habit of mine to be frugal on the stack variables. I'll update in v6. -- Steve