Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2821026pxb; Mon, 18 Apr 2022 08:56:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtFoEqDMREN//ZKLOucTJEty3pfClCXMMjqvlLfeaGThDaDnSbQa0CIudeJiu4yxUul2Tn X-Received: by 2002:a17:902:ef45:b0:156:1858:71fc with SMTP id e5-20020a170902ef4500b00156185871fcmr11524165plx.23.1650297401660; Mon, 18 Apr 2022 08:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650297401; cv=none; d=google.com; s=arc-20160816; b=sqJNCrCURapFm6dSB432V5Ov7pDWYvLxcBp9k88O+xEEFj2mWXSQoCtebFjJl4o6aj hQmyNUH1FiHdDIJP+Y9iYp6Y3/wFzNEta+5bFQSvPZK56FgrJOZ1OkUImvtY0Wmu5eKg Qd9q4rdHUe6squz4MDQiPxC7QB+9L2hnJvamzGMCmBZD1aS6WA3Vji1QsNW+EO48x4fz kdxquLTMX2kSbT3sOZSKjZLYbSoTSK5OsuTEX1zPi4uXRKs30JQFfhOjnX96dPuHxHiJ H1FQhEJROaIiVGiRounPYGyEgVhQ7bDPpDUBy4dcVKt3GVRG7jX2o6prB+FIpxz9zkb6 NH2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=O2kle5vlczQoUJfhET2Z8Lcgv9xZayg/yIxQsnz11DI=; b=fH9W31y+fqKk8qlUWxxGVx496WvcnFOeSLGGAwxspa7gUosdnFOcNJq9cpTqexcg5A N8VbMTVgotmrvwcQJxf9+SsSPtIZLDrqyjB0oHFEJ8FVsmQPVavecap6d3aCLJMoIrOq pr/TuPRUr+gsW8Mk0Oxu91bFHGyZ6neGX/bAoiu8mPOb25NERnMdFVG6LRA134PCrWQ5 3D1IR5SCOfWULZjLXi0be/S3pc1/oVy8lDfL4n6TLgutCSrCad0T9reM6iyNEeYKr2VX w17ykgni9FmRNTFRHfSuiiUhy2lLLIYm5YzfVGL7eqBuQiZBKpw11eeCVkWN9C9t7gnm SEUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i+YE8anu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ng8-20020a17090b1a8800b001d25017fb66si6132925pjb.146.2022.04.18.08.56.24; Mon, 18 Apr 2022 08:56:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i+YE8anu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239731AbiDRMmd (ORCPT + 99 others); Mon, 18 Apr 2022 08:42:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239785AbiDRMd2 (ORCPT ); Mon, 18 Apr 2022 08:33:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D1451B793; Mon, 18 Apr 2022 05:26:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D4411B80ED1; Mon, 18 Apr 2022 12:26:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF5DCC385A8; Mon, 18 Apr 2022 12:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284764; bh=wQRtzgEkDYGCBwc27A4NaGeUAook0WSpqblp9joZd3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i+YE8anutDpyRQxOyIV81ewiahvq2W4O6Si/fdRCWu4dJPjUXNcU33XmsX09SzfUY T2MJKbaXLvepGHe+DZZ2U1q3ldduH4APMRepTbYX6IGNjXXXviTmz/GESTKXeQlBiV EDAvmpznELz3YohNB12LzHc+HWD1RXjRf9Kpr35k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "H.J. Lu" , Chris Kennelly , Al Viro , Alexey Dobriyan , Song Liu , David Rientjes , Ian Rogers , Hugh Dickins , Suren Baghdasaryan , Sandeep Patil , Fangrui Song , Nick Desaulniers , "Kirill A. Shutemov" , Mike Kravetz , Shuah Khan , Thorsten Leemhuis , Mike Rapoport , Andrew Morton , Linus Torvalds Subject: [PATCH 5.17 180/219] revert "fs/binfmt_elf: fix PT_LOAD p_align values for loaders" Date: Mon, 18 Apr 2022 14:12:29 +0200 Message-Id: <20220418121211.915190224@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 From: Andrew Morton commit 354e923df042a11d1ab8ca06b3ebfab3a018a4ec upstream. Commit 925346c129da11 ("fs/binfmt_elf: fix PT_LOAD p_align values for loaders") was an attempt to fix regressions due to 9630f0d60fec5f ("fs/binfmt_elf: use PT_LOAD p_align values for static PIE"). But regressionss continue to be reported: https://lore.kernel.org/lkml/cb5b81bd-9882-e5dc-cd22-54bdbaaefbbc@leemhuis.info/ https://bugzilla.kernel.org/show_bug.cgi?id=215720 https://lkml.kernel.org/r/b685f3d0-da34-531d-1aa9-479accd3e21b@leemhuis.info This patch reverts the fix, so the original can also be reverted. Fixes: 925346c129da11 ("fs/binfmt_elf: fix PT_LOAD p_align values for loaders") Cc: H.J. Lu Cc: Chris Kennelly Cc: Al Viro Cc: Alexey Dobriyan Cc: Song Liu Cc: David Rientjes Cc: Ian Rogers Cc: Hugh Dickins Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Fangrui Song Cc: Nick Desaulniers Cc: Kirill A. Shutemov Cc: Mike Kravetz Cc: Shuah Khan Cc: Thorsten Leemhuis Cc: Mike Rapoport Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- fs/binfmt_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1117,7 +1117,7 @@ out_free_interp: * without MAP_FIXED nor MAP_FIXED_NOREPLACE). */ alignment = maximum_alignment(elf_phdata, elf_ex->e_phnum); - if (interpreter || alignment > ELF_MIN_ALIGN) { + if (alignment > ELF_MIN_ALIGN) { load_bias = ELF_ET_DYN_BASE; if (current->flags & PF_RANDOMIZE) load_bias += arch_mmap_rnd();