From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5509A35E1A0 for ; Tue, 16 Jun 2026 12:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781611506; cv=none; b=UHQrOOE7HTYWd8Li4HTFNwdMElLk0OODjL4xN7XFluFYXkAyGYkMN+tsLbdDvlStT22SjaVUfmP9u9gwFdZnZ70nuQxezNpJC+h6sMAfO9YidEZGaGCzlfAuK29MpFwKsA59Oh2SKolg6rbnTpsYnQM1l8KcQ4WTPa3rS9HmXuw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781611506; c=relaxed/simple; bh=Y65UJ61CMqnWZR1gLzueNzDYVmNsS1ouJNPiKEL2+Ps=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KJiySX3oUUj8+y62XehfkhdluMqZ+ukQKJclf090X2T28Z7iw9xnQ2JNsvDGUBHFTyA5HbCO2hsN0nrHautpicmweynYJfZC+AOguZor7pyFeTlu1IzrcTdQTEPN+53NVV3l46RS8PKZrCgOvVFv/r4IfwFewenyy2jckXKQECQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=FkMuExdm; arc=none smtp.client-ip=209.85.221.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="FkMuExdm" Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-45fd45e596cso2528085f8f.1 for ; Tue, 16 Jun 2026 05:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1781611504; x=1782216304; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ba08AmfoJHSq9leZ8FXnxXba91ul64yTu1GUmfBDRVQ=; b=FkMuExdm/S1DdjGsvwiX5mZZqlCpuM/moBuKGOroFyTNSYQV9abwUPdlqx1Jy1qSB7 hT1jZBBYpZDieC+RJDvkwcLGm6iZ1GPMT9N5q4iD/WflFy3d3u0U8zqYUAkqu8ryhr9Q HPCSeRPYa6r+KYWLAxeL/BmKQtPyfk1SoMICEg0gMryNa2iw+1+8tfkVqN3TXq+8WFke nz/ddV6UFeoJ7hqEnrvwdwHd13hSvJh0QSxgSlUPxALZz/LhwVmRW+IB3c1exLCNUrWk A3m5T9rnFV+K7aXSRhSoQP3Z6CoDTEAAwbgUVZK+WE5o265c88tN0g0owlFbEhOla++c pRYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781611504; x=1782216304; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ba08AmfoJHSq9leZ8FXnxXba91ul64yTu1GUmfBDRVQ=; b=sXS86wHK6KOhkiCgkBvgXP3sHgklsOaJk3CFMHsxC1cNsSD0m2Sv7/de6MLdSYAxL2 0H3815QeJDCq13TZD7EW4SKKnZUqplgrU1hXXfIRtWreUprcVoLP6rbDinDW63wwMZiD wzH1zWZOD9n65WrpogRLQsjXNteTHJlJsObvsHWPvUne7q/z+xrOF8lnzaknJK53jWCW AX0dzcC+y8ehJvgepmyh8tbyNQeWtrNoVT9cc7maegiwtJJqy9mbEdX+4ODfXsk6kxgh k8YXpPLp/4dRZzoxA8wkDK2oD3NC4CEEV3roI2BNO6eVGeNSh7JWdLFViHhZmVv3swIX uk7A== X-Forwarded-Encrypted: i=1; AFNElJ9RTYs3PiO+rKIvHzKNabu6v26i0Cd3f2SQ7XqnhCeOegBndZj9CvuS4cLvHBmAprP1LxVIJ2rWEE6nuA0=@vger.kernel.org X-Gm-Message-State: AOJu0Yy44RZvOyZRlTccdakkSXmoHS1oHEp/4y2CZYbioNAuqdQAULWl AokU0lhE7tldR8eOhjEp2nklKwyc/XV/F5urdUvq2NSbNS3SbmBexNRPlDpWwU/Ztmg= X-Gm-Gg: Acq92OEei0bn6F4GVzP3hOK6u+UDnoy98jLkPgBvO6WaNxR1MU4cqfnkCEBTCCrojNs SNnZrFq8zMVQZoN7Hw1X1w120Q9E2EpNs9lTJ9kEUV1ncr/lPih0yuNXz9t1/cnOV43F62NdM/W LBBIibkJAwo2NYEr385Fl5ef0vnysgGOiVoRG4vBGWjdI/LMBZKcFbJwX3qzXaVDq8uIamRHkOT Ln/76T9hNH9/YtpaLdEeZicZEKJAiO39kSlALPoXyGhybSq4mgWJPnQeqM/XmZNVskXcTnDC3u/ D7FVtPPprgFcmvfxpfjwFXa8ucLcLQBS5Aldv22hkKqHHTW0UKVbmaKEBFltCpyawD2zvieEzVG 50MC8SXJYaLL5kSIyCEvAYHRFedQDwWsPU4fd+qpOoD+zY078jjckOGk4VoJSMDHsVFSYHjhzDr feCzgdyn9On/ZTfTauKd97OrUdaQ== X-Received: by 2002:a05:6000:46da:b0:43c:fdd:ea96 with SMTP id ffacd0b85a97d-4619f3020a6mr3708971f8f.26.1781611503313; Tue, 16 Jun 2026 05:05:03 -0700 (PDT) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f2b0d28sm44995331f8f.20.2026.06.16.05.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 05:05:02 -0700 (PDT) Date: Tue, 16 Jun 2026 14:05:00 +0200 From: Petr Mladek To: Kaitao Cheng Cc: Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Andrew Morton , linux-kernel@vger.kernel.org, Kaitao Cheng Subject: Re: [PATCH v2] lib/vsprintf: Make no_hash_pointers take effect early Message-ID: References: <20260612030642.14239-1-kaitao.cheng@linux.dev> 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: <20260612030642.14239-1-kaitao.cheng@linux.dev> On Fri 2026-06-12 11:06:42, Kaitao Cheng wrote: > From: Kaitao Cheng > > The no_hash_pointers boot parameter is now handled as an alias for > hash_pointers=never. However, hash_pointers=never only records the > selected mode during early parameter parsing, and no_hash_pointers is > not updated until hash_pointers_finalize() runs later from SLUB init. > > This leaves a window during very early boot where %p output is still > hashed even though the user explicitly requested unhashed pointers with > no_hash_pointers or hash_pointers=never. > > Set no_hash_pointers as soon as the "never" mode is parsed. The later > hash_pointers_finalize() call still keeps the final policy decision in > one place, but explicit requests to disable pointer hashing now take > effect for early boot users too. > > In Documentation/admin-guide/kernel-parameters.txt, the descriptions > of both no_hash_pointers and hash_pointers= are already marked as > [KNL,EARLY], which match the current semantics. > > --- a/lib/vsprintf.c > +++ b/lib/vsprintf.c > @@ -2361,6 +2361,7 @@ static int __init hash_pointers_mode_parse(char *str) > } else if (strcmp(str, "never") == 0) { > pr_info("Hash pointers mode set to never.\n"); > hash_pointers_mode = HASH_PTR_NEVER; > + no_hash_pointers = true; > } else if (strcmp(str, "always") == 0) { > pr_info("Hash pointers mode set to always.\n"); > hash_pointers_mode = HASH_PTR_ALWAYS; Sashiko AI has a good point that we should reset no_hash_pointers to false by default. It would handle the situation when the parameter is passed more times on the command line. Aka, the last parameter wins. See https://sashiko.dev/#/patchset/20260612030642.14239-1-kaitao.cheng%40linux.dev It is not a big deal. But let's do it right when touching this. Otherwise, the patch makes sense and looks good to me. Best Regards, Petr