Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp660541imc; Sun, 10 Mar 2019 17:44:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJ90ZSmub9K7UOaXSGreFZ23/wjg+C15Yiqb/FNLtFCZbAkFDpx7nWoCRTuMMPJMcHETi1 X-Received: by 2002:a17:902:b707:: with SMTP id d7mr13508498pls.91.1552265097954; Sun, 10 Mar 2019 17:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552265097; cv=none; d=google.com; s=arc-20160816; b=lgw2JyMUaG0+5rPqawwBloVTjDrn5RU1JGi1oJdQ5j1Sj+PF4o9p5WG9+N+A7JoLcV zOvpsZybb8v5D3ghRlVgqyp3R5k8bumU2FmWIpMx0VYntBjIoScXT3ld5URLEW9PyDx9 S0D8lxfoWZPDlHvQFZ62QFh2BcVjwfpkQ/mZPNt2YxxbkmG6P8ETIid6c1we+ZJWs31F HOrMbZBNfOxr20cZNxh7wG/xd7unwnO2l9vnyVaDJuWu+sjQ/LExBFOCsh+0va2GA26v S0u8sju7T1xqS7/9hpjP5RBvWU2X0BGlCGnzZe5wjSGs8aDxbyXucUF0QbfR5KR6+W/f ZX8w== 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:dkim-signature; bh=+LWrp2sLm52zGTJ6EoyaaUK/Wu/pZxhPjxYZ6ScXPS0=; b=UoozxdZnvFIJhK+59UeARoKaeQ3WASwxUh1aD7pu0Ac0hKjNV2q9GhpSnFCnWUjNqK xVncNs2g8oveFWtXGOIVsW3ArFV+e6KRluidgUu0APD+pyq6yCi6LtiGK82+9DVNzOGS 6A0XC71HugGFXJCpLlUTboOzF6fZF3XOqZQPtOFWMOgLr4+2rO8oZk9cBMH9V+gC/suq ii9ZCfcccu06BnfgkIOXVVlk5jxMT6L7vSpRV4cSYhZSsQv2Xj3jV/idQEJ8fJDiJmuO bzN4FZgOeFf3sAVCWxgUSoT+N2u59z/DjK+/XsURs+cqMDZnG3m6QRqx7rSxW1DdQn3m m4Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MbeykUFx; 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 r16si3736933pfd.266.2019.03.10.17.44.28; Sun, 10 Mar 2019 17:44:57 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=MbeykUFx; 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 S1727000AbfCJWs0 (ORCPT + 99 others); Sun, 10 Mar 2019 18:48:26 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:41761 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726758AbfCJWs0 (ORCPT ); Sun, 10 Mar 2019 18:48:26 -0400 Received: by mail-lf1-f65.google.com with SMTP id 10so1993898lfr.8 for ; Sun, 10 Mar 2019 15:48:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+LWrp2sLm52zGTJ6EoyaaUK/Wu/pZxhPjxYZ6ScXPS0=; b=MbeykUFxF/jGj+81XG3v59ICOGINTytegi3qK1++BruQWisL+7MJUQ9zaCiNSv3lel gK2WW61s1O3FOwZdPZ8FlAoLRY9l+/IwBw+IANH6whXqIGWAzql8ZpU2/9GBAjIhH99B +BPhy9g92Enw+aYGU8C1wAZwgUPgPrH7kTQ1I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+LWrp2sLm52zGTJ6EoyaaUK/Wu/pZxhPjxYZ6ScXPS0=; b=Ht9f3C7mqq2EE4UrpZI22Kn8nOplDw2zA+MwPubPlR3TJtgsUMOSYn1WeAnLiAcE20 mBZ9pdH5m4p9Qu6drcQAmSeQigdh2SdHJ4i/dr3HNSXHpvPCrebdC/c4SGTgnWjHx2Hl GrCUs70JRE7e2uW2XD7N/sfIOJYj+nZ8g8DqODypjT/uW8KIDYiHdNeP+pmpBGlhu5Nf 3yCgJqvjM4zN1s7eytLjuhZER2fONQtPtNzZ3ycN7EdM0zGA6SsIal/AnWVWIO4GF9Tr cUQ+STqqx+rNuBTmQfZmLG2gFN/Qp2Tcg6OLOmaIPjdhYk4g6hgpu9kbVjT6BzTWd8tG 5lWQ== X-Gm-Message-State: APjAAAU773DEu4iBs+eh78mfww7wsNGXWa/mXAukL7VGSziRLmphTWwc 1qgpZh7ZWFSgSwhVEMz8+at1cXM0f8o= X-Received: by 2002:a19:2905:: with SMTP id p5mr8123012lfp.126.1552258101864; Sun, 10 Mar 2019 15:48:21 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id k140sm531498lfe.42.2019.03.10.15.48.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 15:48:21 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id q128so2365027ljb.11 for ; Sun, 10 Mar 2019 15:48:21 -0700 (PDT) X-Received: by 2002:a2e:9786:: with SMTP id y6mr13399012lji.79.1552257636877; Sun, 10 Mar 2019 15:40:36 -0700 (PDT) MIME-Version: 1.0 References: <20190305091904.GB8256@zn.tnic> <20190305122218.GD13380@bombadil.infradead.org> <20190305134347.4be2449c@alans-desktop> <20190305145717.GD8256@zn.tnic> <20190305173134.GE8256@zn.tnic> <20190305181138.GG8256@zn.tnic> <20190305181808.GH8256@zn.tnic> In-Reply-To: From: Linus Torvalds Date: Sun, 10 Mar 2019 15:40:20 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86: Deprecate a.out support To: Matt Turner Cc: Borislav Petkov , Alan Cox , Matthew Wilcox , Jann Horn , Al Viro , Thomas Gleixner , kernel list , linux-fsdevel , "the arch/x86 maintainers" , Linux API , Andrew Morton , Richard Weinberger , Anton Ivanov , linux-alpha , linux-m68k@lists.linux-m68k.org Content-Type: multipart/mixed; boundary="0000000000000c01730583c5259c" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --0000000000000c01730583c5259c Content-Type: text/plain; charset="UTF-8" On Sun, Mar 10, 2019 at 2:37 PM Matt Turner wrote: > > I'm not aware of a reason to keep a.out support on alpha. Hmm. I was looking at removing a.out support entirely, but it's actually fairly incestuous on alpha. For example, arch/alpha/boot/tools/objstrip.c very much has some a.out support in it. Maybe it can just be removed entirely. There's also an a.out.h include in arch/alpha/kernel/binfmt_loader.c. Finally, note that CONFIG_OSF4_COMPAT also no longer makes sense without a.out support. So this attached patch does not compile on alpha, but it's been many many years since I had an alpha to test with, so I'm stuck. Matt, can you fill in the details and complete this patch? Linus --0000000000000c01730583c5259c Content-Type: text/x-patch; charset="US-ASCII"; name="patch.diff" Content-Disposition: attachment; filename="patch.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jt3i3iiz0 IGFyY2gvYWxwaGEvS2NvbmZpZyAgICAgICAgICB8ICAgMSAtCiBhcmNoL2FscGhhL2tlcm5lbC9v c2Zfc3lzLmMgfCAgMzAgLS0tLQogYXJjaC9tNjhrL0tjb25maWcgICAgIC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