From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFAFACE7A81 for ; Mon, 25 Sep 2023 15:28:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbjIYP2N (ORCPT ); Mon, 25 Sep 2023 11:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232807AbjIYP2K (ORCPT ); Mon, 25 Sep 2023 11:28:10 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB763A3 for ; Mon, 25 Sep 2023 08:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695655637; h=from:from:reply-to:subject:subject: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=wckYes9tuj8TsYij0Z4ld4U0TeFfOFKN2Inn7boKvjk=; b=F8U6nQRpCpbSrUMGbjMu2UV/TGzyz5rLFiSF+J3JsUrojlmR5oczxxfYAJPezOscY1YmYf YUfHLGIQcpntxw2Vn+xRX/eZAzvcIXE5k7xlkirYGbUZ2cLkm0HTZ9BpR7CL4eZ/GEahfI JdpOMy9+7kgU2RqLg1Rl6DoFBysDryg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-6qdJZPNmMBao7lfbe4fpsA-1; Mon, 25 Sep 2023 11:27:15 -0400 X-MC-Unique: 6qdJZPNmMBao7lfbe4fpsA-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40554735995so40713035e9.1 for ; Mon, 25 Sep 2023 08:27:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695655634; x=1696260434; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wckYes9tuj8TsYij0Z4ld4U0TeFfOFKN2Inn7boKvjk=; b=Bv2GIZNhiG0EF8my2z38e+OhjsMpOwrn38lnTE+X1cnIbdGSoTGq6vBvEqIfrsKwnT kB63ud0mLE0FGa2pxK8Iz4Gk7mEHr1xYCiS2/nQa7pGS2AEDO9Lt55TJcNFTWupm43Oz QVLl9DT5VnoOwqackLfpvqTjipneLgFN5QeN1K2e7Dyt+LsPU2bmrdHhO+jgU1QBizUn rI3xas2SCu37GMdfAN70C9+DE7AzD3uI7K3Y5RsuAAv8c69z+waI3OAEgr2rowEhHxbF uZkMfwuOusaX6AOk+W7MEaofEw1o9Mi7cBTKac/Pk86O67e8ooUEM35aFAMXxbWwOCvd 0SDA== X-Gm-Message-State: AOJu0Yyq5Zdm3h9wp1EtTIw/X+lNj3RxR2ECv/xhzm0kVqgQr9bxM/kL dvfVmxL2DHcnfp6aoP32Quw66WKghYvvyjnd2tqz6HQaSEw5xNT5GMRE1urxpboA+3JyvZkTLwc ni0egFFAbj46bM8z1 X-Received: by 2002:a7b:cbd1:0:b0:405:36e3:e863 with SMTP id n17-20020a7bcbd1000000b0040536e3e863mr6718244wmi.8.1695655634480; Mon, 25 Sep 2023 08:27:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnUGDIoj3/uAJn5Af95qg7TvdfuoTHpeIxNzT9laP9ft2YNgz4K0T93YKo0VDl+RqviGHKHA== X-Received: by 2002:a7b:cbd1:0:b0:405:36e3:e863 with SMTP id n17-20020a7bcbd1000000b0040536e3e863mr6718216wmi.8.1695655634131; Mon, 25 Sep 2023 08:27:14 -0700 (PDT) Received: from rh (p200300c93f1ec600a890fb4d684902d4.dip0.t-ipconnect.de. [2003:c9:3f1e:c600:a890:fb4d:6849:2d4]) by smtp.gmail.com with ESMTPSA id v21-20020a7bcb55000000b00404719b05b5sm12555738wmj.27.2023.09.25.08.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:27:13 -0700 (PDT) Date: Mon, 25 Sep 2023 17:27:12 +0200 (CEST) From: Sebastian Ott To: "Eric W. Biederman" cc: =?ISO-8859-15?Q?Thomas_Wei=DFschuh?= , Alexander Viro , Christian Brauner , Kees Cook , Mark Brown , Willy Tarreau , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] binfmt_elf: Support segments with 0 filesz and misaligned starts In-Reply-To: <87jzsemmsd.fsf_-_@email.froward.int.ebiederm.org> Message-ID: <84e974d3-ae0d-9eb5-49b2-3348b7dcd336@redhat.com> References: <20230914-bss-alloc-v1-1-78de67d2c6dd@weissschuh.net> <36e93c8e-4384-b269-be78-479ccc7817b1@redhat.com> <87zg1bm5xo.fsf@email.froward.int.ebiederm.org> <37d3392c-cf33-20a6-b5c9-8b3fb8142658@redhat.com> <87jzsemmsd.fsf_-_@email.froward.int.ebiederm.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="-1463795790-784343621-1695655633=:4500" Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1463795790-784343621-1695655633=:4500 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8BIT On Mon, 25 Sep 2023, Eric W. Biederman wrote: > > Implement a helper elf_load that wraps elf_map and performs all > of the necessary work to ensure that when "memsz > filesz" > the bytes described by "memsz > filesz" are zeroed. > > Link: https://lkml.kernel.org/r/20230914-bss-alloc-v1-1-78de67d2c6dd@weissschuh.net > Reported-by: Sebastian Ott > Reported-by: Thomas Weißschuh > Signed-off-by: "Eric W. Biederman" > --- > fs/binfmt_elf.c | 111 +++++++++++++++++++++--------------------------- > 1 file changed, 48 insertions(+), 63 deletions(-) > > Can you please test this one? > That one did the trick! The arm box booted successful, ran the binaries that were used for the repo of this issue, and ran the nolibc compiled binaries from kselftests that initially triggered the loader issues. Thanks, Sebastian ---1463795790-784343621-1695655633=:4500--