From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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 0801617B401 for ; Fri, 20 Dec 2024 08:01:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734681683; cv=none; b=ZCVwLyVhsaRKThFZw9mswJGuIDaRqYyfve/ZMXQ/GBMDCpriK35aPutSe0HyoAQahhD5y/I8NhHA1dTHAnUqD+SL8yEQnI/WkQFuMlMEGENd9Vwtlt2NIP2ID8dLB8xX5SRBz3cqPVt+nbu6E9AioBr6EZ5SW3Jj9chrS515G/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734681683; c=relaxed/simple; bh=NE5UTe5dL2tgOgREltmleH8b3bpmPCFrFKyTspmMf80=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CjnrSXdeWlqxzUO5wgHrfcqGb0mqhhS+Lkp1E2q9pJZ/j1b7J3+v1PgloVtuXdV2c9xavF96iQ02Qd5irSzSq8EICP4wvwnvf+t1N8NHqcy6vRa1xBb+BgxCQtO6O4NyB/Ucy5SzDikh7onJIOoi+vU+oZz4dut+23WfR9xpGeg= 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=eSmJO+yQ; arc=none smtp.client-ip=209.85.221.42 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="eSmJO+yQ" Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3862df95f92so850765f8f.2 for ; Fri, 20 Dec 2024 00:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1734681679; x=1735286479; 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=SKyhp6BgensMeRRvZqUrPCxPSGMIyjt3ZLLIV46HEEk=; b=eSmJO+yQY3ikfctv/+vARoTLpS+jvxLuxKKJeDrJhxiSb7hdJ+1fSF8rRrPOVj2clx QrTWatFfb3IV9cnQpuQlyxl1wsfqnL194XYptUwG3y9261LiEDC9mWJWs8UtTrIpxiU3 +kTe9sLwEx9NgfDb/nNNIXNR5JteW5o1rCLyKwVRNU2QStpSO3+nU72ehJlcFu4qEWmt 4mN7cKp2iErz8+cKXD8zwijAdlleqFVq6P1+pMjRoDnuHJvabdVnYRPX1AD3tovZbMfF s9SbVyPKtO5/OmKAstUUp9Z+/d9hs1N9tLwOz+z8Dq2CcSJy+QJ1EkB7KfLDQziVoZHl wZTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734681679; x=1735286479; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SKyhp6BgensMeRRvZqUrPCxPSGMIyjt3ZLLIV46HEEk=; b=DBZ8lmv9YjIKED5rnLNtxhCMU3nf4XbEVlVqrgMFa9hmWeYOzEX4H+6ifyU9udRaxo +jfjjZZGpUqz0GhWKSSVcEPwiu5k/yETAfRitctgc97iX7QbwrbJ3LyYxKoeHc43w7zp Z/QRUrLLnNuCpUWeZd5PbSqrQQG2lL+jzpn6G0ZGwNGkPa5Uk7AgTyBnlruIfJ800dXL dj6Ue9mzy2nb2na0ROZfT9Z/oHI4B7J+H2J206GsP7U5Pzt0or4B6VQhuH0ndnRBEjpI 6ri1gQAW7MpcfGbSOAVHCcp2qEfdaduY5w7Cirf0bPn9HoWfq4+QodPgIwkPfyEYL025 DKug== X-Forwarded-Encrypted: i=1; AJvYcCX/hTnvMhFFzARZxsemv3RG6tL8oBNI+NJlh40OaNQlXj3b9bJd7Hf+Yoa/oMw/32HKk8c/S4UkobkFB3Y=@vger.kernel.org X-Gm-Message-State: AOJu0Yyo7BXXNRkCY4LUTn80tmQxnyOqOqKEPRL8n3K3m6EVHafbMbfO tcqohoHRp6W18QAukyZfZCI60t+YDtln5LH6STL7Tm4G64mVPIHD5lf0n7Jl2Ac= X-Gm-Gg: ASbGncuHuRCaIw0j9um/5gv9pCTcQxgn97IUJsdJQJ3sVE6yfcusPsYwllWaqqGVL68 fhTP5DgdAr6wjodoiC7nFwJDabg2qrKqWalYKkGHc3hzVCqsLWvmUN9/9O9xmjErsKj+rG1vthW MTMFmLT0WNn/xgyXqQLkELCLtxppDogT+tM2k4m/Ki8c0BR3MnJ3dTkOB6M7mdj5HQ5E6Hdgeb0 rA95VH9uVuajysxpyqPUBN6YZ10uCEIM+FVEcG4wAjYGm056SL+F5Wrqg== X-Google-Smtp-Source: AGHT+IHXox4MGMtqEmaRQepNLJ8T0HqucVd42uEX9LRMu/wtsBIAtfuFnBpMs5FOY09ZQTPXYQQpFQ== X-Received: by 2002:a5d:598f:0:b0:386:424e:32d5 with SMTP id ffacd0b85a97d-38a221ea939mr1735076f8f.14.1734681679359; Fri, 20 Dec 2024 00:01:19 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.50]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4366127c488sm38048325e9.27.2024.12.20.00.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2024 00:01:19 -0800 (PST) Date: Fri, 20 Dec 2024 09:01:16 +0100 From: Petr Mladek To: John Ogness Cc: "Rob Herring (Arm)" , Linus Torvalds , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky , Jonathan Corbet , Saravana Kannan , Andrew Morton , Peter Zijlstra , Thomas Gleixner , Zijun Hu , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: lock in vsprintf(): was: Re: [PATCH] of: Add printf '%pOFm' for generating modalias Message-ID: References: <20241217183711.2525863-1-robh@kernel.org> <84wmfxm6em.fsf@jogness.linutronix.de> <84o7171o9y.fsf@jogness.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: <84o7171o9y.fsf@jogness.linutronix.de> On Thu 2024-12-19 20:17:21, John Ogness wrote: > On 2024-12-19, Petr Mladek wrote: > > I do not want to revert everything now just because of theoretical > > problems. > > What would you revert? This has always been an issue for printk(). I did mean the already existing printf modifier which already take a lock, for example, %pOFC. > > Well, it would be nice to document the lock dependency in > > Documentation/core-api/printk-formats.rst > > Yes. If any locking is involved at all, such specifiers should be > documented as not safe in NMI context or within printk_cpu_sync > blocks. Also, it should be checked if all such locks are > raw_spinlock_t. If any other lock type is used, it probably is already > generating a lockdep splat since printk() formats records with local > interrupts off. Great point! > Perhaps we should create a kunit that calls printk() for each of the > supported specifiers and see if any lockdep splats appear. It might be possible to somehow reuse the existing module lib/test_printf.c. Best Regards, Petr