Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2318258pxu; Sat, 28 Nov 2020 10:00:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyD9TJRwOmF++1DEMibTPMEs6+zLaTTti9SEVJ9rDz1WOhJccstZqvERqO/OTxzlBgb/W+p X-Received: by 2002:a17:906:4149:: with SMTP id l9mr13886356ejk.48.1606586427217; Sat, 28 Nov 2020 10:00:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606586427; cv=none; d=google.com; s=arc-20160816; b=w/DVTkM3t886ZThV8hPaHR/lMsVGz18dAkWKBcbP8NdO2IIN7v/UGps39MKAGWyNlF T4BkfeTiWBjYH1SdhOCUUYcNK+FMlqOdBdV/ARCHL3Y7Txm6xX8jsJ2fxeUndwTzT02X PRMgp/eV7UU6olvKJE0PFYGWD1iXMaO1lPZ8JiC3ETTvboT4bq+x5YXQmhqCQJTMXkFE OKbHt3mry3uvMrGEmJXahvpCT7MLiRYAvPhkcVwZyJSK0vDLd5J0DR+gBVaSym6Wr6Wq Uc6O6UFKS/bqHeB5XaXdWMJdIfjPsEeVZSLpqjgS12jmApRXBIDqf5oeOg+J4iW0BsIT yudg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zDZQIb0Qpxuy9GWojemFMiqfV2tU8OKdX7CqUCCDunE=; b=pCuD2xz9OldtvLeFJUPcINqcLLxLAPPdQVxFWZOsaZrnzaOx/fbjUNTUcRvfuI2Ctv J8+vaJ3fj99j9kfVDrPa6APFW9SRlcY+eVC/sxm0VX7uxHZsnz2F+3lu3H9El3VEddmh ng7rxcRJ9bdcErfwrfN21GBKb1SxWNl3drjWl9qjUwucn9MTB/OE0sSmKIvStLI/K8GI I9VRMSU0OFQXb/PYf2rIvC40x+B7GBqieyBkToyun847Az8rerRJRWq4iEJtq+KgpF9q 6OUkva2XFcnsGNFmzDjvl/KqzqrKTWXuUHF1HkjXctCDiVUctUG/VV2o+WC8ZtyuMbSQ wvPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=NlqPW5nk; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm21si7566841edb.463.2020.11.28.09.59.46; Sat, 28 Nov 2020 10:00:27 -0800 (PST) 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=@kernel.org header.s=default header.b=NlqPW5nk; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732375AbgK0UbZ (ORCPT + 99 others); Fri, 27 Nov 2020 15:31:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:41904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732307AbgK0U3w (ORCPT ); Fri, 27 Nov 2020 15:29:52 -0500 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EFA122223D; Fri, 27 Nov 2020 20:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606508990; bh=8WXGibjYZ0t9GgILIvSSUtbCg5S7JG3534IJyVMr0Tw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NlqPW5nkcLlvI6BSWKG0DmJ2SIyCAg1uWcB8lnHKk8DMLiQMuFPBafd3Sk1MOzpwf zvkHVRZXFPKGrxQ4iaqPZ7+arxvPb69X1Q1m2aJ7QSYrdXzr3Swtw2wf2PogPFCpAm aH4CRw9iCRgUr5fjSVPnb0gr4dnyWEkqO8g8G80c= Received: by mail-ot1-f52.google.com with SMTP id o3so5690749ota.8; Fri, 27 Nov 2020 12:29:49 -0800 (PST) X-Gm-Message-State: AOAM5317KTd4Lzfu0pirNf5UGoSWjo488fOdVtm+pRRNrkFoYXx19AdX RSQKWiET0GWYUGjw5Rt1DXyGqGC1zEySmSNIWRM= X-Received: by 2002:a05:6830:22d2:: with SMTP id q18mr7261780otc.305.1606508989093; Fri, 27 Nov 2020 12:29:49 -0800 (PST) MIME-Version: 1.0 References: <87r1on1v62.fsf@x220.int.ebiederm.org> <20201120231441.29911-2-ebiederm@xmission.com> <20201123175052.GA20279@redhat.com> <87im9vx08i.fsf@x220.int.ebiederm.org> <87pn42r0n7.fsf@x220.int.ebiederm.org> <877dqap76p.fsf@x220.int.ebiederm.org> In-Reply-To: <877dqap76p.fsf@x220.int.ebiederm.org> From: Arnd Bergmann Date: Fri, 27 Nov 2020 21:29:33 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 02/24] exec: Simplify unshare_files To: "Eric W. Biederman" Cc: Geoff Levand , Linus Torvalds , Oleg Nesterov , Linux Kernel Mailing List , linux-fsdevel , Alexander Viro , Michael Ellerman , Arnd Bergmann Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 25, 2020 at 2:16 AM Eric W. Biederman wrote: > > On 11/24/20 12:14 PM, Arnd Bergmann wrote: > > > > There are still PS3-Linux users out there. They use 'Homebrew' firmware > > released through 'Hacker' forums that allow them to run Linux on > > non-supported systems. They are generally hobbies who don't post to > > Linux kernel mailing lists. I get direct inquiries regularly asking > > about how to update to a recent kernel. One of the things that attract > > them to the PS3 is the Cell processor and either using or programming > > the SPUs. > > > > It is difficult to judge how much use the SPU core dump support gets, > > but if it is not a cause of major problems I feel we should consider > > keeping it. > > I just took a quick look to get a sense how much tool support there is. > > In the gdb tree I found this 2019 commit abf516c6931a ("Remove Cell > Broadband Engine debugging support"). Which basically removes the code > in gdb that made sense of the spu coredumps. Ah, I had not realized this was gone already. The code in gdb for seamlessly debugging programs across CPU and SPU was clearly more complex than the kernel portion for the coredump, so it makes sense this was removed eventually. > I would not say the coredump support is a source major problems, but it > is a challenge to understand. One of the pieces of code in there that > is necessary to make the coredump support work reliable, a call to > unshare_files, Oleg whole essentially maintains the ptrace and coredump > support did not know why it was there, and it was not at all obvious > when I looked at the code. > > So we are certainly in maintainers loosing hours of time figuring out > what is going on and spending time fixing fuzzer bugs related to the > code. I also spent some amount of time on this code earlier this year Christoph did some refactoring, and we could both have used that time better. > At the minimum I will add a few more comments so people reading the code > can realize why it is there. Perhaps putting the relevant code behind > a Kconfig so it is only built into the kernel when spufs is present. > > I think we are at a point we we can start planning on removing the > coredump support. The tools to read it are going away. None of what is > there is bad, but it is definitely a special case, and it definitely has > a maintenance cost. How about adding a comment in the coredump code so it can get removed the next time someone comes across it during refactoring, or when they find a bug that can't easily be worked around? That way there is still a chance of using it where needed, but hopefully it won't waste anyone's time when it gets in the way. If there are no objections, I can also send a patch to remove CONFIG_PPC_CELL_NATIVE, PPC_IBM_CELL_BLADE and everything that depends on those symbols, leaving only the bits needed by ps3 in the arch/powerpc/platforms/cell directory. Arnd