Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp67933pxb; Fri, 15 Jan 2021 07:47:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyj/JrFYfGyi7NlxgT8DUcNL5pIQHmw8ANrFbpiBmKpc8sSFWTwWGzchQKpEJ2oHRWnIgxv X-Received: by 2002:a17:906:4c48:: with SMTP id d8mr9224825ejw.358.1610725650553; Fri, 15 Jan 2021 07:47:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610725650; cv=none; d=google.com; s=arc-20160816; b=c6N2P3ltc4XiurFKXM8f36xMQAYTKbH16wXwH3yPAv1W2GwEhRP75dtStWPt6xJoa+ CgM5zhfrrjjLicYtV/CJXyC4Vgj8YULK9y5pMeN6Uuc87BD/W2st+Xupl1kylHLsZO6y tfsM0n8cUJYi0Kc2G8hoeevpS3dhpDlcyq35N8J3AACsltcR8YbwutxChqPVsy6WjPQb gJKIYK8g1NJrDSerctiTO2zBh3Xen2P1/P+Xt81zWJGsZDoZezKf/3tRduTCo90OPPxB dxgCfJ6svbMeI0f1/W8OfhFgEwfHedCUvDCiF0U6DW3USMYi/O5C7Iq36RuA/upu1Pmi E2AQ== 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=FoJFKTUOPBw+HBywLr08FlDn8rURe73bDrYbp/uEuSE=; b=tmss7Y4IcrUyEYLXdzAjC7LBc2TUP+g1G4qVHhOUIIvGQowOqf3bcPMjfNEW+4ZZCN MKpG8TZ8n6s0Rtd2fP3HkJNQPVtUVXBG8kfa91KbiFo41N/UvoOMoIwAK2PHM3PeP8dP 5NJW5NSzUSmAB/Tr7DJ1q8EVPZZGLx7eXblqC/nXPmtroFS7yw0nn5qvWlisDYz6a0Qx WTcAYQLAHE9ucLFnJni1rXhqloQcNSAkJrMRAIm1gJ69020qAUEyBjGtDj3Nki1rHeeX NNKrAAOnNC815MEN0s1CwqcWbTbHmXy/IzuLYLtW5xQ5YcTxG9uS9tLVAHdBzo4/F0ON +heA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=APPaZ7LI; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a5si3835294ejr.334.2021.01.15.07.47.06; Fri, 15 Jan 2021 07:47:30 -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=@linuxfoundation.org header.s=korg header.b=APPaZ7LI; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733098AbhAOPpw (ORCPT + 99 others); Fri, 15 Jan 2021 10:45:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:53752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726918AbhAOPpw (ORCPT ); Fri, 15 Jan 2021 10:45:52 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id F3BC52339D; Fri, 15 Jan 2021 15:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1610725511; bh=/q9KAlBin1gqZTSdMUIA7qxFm2PjMq25wybGsrTkMB0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=APPaZ7LIHi5QUZ9YwtphXof7uDD2cqvejSfGRxRKBL5k78VTV/5UZiPHW1YoFTAjw XgQxkewJkE25oG5m7EcShLeLSk5hvMq68w3/lKOuM4gMa6M8tvvinTXG6NBCANVdTj g6VRSNDE8Yt0CI22qb4XN1TJnJPUO+BLTvnfkEOk= Date: Fri, 15 Jan 2021 16:45:09 +0100 From: Greg KH To: Alexander Potapenko Cc: LKML , Andrew Morton , Andrey Konovalov , Dmitriy Vyukov , Ingo Molnar , Marco Elver , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Linux Memory Management List Subject: Re: [PATCH v2 3/5] docs: ABI: add /sys/kernel/error_report/ documentation Message-ID: References: <20210115130336.2520663-1-glider@google.com> <20210115130336.2520663-4-glider@google.com> 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 Fri, Jan 15, 2021 at 04:26:21PM +0100, Alexander Potapenko wrote: > > sysfs is "one value per file" > What about existing interfaces that even export binary blobs through > sysfs (e.g. /sys/firmware, /sys/boot_params)? > What qualifies as a "value" in that case? binary files are fine as the kernel is just a "pipe" through to the hardware / firmware. No translation or parsing happens in the kernel. And that's NOT trace events :) > > please put something like this in > > tracefs, as there is no such rules there. Or debugfs, but please, not > > sysfs. > Does tracefs have anything similar to sysfs_notify() or any other way > to implement a poll() handler? Don't know, look and see! > Our main goal is to let users wait on poll(), so that they don't have > to check the file for new contents every now and then. Is it possible > with tracefs or debugfs? debugfs, yes, you can do whatever you want. tracefs probably has this, otherwise how would trace tools work? :) > Also, for our goal debugfs isn't a particularly good fit, as Android > kernels do not enable debugfs. Do you care about Android kernels? If so, yes, debugfs is not good. And have you asked the Android kernel team about this? > Not sure about tracefs, they seem to have it, need to check. It should be there. > Do you think it is viable to keep > /sys/kernel/error_report/report_count in sysfs and use it for > notifications, but move last_report somewhere else? No, not at all, please keep it out of sysfs. > (I'd probably prefer procfs, but it could be tracefs as well, if you > find that better). If it does not have to do with processes, it does not belong in procfs. Again, this seems to fit in with tracing, so please use tracefs. > This way it will still be possible to easily notify userspace about > new reports, but the report itself won't have any atomicity > guarantees. Users will have to check the report count to ensure it > didn't change under their feet. Again, use a file in tracefs. thanks, greg k-h