From patchwork Tue Dec 31 18:26:10 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: 854388 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp7048591wrq; Tue, 31 Dec 2024 10:28:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUUU5DBqlOPuxnDNDR3HBlzEsDudXzGl057doJyuhTr0cb4d1Mn1NafKaFfwUUbXGW2ghUnfw==@linaro.org X-Google-Smtp-Source: AGHT+IFZ1TsEB+6ztVGNQiitzsHCBi62bRC0O+5340qoLhxbwy1oGAvfGGYW6SKw/rZRhMhYk4Jy X-Received: by 2002:a05:622a:209:b0:467:874a:fc77 with SMTP id d75a77b69052e-46a4a99e63dmr591488301cf.45.1735669693622; Tue, 31 Dec 2024 10:28:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1735669693; cv=pass; d=google.com; s=arc-20240605; b=AA0fbjZY+V8PjCk/3rFFMpB89pbRTmiNgmRoKhsKn7I9oguiWh83X1+Kxk50oB9BPi QxCLEGibr0ju4TWG+aMfkDeOhNDO8yXP1KzFX/xVtSN5/ZIPAFXOpSquYg/R/CmyYyyf aD1r7ymUjSYi6TbTBHxri0UEjY0AXf97txya+oa363El8WdrHkH7XpELzHEjlnEfOeMu x++AP55UUN5yHjfoQvl0cMQDDcDFi7NH4BHv5KuPXxTk4WcIkI23M6VBYGx+tK7aBGMD Jp80uGRuKtpdkf44EkuSOorO4dEYi6JE9/LWrB5A+Ae3wafq06djJSeQ0E6GMehvGyST 1o3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to; bh=Z8Y9gF0ZlNufK2c+AUMZtPCGf3g4ZxvZTOq8laMDeYw=; fh=d7KdQ+eBG5Owb97PZQUBRjccSsV/hB6hMlyGG6W37vA=; b=TBN9A/Y2Db8a9EOPCLMIlcg8eRjx66ddIKRj6l9hDL6AZokQx4H1AUSk7yGeU3UpL5 rMNWpAHhn94ScqTHaZw79yyKt+x5p4x5Lhmop4YIu9PS9U+Zr2Gywvv0GdaSTds0ZeLz CE51WcsWP9CxJTl3/O7+eAmC4VPcZl5xTXGJzs/ZVVxSIyXGK74LgyAB8VU4Kdjb+Kc9 UND3IQ02NHyTfPgL2M5HioLjKHbMEtdkan03gNWFQZa2wCM/NB4zVrRZjnKES3Udggw5 4crf1MXeYqoUEdEalJCM2Iqt4v8ptE7syBHUOr2dZYo8ALI+pRJVK44aind3znCsP27m OHNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HvxJTYT9; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id d75a77b69052e-46a3ebd5f9csi290770321cf.506.2024.12.31.10.28.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:28:13 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HvxJTYT9; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c 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 4C9893858C54 for ; Tue, 31 Dec 2024 18:28:13 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 293D33858C98 for ; Tue, 31 Dec 2024 18:27:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 293D33858C98 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 293D33858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1030 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669623; cv=none; b=Rq5QhM8mrAwvSDm8+jpvsEnAg2ayazpA347pTl8XWY51xZNW4A6cQhQbDXRnqmq/UN/IquiZYfouEl8m4fDDPED24UQJDbyhsCOy61+KOLvgxJVf0f+1/4FvfvxcYlbMFaWCHw6A7aM49pbXCUh3WqCnaHLC3rekb6B9N2lgyiw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735669623; c=relaxed/simple; bh=vJxGTsZ5S27o/JdM5b7BXtKz09ZeDIry7CI7T2meNT4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ry3nrr86RvaWjIXWK4o+XQesVe13N2pjNcbZBqh1uh2KCiqmxJ47LtyWF+/0RW3zR5bdBC2vIX2/qz5ze2cAZTxDzflpS+lJMRQgWILsrCMiQO6CF/AVdjUz6VS5lLuSi/mobKDwxrqUGZlTHLLTIQJILOh54QjWPRCuIHJw/3s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 293D33858C98 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=HvxJTYT9 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-2ef89dbd8eeso10171874a91.0 for ; Tue, 31 Dec 2024 10:27:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735669622; x=1736274422; 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=Z8Y9gF0ZlNufK2c+AUMZtPCGf3g4ZxvZTOq8laMDeYw=; b=HvxJTYT9oVeDzdZgsOgpdUdRxB59NpBphR9qYc+h81DeONF4689M3A/Li9hyO9479J GrG+x75TMBtuJwqer+o7pnRhhTAhoQJGBqVODSHBs6ZH7L/chXN2qwNAY8P3LRUnSZGh 9laJlzf1ciIUNLf6RV+qCQ9kArDgja8llxMDVUfwafWBRmF6M+FbjuWIv6/Yx7A+zzlq qkfd8JOEGWMceLhM9WT+KTRCop0GpB8somuBlmjZ+jtPULzb6jWFLCvvLjv7709WA+C1 OsWaiN9a/sQwlPf+xPj4LOJxI0fTKdvH7ZUCgDnhH5vs0WWKYg/odIypJDLKLWoIFe+z ckqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735669622; x=1736274422; 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=Z8Y9gF0ZlNufK2c+AUMZtPCGf3g4ZxvZTOq8laMDeYw=; b=H1npzfOhMBGS5vxzHblTCoqMwR+0nKZYn+0E2bYb6+JvfCZU3xTpOyIQm+FX6xM7SP V/f4z612EHsW+ltvDrU1kVOA0uAKxtVW0mtnqUPEpH+8ij2wpflKiLkVc9huVkc2cO/g zL4C3xeHii2wFv16vcBSAYNjz65OimQUni5HLyRDygiA+VR6/jztBuCEEM1tIGXK7i0+ eCr2D0EUk3P8HILE2l/xVoYfMGoHgUbc28XspvpwuxugQdo11e3uoxZfg1puYtdIHS26 UreWhU3UE3ZcULXUCfm8/xOn6/x3EoG9rmzXoEeZ74k8eNmaGzCcfYcXaRIw5g4szdgu AFVg== X-Gm-Message-State: AOJu0YyNgfVdfE6YValqILOvhuOXSYeHLSPRLtESaUBu6NDMTWrrPBmo Xs8fgu9EpSPO7WtpjLF3WTLr8J2i0gPck4ctgJwkE4HU6cujQiXgZNGyiJGJDNoSDnORYaqaSS3 + X-Gm-Gg: ASbGncsnES2oDBYpyMbmIAxSmW+23zyjQwWvH5LqWcFBGQOpWhLE57FHHG+dlJ5vSm0 veLSkmhDmli6KimXh9WaNuIkFawevSD3gsMLl+UYILsi7bjfM3zBMiIscs5UFzR6sdfTx9sR2gO 5YdeR93RtGtTemMQREOAaYQfVV4k7hsLxwvX+P7K+oz+17jQAqIsh3FAgrTKITsWJombi/5k1Ve vPgU7ek5hLlAc8333Vt9vS1vb2P4DBDrxkl9c9h+oX7yNdqtI37uhDgXYTd0h3lTwnO/FYfh3M2 J1RWLWt73ylB2gHtJsAfvfi5q8eL X-Received: by 2002:a17:90b:2e06:b0:2ea:853b:2761 with SMTP id 98e67ed59e1d1-2f452eeb5d6mr61310260a91.37.1735669621855; Tue, 31 Dec 2024 10:27:01 -0800 (PST) Received: from ubuntu-vm.. (201-92-184-234.dsl.telesp.net.br. [201.92.184.234]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc9f5046sm198693105ad.179.2024.12.31.10.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2024 10:27:01 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Sam James , "H . J . Lu" Subject: [PATCH 4/7] linux: Expand internal prototypes for not-cancel.h Date: Tue, 31 Dec 2024 15:26:10 -0300 Message-ID: <20241231182649.1811734-5-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> References: <20241231182649.1811734-1-adhemerval.zanella@linaro.org> 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~patch=linaro.org@sourceware.org When building with fortify enable and with clang, internal tests that might use not-cancel fail with: ../sysdeps/unix/sysv/linux/not-cancel.h:36:10: error: reference to overloaded function could not be resolved; did you mean to call it? 36 | __typeof (open64) __open64_nocancel; because clang fortify supports relies on function overload and by having multiple function prototypes the __typeof can not find which one to use. --- sysdeps/unix/sysv/linux/not-cancel.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index 12f26912d3..3a14a407f4 100644 --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -30,31 +30,31 @@ #include /* Non cancellable open syscall. */ -__typeof (open) __open_nocancel; +int __open_nocancel (const char *, int, ...); /* Non cancellable open syscall (LFS version). */ -__typeof (open64) __open64_nocancel; +int __open64_nocancel (const char *, int, ...); /* Non cancellable openat syscall. */ -__typeof (openat) __openat_nocancel; +int __openat_nocancel (int, const char *, int, ...); /* Non cacellable openat syscall (LFS version). */ -__typeof (openat64) __openat64_nocancel; +int __openat64_nocancel (int, const char *, int, ...); /* Non cancellable read syscall. */ -__typeof (__read) __read_nocancel; +ssize_t __read_nocancel (int, void *, size_t); /* Non cancellable pread syscall (LFS version). */ -__typeof (__pread64) __pread64_nocancel; +ssize_t __pread64_nocancel (int, void *, size_t, __off64_t); /* Uncancelable write. */ -__typeof (__write) __write_nocancel; +ssize_t __write_nocancel (int, const void *, size_t); /* Uncancelable close. */ -__typeof (__close) __close_nocancel; +int __close_nocancel (int); /* Uncancelable fcntl. */ -__typeof (__fcntl) __fcntl64_nocancel; +int __fcntl64_nocancel (int, int, ...); #if IS_IN (libc) || IS_IN (rtld) hidden_proto (__open_nocancel)