From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3D379C3A5A8 for ; Sat, 31 Aug 2019 14:44:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CBD121874 for ; Sat, 31 Aug 2019 14:44:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727845AbfHaOow (ORCPT ); Sat, 31 Aug 2019 10:44:52 -0400 Received: from verein.lst.de ([213.95.11.211]:35697 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbfHaOov (ORCPT ); Sat, 31 Aug 2019 10:44:51 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 2D5B9227A8A; Sat, 31 Aug 2019 16:44:48 +0200 (CEST) Date: Sat, 31 Aug 2019 16:44:48 +0200 From: Christoph Hellwig To: Al Viro Cc: Christoph Hellwig , Matthew Wilcox , linux-fsdevel@vger.kernel.org, Octavian Purdila , Pantelis Antoniou , Linus Torvalds , Kai =?iso-8859-1?Q?M=E4kisara?= , linux-scsi@vger.kernel.org Subject: Re: [RFC] Re: broken userland ABI in configfs binary attributes Message-ID: <20190831144447.GA600@lst.de> References: <20190826024838.GN1131@ZenIV.linux.org.uk> <20190826162949.GA9980@ZenIV.linux.org.uk> <20190826182017.GE15933@bombadil.infradead.org> <20190826192819.GO1131@ZenIV.linux.org.uk> <20190831083241.GC28527@lst.de> <20190831133537.GX1131@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190831133537.GX1131@ZenIV.linux.org.uk> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sat, Aug 31, 2019 at 02:35:37PM +0100, Al Viro wrote: > > So for the one real life example of the configfs attribute life > > actually is simpler. acpi_table_aml_write verifies early on that > > the size matches what it expects. So if we document that any future > > instance needs to be able to do that as well we should be able to > > get away with just writing it from ->flush. > > I'm not sure I understand what you mean... Do you want them to recognize > incomplete data and quietly bugger off when called on too early ->flush()? That is what the only user does anyway, take a look at acpi_table_aml_write. So yes, change the documentation to say it gets written on every close, and the implementation has to deal with incomplete data by either returning an error or ignoring it.