From patchwork Tue Sep 3 14:11:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Chestnykh X-Patchwork-Id: 1980069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=RsmNVZZd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (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 4WynXt2J1Vz1yfv for ; Wed, 4 Sep 2024 00:08:43 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 730673534FE5; Tue, 3 Sep 2024 16:08:27 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=RsmNVZZd; dkim-atps=neutral Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by helium.openadk.org (Postfix) with ESMTPS id 0AF0B3534FD2 for ; Tue, 3 Sep 2024 16:08:20 +0200 (CEST) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-53346132348so6638513e87.2 for ; Tue, 03 Sep 2024 07:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725372499; x=1725977299; darn=uclibc-ng.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=GnoB/z8yv3Mt7J4XCWvBDndtJeFnnsSe9DBIu31L+l4=; b=RsmNVZZdJ6FUnpOGuNOLsR9Yz7H1Eaco6M56GbkpjCA2e5GEoIPGQnpgtCbxo8/qYU NKDZ9KqHV3tEM8HkQ7Rphr89BodJv5Dw19y7ehp8r86Od0zlgiY9vaiv4s3zUc+DZNnM /N094OKX6W/Hd0WYYMYJvfoje/MqyRumA7r1naMZVxZfR/6/PFVnNckxliA//agvnjfF subMTr0lmTXNdbdan65ThWNqsCJ18WguDzii+L57ajx/ihicz5Tp2GluQANeNppQlmgv mOdGhjK4vQkBU8E3BUheExm8SJtgTb3N7DJShXxwk7GDZa5VS7hBQljSSKmVymr1fDib +tzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725372499; x=1725977299; 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=GnoB/z8yv3Mt7J4XCWvBDndtJeFnnsSe9DBIu31L+l4=; b=P+19eXnKeNVMB9ZB54vJRz/tXKqocZFmhT9Go5EX4KBRnSwtfDJ+YSFl/UR4ZyEwB9 2347Vp7WlAX3w1C3XGv3BaifjqksF/YDT9eCwhqfto2tAskVtFPtRjNa35wT+yXzb47g 61VShplSWpolc5IzOI7yGMXGmY3GupQoy5VeFWrAwnWuiYdfUWb5KplDiylAevhh5NvN ym0eqer8q7SGNLlzFt8toESt3jLS8QM1VY6BmwIawFyIiPzZsyVmcrj6unFMtMieU+2M w17Z7zNvqxzmFvELx3YA77CnvZHShsIyNNqy0JY8i6FjAqrx6Qf4E8DuHFc2qunDCGso UojQ== X-Gm-Message-State: AOJu0Yw4JrfqxrG97X/0SNqkFN51MmT8KDb1jYrPvt9SKUqTwdSjrGCB UHS3PhXxQknwuuIDGYLlb5vHrSsIHXhBThLINPsy26IiiiTJGzEmui7Zgg== X-Google-Smtp-Source: AGHT+IEH9tPEcShYub+ZPP8CBf35kzm8/nf2pTvlmLNk4A7ranMF2W20w1OrqVFaptcRos5nz5L4Xw== X-Received: by 2002:a05:6512:a8d:b0:52c:cca8:a9fb with SMTP id 2adb3069b0e04-53546b9089cmr8625493e87.42.1725372497819; Tue, 03 Sep 2024 07:08:17 -0700 (PDT) Received: from localhost.localdomain ([2a00:1370:817a:3109:a758:c5ac:fd9e:fdcc]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5354079b81asm2040381e87.15.2024.09.03.07.08.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 07:08:17 -0700 (PDT) From: Dmitry Chestnykh To: devel@uclibc-ng.org Date: Tue, 3 Sep 2024 17:11:38 +0300 Message-ID: <20240903141139.142037-1-dm.chestnykh@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Message-ID-Hash: 36ANYZWQ2EKAAFOKASBFLWWH7XQG2EMC X-Message-ID-Hash: 36ANYZWQ2EKAAFOKASBFLWWH7XQG2EMC X-MailFrom: dm.chestnykh@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Dmitry Chestnykh X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH 1/2] mips64n32, time64: Select correct _dl_fstat impl List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: With time64 enabled we have to use statx() instead of stat() or fstat() If the _dl_fstat implementation isn't selected correctly we can have multiple errors inside dynamic linker during startup of the system and of the almost every process Signed-off-by: Dmitry Chestnykh --- ldso/include/dl-syscall.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h index 180d03012..4b0d0f395 100644 --- a/ldso/include/dl-syscall.h +++ b/ldso/include/dl-syscall.h @@ -168,7 +168,7 @@ static __always_inline int _dl_stat(const char *file_name, #if defined __NR_fstat64 && !defined __NR_fstat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__)) # define __NR__dl_fstat __NR_fstat64 static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf) -#elif defined __NR_fstat +#elif defined __NR_fstat && !defined __UCLIBC_USE_TIME64__ # define __NR__dl_fstat __NR_fstat static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf) #elif defined __NR_statx && defined __UCLIBC_HAVE_STATX__