From patchwork Sat Mar 23 17:32:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 87588 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 67D8B3858432 for ; Sat, 23 Mar 2024 17:38:50 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by sourceware.org (Postfix) with ESMTPS id 46E54385840A for ; Sat, 23 Mar 2024 17:35:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 46E54385840A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 46E54385840A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::12c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215324; cv=none; b=rK8hTLCRe35lLTVnn1JMZgf9/NSuWEXe99SJvpagOLs3d994XE5u7oMR08NZqumht8iCmGPGTIg6DRSIhEtPrjYwvem9dTutB9lrK22N7sFu5GHbkoUVvOeRcKhpugVEx4tavVraINyyvUJCMTK3SFzKSp0W5gcSvNRj0QtBi8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711215324; c=relaxed/simple; bh=xTwHu1yIUOjTm7fkHHVzQm8n0keEB9KMDdXuMDx0qL0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IzxyMAt9clHgMwDJ+F93myexBT9qKpQvYtTAvKSXly4MdCRoAZWZz/7q8QHRS1kW48hXsneJYnX7DMbAOQZ4FojQDT+wZ1GnmIP5yEwOcBGYU/wRBC59NlmYzDGKrIPTeN2QX/bn0iP82B51xxVpxHIhrIRCvTsfkk5N9Cxi/tM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-513e25afabaso3658253e87.2 for ; Sat, 23 Mar 2024 10:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711215321; x=1711820121; 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=vqoxVSdhOiLpJ5ZRAjMCRGdRd8w1CFAlf3R0eUJE/eg=; b=ItBcSbiYvmPcIfw3BDpetR7T9cYIo5T9iW61Ur6bHD0VdUHrieTALa8kvqphbncpea GiiJbNoFWGG1R7NWvoezdFkWIDMrCUOaDANrvO7L3EqWVjA1HH0QlUtDBQXjxvnnCkA5 VOWcU5P3yiGd8vASPZ9FtOYaqn50sCJSWj6jOG+mSrW/dofk4EpSQj7zxKczba3ka+If +ZbitZWBScZA6hhgcJNk/9AUUuiL9Elxx+jkrY4UrIHIy3QfyZFlavDZSzvIzAefC9cM biKxk1r5rpksE5H1BqDftr5sqjEMt/p2R7ms9DtAVtJ/ePIAZHm5JogNPy2IarILZO2P lRFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711215321; x=1711820121; 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=vqoxVSdhOiLpJ5ZRAjMCRGdRd8w1CFAlf3R0eUJE/eg=; b=B2uWmszr8q4uUCb/OWiu9vFfShzI9glQ5Rtt8k5hJW7XGxjcGlm0lMz/1/B5UADbve Mn8P40xGRwkRjCRZN+/ykkgxLYm7EV4TDYd7lgXVBxv6CcPh8AR0W1LWZVR/j57UpJtZ F2pZdoxT2meyKY1Ia0OXqImjBiL9A7mHxJuHMIpOKY3GxY5eYHswOKQTrYWwzlC88nog 6GCpVoL9Ra0bbTTK2KMI/3TGajrbTlTW5VeyJWDHb40HSKZ53W/zneNu7vZKsKzMidV0 4fzMiidiyCyqqH6Vdxb4eiBzbXXZvJ2PQh+UKtYUL/2bIQdAI0kA8Zg3yJkBIVpPnMYc L2ag== X-Gm-Message-State: AOJu0YyMAswn5/FKIAdiNTGbeQjen+J/gO2/Tu+KAkwsbVjrl7uMPqwX VdDBJVWDqJna+/KbZGw6aRl5iQyOQXByWj5mSC7SnAzkhMoLNMArPRdtOmJ4 X-Google-Smtp-Source: AGHT+IFe4EBi2mbe0VWtVnxYfjWs1/0UMQiAoGSlPvZfvg8g73xOrhIEZcC8m4Z5VFEdbPXwzoa+oQ== X-Received: by 2002:a19:9110:0:b0:513:1a9c:ae77 with SMTP id t16-20020a199110000000b005131a9cae77mr1795509lfd.52.1711215321193; Sat, 23 Mar 2024 10:35:21 -0700 (PDT) Received: from surface-pro-6.. (79-139-171-253.dynamic.spd-mgts.ru. [79.139.171.253]) by smtp.gmail.com with ESMTPSA id g20-20020ac25394000000b00513973dee6fsm361290lfh.150.2024.03.23.10.35.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Mar 2024 10:35:20 -0700 (PDT) From: Sergey Bugaev To: libc-alpha@sourceware.org, bug-hurd@gnu.org Cc: Maxim Kuvyrkov , Luca Subject: [PATCH v2 10/20] aarch64: Allow building without kernel support for BTI Date: Sat, 23 Mar 2024 20:32:51 +0300 Message-ID: <20240323173301.151066-11-bugaevc@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240323173301.151066-1-bugaevc@gmail.com> References: <20240323173301.151066-1-bugaevc@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org If PROT_BTI is not defined, turn _dl_bti_protect () into a no-op. We intend to support BTI & PROT_BTI on the Hurd eventually, but we're not there yet. Signed-off-by: Sergey Bugaev --- sysdeps/aarch64/dl-bti.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sysdeps/aarch64/dl-bti.c b/sysdeps/aarch64/dl-bti.c index fd0d308a..4cf85630 100644 --- a/sysdeps/aarch64/dl-bti.c +++ b/sysdeps/aarch64/dl-bti.c @@ -28,6 +28,7 @@ /* Enable BTI protection for MAP. */ +#ifdef PROT_BTI void _dl_bti_protect (struct link_map *map, int fd) { @@ -59,6 +60,15 @@ _dl_bti_protect (struct link_map *map, int fd) } } +#else /* PROT_BTI */ +void +_dl_bti_protect (struct link_map *map, int fd) +{ + (void) map; + (void) fd; +} +#endif + static void bti_failed (struct link_map *l, const char *program)