From patchwork Tue Jun 25 14:57:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 1952138 Return-Path: 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=DIBhM3xd; dkim-atps=neutral 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 4W7nxz17xlz20ZS for ; Wed, 26 Jun 2024 00:57:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56802385DDC6 for ; Tue, 25 Jun 2024 14:57:49 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by sourceware.org (Postfix) with ESMTPS id DE9C8385DDC6 for ; Tue, 25 Jun 2024 14:57:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE9C8385DDC6 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 DE9C8385DDC6 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719327455; cv=none; b=Je4/idb8WwPDGJErWy7SwDsGaut3Acp6DM43ow9SXSIJ7x/vVc4YSHZQxrRcEBryg0L3v44gkvofl7hCPMCUar4nk+Ug7VeUNo6aGsBkqWQhCrbCeetYw+STinLwJrz1i8Rb0TBj9e24OZpAcWasVwzveEuVq555gqcaT6fJrWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1719327455; c=relaxed/simple; bh=Ej+IjqOlLZu29L9LL5+6H2wSpqPEW9F2vafBW04wAJU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dy5Ojevld6XQ0gAAMnb2G/WvHfjtEFNkSXbVLHAQkK0ig46DiAmJzA6PXZWuqAma9bjKhcs35YVPlr8SiKtAQkynWXrhjHfOOiG/LaeBac3BIBiTRVrB/UEmmQ14oV2PoAH8o7BOdjS1vaqf47Zg0tYqjgLha5PB7GrfRcUlj2g= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1f4c7b022f8so48445435ad.1 for ; Tue, 25 Jun 2024 07:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719327452; x=1719932252; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vzfmoFbgb4eOMOV+CBf7ww1kszmWKowF7oBtoouLyOo=; b=DIBhM3xdhD/LPoDxbQ5LHbz6d79j3ufl5JUiJV/W4/GFYwqPI9m8nY2hp9/z71hT6w bH16sgtiX5Qrwvfr7/lgDkz9HFvSBUnrfdq79ovWw/+cUS04s7fMEaGVtWnynrDhurBi pC2pkt8u5Yr5W3FtCoNoDoSD0j7VHBkpWnxcuX61Nz61GTFSiVhD+t+TZTIRzRH5EL7a hJaI2pSpP72QftB41Yb8d36sAow5kM9sOxLQlKCjinMmWG071n4xXudqyLeEIBnety0w ySH+YHVlU/j1gC1Hmak6O0uDIV7fbaqv3pggcpZJpeVq78E5d3WEveSVyfETS4Utz2F4 rXfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719327452; x=1719932252; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vzfmoFbgb4eOMOV+CBf7ww1kszmWKowF7oBtoouLyOo=; b=DHCK+dG24YnT0sL9mTmijG1TBQbXTymXv0FlnX0JW9bujsv1PkiP3M7uWXjMzkduo9 h+pxLlf+YacF5ZGeQUrYg1Naj58znTu3QVNlzmvkN4LLTRX0jmJ0XELwN/j78PvdbW5P BzfMB+Hg4lbble4NGLmq9TodlAKQYzFszQqhLA5RFI+vJOVR9sDTD5HGLl8h47He8AdD ucXUcfF7ikSz+KHvlc2NWESfQCxCbSe00r8cIj/PX5DQde98LjaMKoQnWsy8/d/6IdCl gPADKxj7HURVQ6LSfHjoydvpRJn3Zsoh1E/PWPqhv8BfDuUJTPfXN1wd3vCwHKIrB5mK Ffvw== X-Gm-Message-State: AOJu0YxgdGSQHY+Nm19FYuVKZTKTmO4Skxe7Bt7CpQDv7DZZ5FBaupvW vBzux596CQBwwaqhgjqpo4kRzqEARksWnL+xMmUXMF4jE3dUkylzha2Tg/6XSEIJGEkCa8letmM F X-Google-Smtp-Source: AGHT+IEQ5KpgBTTlEGg3DD/k7ROKotzN/AZ7TWx3TAlxvSONd2gw01i/4ONklkPEfjpUzg2f+8TJnQ== X-Received: by 2002:a17:902:c949:b0:1f7:1029:df2a with SMTP id d9443c01a7336-1fa238e3c19mr92837825ad.7.1719327452342; Tue, 25 Jun 2024 07:57:32 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c1:e1e5:816c:3941:bc06:ae5b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f9eb2f2a06sm82275045ad.31.2024.06.25.07.57.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 07:57:31 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Khem Raj Subject: [PATCH] debug: Fix clang mq_open fortify wrapper (BZ 31927) Date: Tue, 25 Jun 2024 11:57:15 -0300 Message-ID: <20240625145723.596466-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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+incoming=patchwork.ozlabs.org@sourceware.org The fcntl.h fortify wrapper for clang added by 86889e22db329abac61 missed the __fortify_clang_overload_arg and and also added the mode argument for the __fortify_function_error_function function, which leads clang to be able to correct resolve which overloaded function it should emit. Checked on x86_64-linux-gnu. Reported-by: Khem Raj Tested-by: Khem Raj --- io/bits/fcntl2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/bits/fcntl2.h b/io/bits/fcntl2.h index 26f1792fd1..c8888b50c1 100644 --- a/io/bits/fcntl2.h +++ b/io/bits/fcntl2.h @@ -62,7 +62,7 @@ open (const char *__path, int __oflag, ...) } #elif __fortify_use_clang __fortify_function_error_function __attribute_overloadable__ int -open (const char *__path, int __oflag, mode_t __mode, ...) +open (__fortify_clang_overload_arg (const char *, ,__path), int __oflag, ...) __fortify_clang_unavailable ("open can be called either with 2 or 3 arguments, not more"); __fortify_function __attribute_overloadable__ int