From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id BB4A23858C83 for ; Tue, 8 Feb 2022 01:08:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BB4A23858C83 Received: by mail-pf1-x42f.google.com with SMTP id y5so15124726pfe.4 for ; Mon, 07 Feb 2022 17:08:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NH8XyZiiqIKBtb3ZQSpI9zqqsEmiiLYaY55/MKXbVu4=; b=QkunkbwmgPpS2mrUUsA6lFnoaXFXr9zn+++UfX7oYdjliylLfCnBygPcoz1uqC4fnx ie97r086q3uCDSBtcHszoug6J+lAjC+kAqYmh5HQ4FZq3KjZJnxma6GztSCW4nMaDGRs VzRB13X+d2YmVGfeF6S28AUl1qqB4INWBW+b5U9IGB9gIoCgXbelQzbRVPDwGkjKgtx7 pn+lKmQO0eKcCP28asm1aQQvDCo75qcIPoPf1Fc435u/KIgEF6FhckYjJf4LCBpb4uhB HBuBNIt64WD1YiROU8wUJPCINMxGZaLuJMiYTeZhGjYkH65/k4gk3GnXiCUjUnJMGd0g Wmiw== X-Gm-Message-State: AOAM531Z0GWrBwv/39/5KQL5z3phluSsZCdGVeZBDg00FDwMsedhSE9j QD53SVedxZ6jg2Vn3tRx5J42c8B2k3s= X-Google-Smtp-Source: ABdhPJztqr5AAgi3sSRM0bx9VjLdbdLfhBO3u0zz9eKQU3oLHW9glX0TkxBM5YU0r+6Fghfwyf63kg== X-Received: by 2002:aa7:93b0:: with SMTP id x16mr2017772pff.58.1644282537497; Mon, 07 Feb 2022 17:08:57 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:3644:1eae:5601:d29]) by smtp.gmail.com with ESMTPSA id s42sm14111864pfg.146.2022.02.07.17.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 17:08:56 -0800 (PST) From: Alan Modra To: binutils@sourceware.org Subject: [PATCH 0/4] PR28824, relro security issues Date: Tue, 8 Feb 2022 11:38:29 +1030 Message-Id: <20220208010833.2103874-1-amodra@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3029.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2022 01:09:00 -0000 The first two patches in this series fix relro protection for all targets that might be running with MAXPAGESIZE larger than COMMONPAGESIZE memory pages. They also fix pr28734, the extra page gap between text and data segments when relro. See the first patch for lots of detail on what is going on. I'll leave this series a few days before committing in case someone spots a bug or has constructive comments. Alan Modra (4): PR28824, relro security issues PR28824, relro security issues, x86 keep COMMONPAGESIZE relro Remove bfd ELF_RELROPAGESIZE Don't pass around expld.dataseg pointer bfd/bfd-in2.h | 2 +- bfd/bfd.c | 9 +++---- bfd/elf-bfd.h | 3 --- bfd/elf32-ppc.c | 1 - bfd/elf64-ppc.c | 1 - bfd/elfxx-target.h | 11 -------- ld/emultempl/elf-x86.em | 1 + ld/ld.h | 4 +++ ld/ldemul.c | 3 +-- ld/ldexp.c | 33 ++++++++++++++++-------- ld/ldexp.h | 5 +++- ld/ldlang.c | 43 ++++++++++++++++---------------- ld/testsuite/ld-x86-64/pr18176.d | 1 + 13 files changed, 59 insertions(+), 58 deletions(-)