Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4417758pxf; Tue, 16 Mar 2021 12:59:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvRZltiIRL3YWuJCZUBp6J+JD8er8eQ9mtI3Ec2fKD5ZhRqB0COTyCmvBaUpInRzk09CvN X-Received: by 2002:aa7:c550:: with SMTP id s16mr38088227edr.98.1615924787587; Tue, 16 Mar 2021 12:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615924787; cv=none; d=google.com; s=arc-20160816; b=JS65A9xgea1VSmj4abKmrdQBVCLKAlga6Gx+8LuQDiKAUjDQIM0jWAX5KojGetqmnm resBrSDthLm4fxuVB4mcHie4R9arzj2yagDdjyAKeINHV0HkkdqxGnLbASaFnAA9/OBb Xm62hOKAXDOnSCTrda8YdgXLIJ9jVYXB1mssMQn3cJFKBgBYLjNLcOU6lSPOx5TouhQj /yXUyvW2Rjcyo82A9d0gS+M0BuPAi6aQw/VHOtwpDCr23vdZeEQdkIEuZSu66iYojHzq /eVVuezy87JNcNdOJlSqRTZoLrfeG1K+O/hiDJcmJNoc+gSYYq9fpMNwqUbV6WaZwTS8 n3TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=GOn21YYr+30Bre51YOBOmUrPOChKWmnDAUq4XK/RPow=; b=dHGzQWmTD0X4gdc1oLQmHNJig4G0rkbJIS+owt8AS9avb9B4lrAEGUU3im2T64AfnS fFC310MS+JRYROSenmEsQjNkF7+PDTAKAb+051c+LpTNjOq444Z2oDrE/Y3Mub1FYJQ/ u+PVJpR/booadRawXN6Z8fPf+SlrfjUSAPWXtiHCdf1+d2JU3YpWJ5r4xIimOIyo8jyQ KWKrH3Exh3ZFZUMoYSAT7kpdL4f15LTxFjvgp8MumHMIKTd2qJktZMXr/kFNemO026iq 1rTpmXdzVPTOGMY/Vq5MOBcbN4M1dxnwcPyERJRGdcEejM+BDHFZUuo5sJkxw2QwjSfN 835A== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lr14si4908566ejb.627.2021.03.16.12.59.05; Tue, 16 Mar 2021 12:59:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234303AbhCPMw2 (ORCPT + 99 others); Tue, 16 Mar 2021 08:52:28 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:57978 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232915AbhCPMuG (ORCPT ); Tue, 16 Mar 2021 08:50:06 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lM92W-006Vrv-M5; Tue, 16 Mar 2021 12:43:12 +0000 Date: Tue, 16 Mar 2021 12:43:12 +0000 From: Al Viro To: Greg Kroah-Hartman Cc: Kees Cook , Andrew Morton , Michal Hocko , Alexey Dobriyan , Lee Duncan , Chris Leech , Adam Nichols , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-hardening@vger.kernel.org Subject: Re: [PATCH v2] seq_file: Unconditionally use vmalloc for buffer Message-ID: References: <20210315174851.622228-1-keescook@chromium.org> <202103151336.78360DB34D@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 08:24:50AM +0100, Greg Kroah-Hartman wrote: > > Completely agreed. seq_get_buf() should be totally ripped out. > > Unfortunately, this is going to be a long road because of sysfs's ATTR > > stuff, there are something like 5000 callers, and the entire API was > > designed to avoid refactoring all those callers from > > sysfs_kf_seq_show(). > > What is wrong with the sysfs ATTR stuff? That should make it so that we > do not have to change any caller for any specific change like this, why > can't sysfs or kernfs handle it automatically? Hard to tell, since that would require _finding_ the sodding ->show() instances first. Good luck with that, seeing that most of those appear to come from templates-done-with-cpp... AFAICS, Kees wants to protect against ->show() instances stomping beyond the page size. What I don't get is what do you get from using seq_file if you insist on doing raw access to the buffer rather than using seq_printf() and friends. What's the point?