Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3295350ybb; Mon, 6 Apr 2020 06:13:39 -0700 (PDT) X-Google-Smtp-Source: APiQypJAaRJDKrTV/0zTUUrd9t8VOV5C11ZC3UbQqf4JkMAQmTE4DwcrSbGIXeA1Vhko/RDkInxX X-Received: by 2002:aca:da57:: with SMTP id r84mr12249217oig.79.1586178819452; Mon, 06 Apr 2020 06:13:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586178819; cv=none; d=google.com; s=arc-20160816; b=L62TLtbLlWPNYeixRKVFAjNEhYHKRlG3VEtw2tcnFoqkMIpkzy+o8sy+kT6rMiZrNw /3LReWyIcZrjPpcG2ZiEQo90WhNh6sxd/AA+4KXrOqvUoePftD306avZzMZqj9SZJ510 82DZaxAcNJ0y7ByBjHiY01txpgJuEWxwgIt5E99kzNn8oaTyB+iVmedMzKBNuK/5NVWI 0SvQRwK51P0Fe09CmiOLToGHjIzrLN3Fpz3/C5CaacEwV2/tsxzubtH9D3aVcJMN3TQr akR+vRUiBKdBj5asWzWz0YVW5AjCI5P1NGVd4V6FaOieFAP2HxdaE1VgYifSTE/hjHiC O8UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=d7c369y5lIqHxisvYw4OANI5PCHyV5gf4JiXUqbMN6U=; b=m88TCE+ahGVfpjk3EReHLNhmVEsr4QVf6DBV/n/YmvHHC31Oq/EZtTUkjYdjOmDUtz HTLN7N1ltimO1z1zk56Y6HRFVtlbAtM2RSljTJu9Mdhp7iodIl7G+jpK5TpgN+y+zxJK xlO4+kHJDQMcl6g34fkxSMOgd+CqLEG74PBMucw4pFM9WHC0J/01G7KDCtsqOdGVLZvO 9jHkRyVSVNdoNARdyvhaAE5OEpFM7+QD8E88KlhAgRSwnCpAw4i6Q7XGHPVXXyv1h088 VcbrQfl3Kblg3B+hwQe4dlFt7JQehCkAgcoOMHwkrwMNiJ8cLx+pdn/AN3mXGBCRVhc0 Sj/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z13si6588593oix.27.2020.04.06.06.13.26; Mon, 06 Apr 2020 06:13:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728309AbgDFNNE (ORCPT + 99 others); Mon, 6 Apr 2020 09:13:04 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:33949 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728181AbgDFNNE (ORCPT ); Mon, 6 Apr 2020 09:13:04 -0400 Received: from mail-qk1-f174.google.com ([209.85.222.174]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPSA (Nemesis) id 1Mr9OA-1j07J23ARS-00oEbm; Mon, 06 Apr 2020 15:13:02 +0200 Received: by mail-qk1-f174.google.com with SMTP id 130so885179qke.4; Mon, 06 Apr 2020 06:13:02 -0700 (PDT) X-Gm-Message-State: AGi0PubPIKvOp7wEV94JFy/6Yi+xh/HWiNI99awjCqQ098tIJ/hITfpK VbYzbcZnY3fmrl4nK+Lrb9IjaFUfEe2ySIwTeT4= X-Received: by 2002:a37:2714:: with SMTP id n20mr6302088qkn.138.1586178781557; Mon, 06 Apr 2020 06:13:01 -0700 (PDT) MIME-Version: 1.0 References: <20200406120312.1150405-1-hch@lst.de> <20200406120312.1150405-2-hch@lst.de> In-Reply-To: <20200406120312.1150405-2-hch@lst.de> From: Arnd Bergmann Date: Mon, 6 Apr 2020 15:12:45 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/6] powerpc/spufs: simplify spufs core dumping To: Christoph Hellwig Cc: Andrew Morton , Alexander Viro , Jeremy Kerr , linuxppc-dev , Linux FS-devel Mailing List , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:6XdMQ65OOioIRuqHqq3+7QMYDDx6jRkjOZCrP8n45lczowS/cdI B09il7WTGW1J7FQ/gHbXqtzafbYmmYNYaomppPgH11VXbffng5qbvuD+UhX4/vU2P1TU0lY lMkrPkxerZ8IGSKk6vOR6emstBbqPTE+sVGNmBoqKOVUbniYJoEs5i/FncKhF0vhNN/W2zu MAqzmzusyaJSaZ46ZL5iQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:La6cY6+qeSw=:gCyGgPoDKIxSW2RoC1zxtL 6CI+6gRoK0r9H6g9tsBuJo0U2E/jUrgmNY52jOf9aS9UW8i0jZcx3f4QTjgtO+S1/KVyjeAm3 mssvbM3r+xDMVJZJh270i1KcYZruzHgiamQ/hidXxsQ5Zu6qirr6UecqZToG7GS2wUMg/CIz2 GsI9LIWyp/Momo0L1H/RVGpYPOZzyaTuXwgrQzfdmaFw/cuAENqGcrCTEQxD9RPQ910jm5IHd mI8SwbS64bZ9uJ2o8pCU5y6AlPvC+ARTIkEeTp4WQo53oRZyxmBBmJjnJawz8vpvGicqFpgq8 pEP2LgLKnGoKHsWoL0OsQw/eztuvonX/UWdes0iN6x497eFxzNjiW6zKa4SNBfKPBavh9DB+E YzTHuDnc/BYNIqt3Eb0efTyoC/A/ZwWyxTWq833pkTYBl/z/hdpn+ObU9M/sgOKutzCCMsiyX Z64EGfiZjAVgE5QNjlaXCxNcZRoGEqA9ke/9lRHWgaoeWLbQYoeAGZ9zAYn6h9lzqIKdyFZmo lak4KPm/iM+qdZSUOAgFf7+Z0Ah19Nf5BWFI3c3cSbtpF1szQTeOoOGhHehJ1bbUC5xwU2li1 UuZ7suVrUqUNQsIithlFEambJDiVOumynNAih5YD5dbcHJeedQATZVKwx/w61zSvFi9C5hMt1 Y9YF/DLapn1wK+pnYqbl8Fx7YLXG6nKIiL0KTLglnvUMZbONp/1pRqK0MuIjSVLSHFb94MYJr 8t6lQfvy+Sut/QCbfjqaNF7TPU9RcLOLaZ7o1DB1IkJW2MrCOC8sfob4LWtr7UbdHZtxN4GLK RS2wZhNLV0VISp6O+J7nEjzYgA2j093Wn0EH079f1GLN0S5eIM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 6, 2020 at 2:03 PM Christoph Hellwig wrote: > > Replace the coredump ->read method with a ->dump method that must call > dump_emit itself. That way we avoid a buffer allocation an messing with > set_fs() to call into code that is intended to deal with user buffers. > For the ->get case we can now use a small on-stack buffer and avoid > memory allocations as well. I had no memory of this code at all, but your change looks fine to me. Amazingly you even managed to even make it smaller and more readable Reviewed-by: Arnd Bergmann