Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7304823pxb; Thu, 18 Feb 2021 06:49:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1h8o88+1RMuuNO5pV4ugHF+u/e9Rf9SfGThsOGz/bDqh1OnTnZEUtK0L2bwuvnZnlRW/V X-Received: by 2002:a17:906:7e0c:: with SMTP id e12mr4202600ejr.386.1613659787673; Thu, 18 Feb 2021 06:49:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613659787; cv=none; d=google.com; s=arc-20160816; b=V9i+wrRP7KfSqfMbDQ0L32mintgCOGlqWTkooNxnWnwTuobdD82Bmvb7XR+3phvtF7 uzZW9FXhIfUZ5RpWPx6NrGxfBlESrZuAfwu7uUZJOhpc5/fj3ZC0DZ168IeIY1f6lGAX bsdN2+MWrmRH/3fB9mX/dK9ZoY30O0oT4n6lECZCvdSGj4fdbQEwICkq3OC2/rP7xb10 hRCD//ou2xlm1TdUwQURO1no4hN+RiA6jPjcTqpybN+2mtrtCRYxJmik5H3Bjd2KZWph hR3JfHMO5u1KR87lx7S1CUTJz830pR6yl1aErpQCqODWZkIqrRqpYDLlQJglhJwYOrLQ S8fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=70e1UsXoaugeK3FBttnq9OkKk7JxPBGr+m2A3TXI9QE=; b=THDj0nFfQ6trJj48jdcJB8THUdwULJVVn6NkaeBRovizHVavlrEtLQV0gS6knalwxQ /b5Zzds5XHVPojhEWTg2isdv27Jgu6WE5FXNSHLngQpLtgYmzkUu4q3kLTI5EiUv5d8w kVJdLk4fCLTiZ63LWC0oVPqXgR/QHP9Pk5q7ijIgTnFhZpO9a7v1rMdfquKvD+qGXk5P xdpTia0b8zKDREH2xWjIISrCl0G7LgE0G/zHFWnkk1+OrzrU6jyiWQHe4NLdwgjCqWBa wTw05GL3RfqPTX7rJgBgFgmT6jJoG8C0QGqoNKT6sWmxwbLVeYNZ0qcgXBrdmNKcFCAR A9sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=a76FU8qH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si3575743ejk.711.2021.02.18.06.49.20; Thu, 18 Feb 2021 06:49:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=a76FU8qH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230165AbhBROpF (ORCPT + 99 others); Thu, 18 Feb 2021 09:45:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:56400 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233118AbhBRMj1 (ORCPT ); Thu, 18 Feb 2021 07:39:27 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1613651863; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=70e1UsXoaugeK3FBttnq9OkKk7JxPBGr+m2A3TXI9QE=; b=a76FU8qH4CBPtxa4C9Rpq1aLEyi5PaoDppoc9CNZTNPfKdkgJiNCP+eo+AbIvIWz8kqtN+ CNl0fEVDLK/fx5tQwNFDnGtYR6V8PWZzKQadOiaezJERIi6U65RzK4590bL3GR1m2ZArD0 Na0gnIE3CQjrE+uG/sANY6k4X7kq4ok= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 6E904ACE5; Thu, 18 Feb 2021 12:37:43 +0000 (UTC) Date: Thu, 18 Feb 2021 13:37:42 +0100 From: Petr Mladek To: Chris Down Cc: linux-kernel@vger.kernel.org, Sergey Senozhatsky , John Ogness , Johannes Weiner , Andrew Morton , Steven Rostedt , Greg Kroah-Hartman , Kees Cook , kernel-team@fb.com Subject: Re: [PATCH v4] printk: Userspace format enumeration support Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2021-02-18 12:21:55, Chris Down wrote: > Thanks for all your feedback, Petr and Steven. :-) > > Petr, I believe this is a comprehensive checklist of everything we discussed > for v5 -- any chance you could double check I'm not missing anything you > folks wanted? Thanks! > > - Use seq_file iterator again instead of simple_open + size > - Remove debugfs file first to avoid ENOENT > - Tear down datastructures if debugfs fails > - Human readable output format > - Display file/line > - Rename to CONFIG_PRINTK_INDEX, or... something > - Move to another file, kernel/printk/debug_formats.c or similar Just to be sure. The filename should be ideally based on the configure option and API names, e.g. formats_index.c or so. The printk_ prefix is not strictly necessary. The file is in printk/ directory. IMHO, we should have used ringbuffer.c but ... > - Use `struct module *mod` instead of calling it module > - Add documentation for printk_fmt_sec (or whatever it will be called) > - Rename things to pf_, pi_, or something > - See if it's safe to pass a printk_fmt_sec to seq_file instead of a module Also it might be needed to store the pointer to struct module. Both things together might allow to remove the global hash table and likely even the mutex. > - Handle cont + level > - Don't expose level/KERN_SOH directly I can't remember anything else. I am curious how v5 would look like. Best Regards, Petr