Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp777732pxb; Tue, 14 Sep 2021 08:31:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxXeykmXeyn9y1A97025huS8JS4BpChd9aOQNEFD4xuCYB5TnO9/ac7llm1Jg9cRuw1+6U X-Received: by 2002:a2e:9798:: with SMTP id y24mr15912852lji.165.1631633480443; Tue, 14 Sep 2021 08:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631633480; cv=none; d=google.com; s=arc-20160816; b=Cehn0Hs/hP03b/z26IjzFo7pkB1YkId5rW2v3Yb0gEDvbIuAWLKYhAB2Hf6embcyIj 8VXPqo9sFQ2kyj18IOnUGDuyXGf0Oq1ImKKJ48bOoO5n+sM0F3TEQd4gNa/l6olw65hA nqsFjoyCZmHqh1KYg73h2YCEDpT5xX26FBODkKTNGEUy8S0G2XZV52sAXCOqA7KA/lLc z0Zxf7kk6z2XD5MlrztrBbzgNbJF15eLabmnc7HQihblx9a/c3YnWFX3uunIY+7s133x G+gvfmjad2E8lxw6qg0Y0vJBqb5OvRiDwkgk4Ucttqkm8KsOs+ivCa23Nf5PHzner15h p7cQ== 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=yKeX9JGDgKO0ffrPHptS8//S6qOspm1mk7j1HW4jJm4=; b=PSm2q7x3HaHWhUKl/lqaWtXDVHjM60wCLQv3vr9IxEYP0kll0fMyl6+XtkL2tHa58p IS/SmlQ4YIx5whVh0itiV7F8PFPLkUs22JvnLilibpqFduLO+v7ptdr2+EFunVv0LzgC gHJMYXRpqskqkQaWmfHaK0F0Yg9hlDyuaLNcsGkMs6slwyh3cR3xxn4L6GqKMfYasQEI OsABU/aZ6Ee1WX1i+aoBiIE6WRI0co+mb9lEBuOtCRJBBTWT1a5SK3+iqKunYI/w93wY aVvj1iWHRGs3/4wR4ZXG5/lL9roajZY4AWEV/jZSzW9+GRGT42FjJCoKlmpgS6GaJAaB uzDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jox5mamj; 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 l11si16441602lfg.428.2021.09.14.08.30.46; Tue, 14 Sep 2021 08:31: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=Jox5mamj; 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 S234388AbhINP32 (ORCPT + 99 others); Tue, 14 Sep 2021 11:29:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:34784 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233202AbhINP32 (ORCPT ); Tue, 14 Sep 2021 11:29:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3706460234; Tue, 14 Sep 2021 15:28:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631633290; bh=uIk3pIzYCj67iKBpiYBKsYeqo7a5UjJ13ORlR6ji/Kk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Jox5mamjWIxKYyEisZVncK1fTvx+5gWa1WND1w4SoytDRknTu9MYjxjTEnG+mhOv+ 0XUnGtNOHzMT2NlfWzzFfv5ploG8qeiY883t2qP8WCy5soxs7BaIwDPaes1YFaPdxo C9qeh3acGxvxRIpViddaJuziiuwiq+ZeiFav7m4s= Date: Tue, 14 Sep 2021 17:28:08 +0200 From: Greg Kroah-Hartman To: Christoph Hellwig Cc: "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: [PATCH 13/13] xfs: convert xfs_sysfs attrs to use ->seq_show Message-ID: References: <20210913054121.616001-1-hch@lst.de> <20210913054121.616001-14-hch@lst.de> <20210914073003.GA31077@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210914073003.GA31077@lst.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 14, 2021 at 09:30:03AM +0200, Christoph Hellwig wrote: > On Mon, Sep 13, 2021 at 08:27:50AM +0200, Greg Kroah-Hartman wrote: > > Anyway, I like the idea, but as you can see here, it could lead to even > > more abuse of sysfs files. We are just now getting people to use > > sysfs_emit() and that is showing us where people have been abusing the > > api in bad ways. > > To be honest I've always seen sysfs_emit as at best a horrible band aid > to enforce the PAGE_SIZE bounds checking. Better than nothing, but > not a solution at all, as you can't force anyone to actually use it. We can "force" it by not allowing buffers to be bigger than that, which is what the code has always done. I think we want to keep that for now and not add the new seq_show api. I've taken patches 2-6 in this series now, as those were great sysfs and kernfs cleanups, thanks for those. I can also take patch 1 if no one objects (I can edit the typo.) I agree that getting rid of seq_get_buf() is good, and can work on getting rid of the use here in sysfs if it's annoying people. thanks, greg k-h