Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp950542pxp; Wed, 16 Mar 2022 22:23:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtDBq3h5bDBpi4+5+OmGB2IyloEs4Hz3D8Z913TCP7x2J2OQ8MScE+rWv6XG7SvHPVUHHN X-Received: by 2002:a65:55c4:0:b0:381:71f9:cd35 with SMTP id k4-20020a6555c4000000b0038171f9cd35mr2354016pgs.94.1647494587464; Wed, 16 Mar 2022 22:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647494587; cv=none; d=google.com; s=arc-20160816; b=O456W2gnbDuoS0eKT/AV+Lnj1r/aBz0Y8j56uy2xLMClShOGSVUYdFvI+KktHHhjHJ mIJszzRxhrwFnh/mlg40BmxDCjpcpBZDI6Tfs2yXFu/u1T4ju4uVHHHqVwqtCvf8b0du DazcOLRLB13mendofuOG+FPCMNlxJZBhlRIVN1P5cp1K+kdYjYuHq7riAd06qL+WmMr9 pwCaNoE7fpZmYEYIF43lofeQK4WtjFkyaYnMtdZZM5PRAhy6cKkVgc+ec7HCmMd6d2IO bAu8puFDxPPByg4M/wVKa9G1ZyCWA97pcGPvSSZcrSoLODSUzqp/ONV/z6vNlpujFA08 cCsg== 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=OZK9uutJfo42bFp7MFXbl2mQl2FDOmFpqXMqzYnq/NI=; b=DkjUeRaOr1UWVQ1bxw3nFSPCNqaRQ8ValXQdUCn88hcYe+ZGXD40cTyPHXXfxKKf6A vatg+GKrefW/0i8qe+me75o52dYSqBePasNkM/Jw+50ckI06BrR4jttfnuhIOdv/oQ/l 2nkLxkhW4AgSIkxbWh0dTnIVHr9OggtaGdM/vCmlzj25COgoYLjc9oZzB0LZMCxvoiOo K73BcmVbTZTTBs2KNjvQDPOjREf20qyXC5SOHpeW9SmuGSSUYp4I3vocqeq/9WnSGWc4 q0u134jEQVIww3QkZ/Jt0WdZyGWp3ZJIWLds913OKtiyT0UIGyrBGFJQhXydFvAok6OI F2HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=g35DWi8s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c2-20020a6566c2000000b003816043ef8esi1103999pgw.387.2022.03.16.22.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 22:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=g35DWi8s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9C4E8220FE6; Wed, 16 Mar 2022 21:28:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348869AbiCPQL4 (ORCPT + 99 others); Wed, 16 Mar 2022 12:11:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244162AbiCPQLz (ORCPT ); Wed, 16 Mar 2022 12:11:55 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACCFB62125 for ; Wed, 16 Mar 2022 09:10:40 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id l8so4416463pfu.1 for ; Wed, 16 Mar 2022 09:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OZK9uutJfo42bFp7MFXbl2mQl2FDOmFpqXMqzYnq/NI=; b=g35DWi8sGB1G87635f+Qy/XBR3EjLwq750c1JTAtGhNM9QgsEJqfSne5G2/4+9U81C 5NNBcH2ELL7u2+ZduchNKPqnwh9SDvSJPnreKC6u8M20gn2Njk24Squ0DTIiefvQlfoi 72uRMBkys28E5r6lUM8/qDBzEuhr2GoR8vaUk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OZK9uutJfo42bFp7MFXbl2mQl2FDOmFpqXMqzYnq/NI=; b=eW1MiJKe//p80V1BgC1nxXwXHLVFPe+PnlhdJ9URzraOCuwoXqOc9lcik2qnGGOTU3 JX7Fy7hobQma/+E3Qf0asCWvMFgjv829fTLuGEmhjIKn8Kjo73VFD1jgZWBx/68kNZbO TN9CpewIySOwru06/hibB1kmgmLWYchEw+oDSvNA0rjdYohrgCDSDM5ijRN2PoICRYwq GH1jz5mUMzY7hQfEWoFkQcLBroVUfOMJO2rBjhr7cfqCXThPBHYpAuNMeLV6QTfHGnit w0qY20SyNRcTW9ADL7hvukOdolGpTLqg7Wky0q9QVUVxe+4KzAlOAvtweRYnG+rxk/ey sGZA== X-Gm-Message-State: AOAM533/BDPRyqxA58j7B8fL0StC0XLw6E5a/eTCWuEI8ASPkmeHo10Z eB5KBVRHY7Wj74jy33Pw9d2/1Q== X-Received: by 2002:a63:8749:0:b0:37f:f8e1:1877 with SMTP id i70-20020a638749000000b0037ff8e11877mr218310pge.529.1647447040172; Wed, 16 Mar 2022 09:10:40 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id j13-20020a056a00130d00b004f1025a4361sm4115135pfu.202.2022.03.16.09.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 09:10:39 -0700 (PDT) Date: Wed, 16 Mar 2022 09:10:39 -0700 From: Kees Cook To: James Jones Cc: bp@alien8.de, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Remove a.out support Message-ID: <202203160909.B1A022B@keescook> References: <4c449fab-8135-5057-7d2c-7b948ce130cc@theinnocuous.com> <0b31b1d3-852d-6cab-82ae-5eecaec05679@theinnocuous.com> <202203151150.1CDB1D8DA@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 16, 2022 at 05:06:10AM +0000, James Jones wrote: > I dug the scripts up in the state they were in when I gave up (September > 2020 according to mtime), and put them on github in case anyone wants to > have a go at it: > > https://github.com/cubanismo/aout-to-elf/ > > It was an interesting problem in its own right, and I'd be curious to > know what I missed. Yeah, this is a good start. I think the main problem is with how program entry works, specifically that %esp is pointing to argc (with all the args in memory above there), which isn't the way ELF sets %esp. It might be possible to make a userspace loader, though. Hmm. -- Kees Cook