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: 807271 Delivered-To: patch@linaro.org Received: by 2002:a5d:508d:0:b0:362:4979:7f74 with SMTP id a13csp2399903wrt; Tue, 25 Jun 2024 07:57:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXp7phL0qYKxrmLDaVXiFcX5Ix+e5V1ly3IRbG32zEwhHufg7TE+AI/VAlGAa5wwlL3cxw4JfIjTZdqAJJ5lbXU X-Google-Smtp-Source: AGHT+IE4D9SXHNZUTuXAIVQW1Mos3a6J9oZ8anRh+zbq92BdtlNmHyx50pM7KKyJ5xwQqwZQLFH9 X-Received: by 2002:a05:620a:444f:b0:79b:e970:6e90 with SMTP id af79cd13be357-79be9707ab5mr832155885a.54.1719327464820; Tue, 25 Jun 2024 07:57:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1719327464; cv=pass; d=google.com; s=arc-20160816; b=MskOYnV/I7glXPzJT0PR2d8bWUzmr57Zccj93zX8Z6beVgBC9bbQs15uq+QE0doAyg xbOzm99y/sbz3zPpgQgohHAq1sVMvPtS4RcPihnoVuCEbJnJq6Vbn1LALWguapDHME9q I5eDwLVWfoMCA+zhFZo69tNVj1Anblht3kHgSdXR70vYfVXnSpCvt2jEHK+Noosb8Gsm K2eymxLA1xmElCoCSFbb/9LI+bBHGMN8ZocrFx/xvXUYB1UCvoUY98TzXAjU2jnWb+6D 6tZYMku8gRaeQ4fkXfhFg0t+IYg0qBNDc6bHNNay7pUBg2q52gAjLTS5R60wbRWgO1Ou oglQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=vzfmoFbgb4eOMOV+CBf7ww1kszmWKowF7oBtoouLyOo=; fh=KB0OPycOJdCInX1nDEXFfy0M5ixXnsWAZ87F/u4DCeg=; b=rXEpzrEAWxf4LZ5B56dsSLaIZyolnp3a5BoBy3XT+RC3LO+EK7rXLPiSoK4RbyAC6f tDslfm+MjmPCMFiRI/fjTkqrGtgVGQsRkd+9PiArThGVm2LDu4V6AEijY7Xh9x5YRfmP PWLBLyKX39pX+yvJiLIOXLfn2drJLaTMDdPi+5vkTqiawzu8TkQlzVwSoT3pz4SqCIVG vp2bOUMrPfJdvhjv+X8j71EUcGun0n+8ofLIsfUd6MhGU51NfApJvA7hskxKpgWPEVRw /9OWfePRMCLD4FP8vXhsqlXzU6UzIVWpsGxU/OCwxB+By2Ev1xGVnd8WJDvMMK0h2hbj whBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DIBhM3xd; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-79bce8818b0si1121646585a.44.2024.06.25.07.57.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Jun 2024 07:57:44 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DIBhM3xd; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 741D5385DDE2 for ; Tue, 25 Jun 2024 14:57:44 +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-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+patch=linaro.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