Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp2003433pxb; Mon, 13 Sep 2021 09:50:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxHzhmKD6yx2b4g3ZHvvzVqoeOPPgsgjC4FrvCv7dJqxTG+B+yC40nRfcps+lMoI5KMncG X-Received: by 2002:a17:906:b7cf:: with SMTP id fy15mr13858281ejb.397.1631551820012; Mon, 13 Sep 2021 09:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631551820; cv=none; d=google.com; s=arc-20160816; b=En58VhKscvcvb5RPiYqZ1ERmrIHg1xmrxpItxrTIdzTDh3f1/DUJYwhsaKziKrjnTS NPMHDEW/A4SLdatV/3B2EtHM0OhAopFXR0nqw/dGxURRBwls/QstlaUOuq1/UfhmuFMq a+LUiSyqbgkkd+ib2pLUTGD00sb21AaH6J0jfJi7NpzmWEX+zkPGLlLPoiLeNpf4i2gi TzuDnJckQ6Goz6RAzYCmYGx0gkNfLOAJDckAtC82piNJx+LioeBUlj4rF8LJY4fszxfw EtQFqnvhYk0UaQcPku7Igbpz68KmilAfS84KUFcvBI+Ysq1H4tllSmkfoNeO7F13FEo0 gOvQ== 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=tb2BIR4/z7+pCFPeac5Feiro5mFGcNJB81QOPO1Ylho=; b=slA6ukKQvlGfAMrhSI8omR6KqZYfVQlULPjmXhonuVTAee0pg6TS1t4gkM7aU569+S YvWwinAbtFVCrcQrJkHHm4O7v/Fse41ELaRbfZ+PM7RZjP8mI7x/5QLhmKM3x8MEcXwu ZFMSjZy8x+u4kahvoUmVDaDW6yn++2RTXnSWpVCK/lWNTTE2fVi72L7cIqJ8bZXhpfSs dGcdHKaUPG67BWv9sCyj0IjFq/uDgxcmfVDVl9oXqx7EaaL0At/+5yzUwzgczz435vYb +U3M7oSVXPepRoi/Zfm44Dmgfg4C6YF+r71nCW5Mp4PXyONG3xuiGZINgCT8pdHN18ZN +40w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="h0EW8/jT"; 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 z13si7425136edb.22.2021.09.13.09.49.54; Mon, 13 Sep 2021 09:50:20 -0700 (PDT) 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="h0EW8/jT"; 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 S239595AbhIMQss (ORCPT + 99 others); Mon, 13 Sep 2021 12:48:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:41704 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239346AbhIMQr4 (ORCPT ); Mon, 13 Sep 2021 12:47:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E458960F25; Mon, 13 Sep 2021 16:46:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631551600; bh=1uB4QHUGCkCsNFzemazlCmu8yy4iTK1hIJ9NSZdlZxY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h0EW8/jTA7YqPKLBfaB2N/q3jPt5mZvK+1GIfSbQDlznFmX0+naTsPce2P51dQYWc GCnViXHj6DMql8nAaOWKw6ZSVAKP96QjD2GM7kGzZgAZ1jYHfErir0pThG+Hcx9nYF 9hEbDmI3d+1i3iw+Jv5JJwFIc8om4/aUyQ6zFXFs= Date: Mon, 13 Sep 2021 18:46:38 +0200 From: Greg Kroah-Hartman To: Bart Van Assche Cc: Christoph Hellwig , "Rafael J. Wysocki" , Alexander Viro , Jens Axboe , Tejun Heo , linux-block@vger.kernel.org, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: start switching sysfs attributes to expose the seq_file Message-ID: References: <20210913054121.616001-1-hch@lst.de> <21413ac5-f934-efe2-25ee-115c4dcc86a5@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21413ac5-f934-efe2-25ee-115c4dcc86a5@acm.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 13, 2021 at 09:39:56AM -0700, Bart Van Assche wrote: > On 9/12/21 10:41 PM, Christoph Hellwig wrote: > > Al pointed out multiple times that seq_get_buf is highly dangerous as > > it opens up the tight seq_file abstractions to buffer overflows. The > > last such caller now is sysfs. > > > > This series allows attributes to implement a seq_show method and switch > > the block and XFS code as users that I'm most familiar with to use > > seq_files directly after a few preparatory cleanups. With this series > > "leaf" users of sysfs_ops can be converted one at at a time, after that > > we can move the seq_get_buf into the multiplexers (e.g. kobj, device, > > class attributes) and remove the show method in sysfs_ops and repeat the > > process until all attributes are converted. This will probably take a > > fair amount of time. > > Hi Christoph, > > Thanks for having done this work. In case you would need it, some time ago > I posted the following sysfs patch but did not receive any feedback: > "[PATCH] kernfs: Improve lockdep annotation for files which implement mmap" > (https://lore.kernel.org/linux-kernel/20191004161124.111376-1-bvanassche@acm.org/). > That was from back in 2019, sorry I must have missed it. Care to rebase and resend it if it is still needed? thanks, greg k-h