Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4429112pxf; Tue, 16 Mar 2021 13:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmc4XEYGVDiSqpmcpKBSfTiMX1VII4P/Wl2kfjOUBc1QOIZ5i0H1bBrd+dMajRulNtOyMj X-Received: by 2002:aa7:cf17:: with SMTP id a23mr39097945edy.30.1615925778309; Tue, 16 Mar 2021 13:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615925778; cv=none; d=google.com; s=arc-20160816; b=emYm9toE0RkexiRlFbHdBJ0ux52CbsQ8x8U+OiLTMlP9tggRYxyPk69sYEtYXLYfHJ ZekRsKmYxWacDynEYNQbArrYvo3fT0pcaOAvTAtgWOn4jF9xUD/QSMs33q9CB+ekMKxR V6XS9kwS4DV5+JXkLOlAoWvJkldzDWHq74s6Bjh57A3kyw9UqR7+MlnisC9JxNrf/JLQ AYf4v1vQr/Kenrh5hIBFOm3WPN1rz5XosKo+SveX2cbg7JSx6QyWSmwQFrAECKzdMnuf w5Tn+04bxwRofbByvFSHXytRW0RK6Vls0xtJo53DF/n+JCWSQ7z6A+/IF0puwExZP9my +Vpg== 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=iGCmVD2U24Jc1j3ZUlBFpOR+1PwTae5lOTW7wdWn/nc=; b=UnJtnfgUUOHf0egLEVeSdd28/522XhlMkikyT4Z+7D1rYC1z2Hg11Ud5vh9E1BGAyK 6w1zASrGw2v3NGQ3OtjtcDRCuh1nDw9GzVN2DbAh4Zvvs4ZUz2GpnnRGAm4gvuuo8Kxk g81UKXW3eXm5DUeX3dEQ86NnxT3gFli735PmV59ZLvWebArM6sRA9iq07IPLyMThrYH8 Iv+7+MN0scfITzQ0ALRbpXFcZYA+h76e9HgD1CK56SMyyfjUbB9ykrihLhVhDAKoa/OQ 5Whc9XFa2OFK404amhLTvPXPiiqPQlvMCSkL6OdPjnMb7B8H8ws3oNK9V8s3nQAPOvvn tMhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b="oYaYLy/o"; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si7215307edr.552.2021.03.16.13.15.55; Tue, 16 Mar 2021 13:16:18 -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=@suse.com header.s=susede1 header.b="oYaYLy/o"; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234479AbhCPNBa (ORCPT + 99 others); Tue, 16 Mar 2021 09:01:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:49122 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233062AbhCPNBG (ORCPT ); Tue, 16 Mar 2021 09:01:06 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1615899665; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iGCmVD2U24Jc1j3ZUlBFpOR+1PwTae5lOTW7wdWn/nc=; b=oYaYLy/onN6VQ0mbkpsp1XmAwm9kCvD+zdqURtQBChXqq8oq8Z/3QRzxuci6koCkt5weJh 42yV3GSP1OrkEL884Joq8T7ImN8hcospcJfF80X3nu05JjPDfXjILOWg6Ct9fUURg1tXNa C01C1Uk+Q6swtn847u9auldBlksyGFI= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id D040EAC47; Tue, 16 Mar 2021 13:01:04 +0000 (UTC) Date: Tue, 16 Mar 2021 14:01:04 +0100 From: Michal Hocko To: Al Viro Cc: Greg Kroah-Hartman , Kees Cook , Andrew Morton , 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 16-03-21 12:43:12, Al Viro wrote: [...] > 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? I do not think there is any and as you have said in other response we should really make seq_get_buf internal thing to seq_file and be done with that. If there is a missing functionality that users workaround by abusing seq_get_buf then it should be added into seq_file interface. -- Michal Hocko SUSE Labs