From patchwork Thu Jan 2 17:29:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam James X-Patchwork-Id: 2029120 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; 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 [8.43.85.97]) (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 4YPDHB5bTGz1yXG for ; Fri, 3 Jan 2025 04:29:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B7FF23858D37 for ; Thu, 2 Jan 2025 17:29:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7FF23858D37 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id B2CAE3858D3C for ; Thu, 2 Jan 2025 17:29:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B2CAE3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B2CAE3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735838970; cv=none; b=ZEMBex4Wf4BEccD+PUSZg5gRZnjIUrrSQZLKi6J0gX+0jXP8pQi3n8i3oTqQRlw+AiRap3ZIc8EK9DUI9WTliLOQ98b8Im0Q/kSdoUenbbBcH8lrLopoGiZHeD2DJw7wTxYv2PJr708w5Ic9g0fmrg37FER0UYtTipuz9Q8BtG8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735838970; c=relaxed/simple; bh=xGS52OY8aHtm0kS+Jp3h1lmbOuPABPvXnC+cF2Q9FU0=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Y0qztEsSIhyYbwhrt/Q0MSQHkqjqJr9wZUM+ZcpBG1I8LyG9KVsjIl46knr580XTFqHyGzWhGgwv784PcPTclLxUGXeZslb6bWmugmSaYV0SkxJt38rimyXZWVw+ifsq+HfxzBd9ypClPdshLYxU0QbLt02Jqk+3F7mHiNXVSfE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B2CAE3858D3C From: Sam James To: libc-alpha@sourceware.org Cc: vvinayag@arm.com, Xi Ruoyao , Sam James Subject: [PATCH] mlock, mlock2, munlock: Use __attr_access_none macro Date: Thu, 2 Jan 2025 17:29:12 +0000 Message-ID: <17d2a69862a3d7295ff586f16503cb9154a4f933.1735838952.git.sam@gentoo.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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~incoming=patchwork.ozlabs.org@sourceware.org This fixes build failures using GCC 7.5.0 against glibc headers, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118194#c5. Followup to 013106ae677af9836614ace1a01d25b63fa555a7. Reported-by: --- I'm going to check this in. misc/sys/mman.h | 4 ++-- sysdeps/unix/sysv/linux/bits/mman-shared.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) base-commit: d5bceac99d24af1131b90027dab267e437b65cd1 prerequisite-patch-id: 3044b25707135b795279fffad16c051ac8b11f02 diff --git a/misc/sys/mman.h b/misc/sys/mman.h index a2eaf69c82..de5cb8976f 100644 --- a/misc/sys/mman.h +++ b/misc/sys/mman.h @@ -101,11 +101,11 @@ extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW; /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to be memory resident. */ extern int mlock (const void *__addr, size_t __len) __THROW - __attr_access ((__none__, 1)); + __attr_access_none (1); /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */ extern int munlock (const void *__addr, size_t __len) __THROW - __attr_access ((__none__, 1)); + __attr_access_none (1); /* Cause all currently mapped pages of the process to be memory resident until unlocked by a call to the `munlockall', until the process exits, diff --git a/sysdeps/unix/sysv/linux/bits/mman-shared.h b/sysdeps/unix/sysv/linux/bits/mman-shared.h index bfbccc14d6..31590979b9 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-shared.h +++ b/sysdeps/unix/sysv/linux/bits/mman-shared.h @@ -57,7 +57,7 @@ int memfd_create (const char *__name, unsigned int __flags) __THROW; /* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into memory. FLAGS is a combination of the MLOCK_* flags above. */ int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW - __attr_access ((__none__, 1)); + __attr_access_none (1); /* Allocate a new protection key, with the PKEY_DISABLE_* bits specified in ACCESS_RESTRICTIONS. The protection key mask for the