Message ID | 20240930200831.1669010-4-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=XE+pcQZ0; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XHXHB42zLz1xsc for <incoming@patchwork.ozlabs.org>; Tue, 1 Oct 2024 06:09:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 151E3384640E for <incoming@patchwork.ozlabs.org>; Mon, 30 Sep 2024 20:09:53 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id B6BC83849AC4 for <libc-alpha@sourceware.org>; Mon, 30 Sep 2024 20:08:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6BC83849AC4 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B6BC83849AC4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727726932; cv=none; b=h8E5O0lsEULswf1QGOCX/OGTWlV/g98R37r1qawMdFWGVMip1vwmwAmm8ZcJcdC1ejT3DkvkNXHjfKiPWSuuV87Mi5iXS7VTzBRXStcTbaifESaYW7Z/KhOKJSiDuURNZHuMTXTo2k2A/jv1kTdjxNsUo94c5M0/3NsT44Oid0g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727726932; c=relaxed/simple; bh=Z/IFPyohGzY2amWz/0l6s4QlyK0PDIJ3nmjjdByNp1w=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Rox5IoBYiOe51h4CO00A5fSNwHqn/zjYzsx12qtQeMs7UaZhZ1OhNinQAw2RSHDDbb1D4uFsMfM42jgjZn/OTi5HQmY8//Bui13l+KYzUao5Q+WTSR/uXemFDVzK69mxwFneL04KZSS98LHZEc3xTkmtoRAZH8f8sYjgui8GrnQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-20b01da232aso34051945ad.1 for <libc-alpha@sourceware.org>; Mon, 30 Sep 2024 13:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1727726929; x=1728331729; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qo1+QsqCRiZ1lpIaotDFAn0w97r06TArb2ben/5KGn4=; b=XE+pcQZ0Cmf80wviz97OnTa8m7Wk09KwgEBoXG10xkK7TG27joJ0H2YDRJmoe12doS T/jMvi4mDyW2Z5HQDjdGN25S22mR18zUSAvjsKCbwVtZ3n06L7zeuL/hv570gULUwpoM NewZYliK0h/U3NVN2t7BGCwYiTgduQ+OOSE8/BRDquI2pQIRUqV2U8oGoOfxFWknjCWh eF1FouK5AMq81W2ZnIFPJGweraj+GT9L6DubQ4FSG8BPyQ6vlYSJW7gqDCmoQtISqWLH hMdFLT8c+DEWo55DxPoUajKjIH3kANGAAX2RiKmAhfFNXitBIthaTHIuFoZi0P9or4mG 731Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727726929; x=1728331729; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qo1+QsqCRiZ1lpIaotDFAn0w97r06TArb2ben/5KGn4=; b=bROMLNg2IpKFrbfhR4ZGaQmhYpGTA6ffyVOQAN+Bu7ziYYHm2/7S/zwLax0tr6DuaG QCSe6TuThY+d4seAHLbHysST0afIHLV9uB3G1ZWSb0tQBdSbnr64IcMaTJU0u+N4O0H2 WbcOXBU+ADORpLpdd2qFINhGsg8xkJgs/4S/pk+HW8kjM11Bsjf+PT8UVr7vVm5Qnwy4 zi64yeCUfkrwakY6M5Cj/cZP4gVYgMYhqNx3b11d1o0HQIDNyi3HETeywUxTVlas/ilG T96Xn9FIIMAYUhncSNdpS7pqH6XYxESJGHS2cohSCBf6+UAQ5bkuDkcezEKKF0/cG9ng sAhQ== X-Gm-Message-State: AOJu0YzjYX+X4zGTBL1690miMFn2BTsgeqqxEBkhVZkAXPHddY4tzJvw zIiCh5PO10TuxhxJMimOLqpkKopENJ0Q3juthnqTgh0IkykLy3UJFxM3vzRlhBi2KGyAqvJVLcL 3lpo= X-Google-Smtp-Source: AGHT+IHLEQvn6gSXz+j58E7ZaS8t6qqnayiXONoyqnHXJ12Vy7jGUfOu+b4XTtDJxBv9zwz2hO3gVA== X-Received: by 2002:a17:903:230c:b0:206:9c9b:61bb with SMTP id d9443c01a7336-20ba9e9ab3dmr12677655ad.6.1727726929452; Mon, 30 Sep 2024 13:08:49 -0700 (PDT) Received: from ubuntu-vm.. (201-92-183-102.dsl.telesp.net.br. [201.92.183.102]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2c4845sm6869565a12.43.2024.09.30.13.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 13:08:49 -0700 (PDT) From: Adhemerval Zanella <adhemerval.zanella@linaro.org> To: libc-alpha@sourceware.org Cc: Stephen Roettger <sroettger@google.com>, Jeff Xu <jeffxu@google.com>, Florian Weimer <fweimer@redhat.com>, Mike Hommey <mh@glandium.org>, Adhemerval Zanella <adhemerval.zanella@linaro.org> Subject: [PATCH v3 3/9] elf: Parse gnu properties for the loader Date: Mon, 30 Sep 2024 17:08:25 -0300 Message-Id: <20240930200831.1669010-4-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240930200831.1669010-1-adhemerval.zanella@linaro.org> References: <20240930200831.1669010-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Errors-To: libc-alpha-bounces~incoming=patchwork.ozlabs.org@sourceware.org |
Series |
Add support for memory sealing
|
expand
|
diff --git a/elf/rtld.c b/elf/rtld.c index cb6b61d570..8dfa089f83 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1751,11 +1751,15 @@ dl_main (const ElfW(Phdr) *phdr, /* PT_GNU_RELRO is usually the last phdr. */ size_t cnt = rtld_ehdr->e_phnum; while (cnt-- > 0) - if (rtld_phdr[cnt].p_type == PT_GNU_RELRO) + switch (rtld_phdr[cnt].p_type) { + case PT_GNU_RELRO: GL(dl_rtld_map).l_relro_addr = rtld_phdr[cnt].p_vaddr; GL(dl_rtld_map).l_relro_size = rtld_phdr[cnt].p_memsz; break; + case PT_GNU_PROPERTY: + _dl_process_pt_gnu_property (&GL(dl_rtld_map), -1, &rtld_phdr[cnt]); + break; } /* Add the dynamic linker to the TLS list if it also uses TLS. */