From patchwork Tue Oct 10 18:01:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 731468 Delivered-To: patch@linaro.org Received: by 2002:ab3:7922:0:b0:23f:8cfb:5ad7 with SMTP id j2csp2263667ltl; Tue, 10 Oct 2023 11:03:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJ3/8BHce4+WKQvUCNb4w+VTfodlcvJDmgKTdEfNr8hjMyKCWYHFBB7U3o3+7sAfo4EHZE X-Received: by 2002:a05:6512:690:b0:504:3a3d:5015 with SMTP id t16-20020a056512069000b005043a3d5015mr20253644lfe.27.1696960980246; Tue, 10 Oct 2023 11:03:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696960980; cv=none; d=google.com; s=arc-20160816; b=GgFumEmRGBdhjgIVf1sOcONpNbxKCA1tnvzf8B7baSEYiQmLKtBnJrMCJAZGJxzV86 EyXg7zXiTh8XvVgLbcacr+5xCYD/3dIZCoBE5w+o6I53nX76pBri3U+3ntLcYG1Xt9Jg msREHIVmf9FglCbxgiidUr9J5x+MRlJwccENAgZWJZwqP3afjRMRRXbgS+I1FvRDjkiU 7K3xvIJMog0e+1iqolkJAMi52XOLEoVxkQNWtV0M1WyChrNgGHZpv3Yavw1cW1KAcekw OqVkA0+ApR2zcK36PJQR05llITL7Pj+A+0PXbTvtgJFJLQ/kbEmyDJQXIvXZRC03v5V+ Ijlg== ARC-Message-Signature: i=1; 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:dmarc-filter:delivered-to; bh=/tMmjbNjay8l9Ar1cNsfbmGb8/lVFJEUoNGaSUe8Ee0=; fh=+FUb54tScwW7D3lvWhZcQBi30wyNNn2DusdH7ahfqKk=; b=ZiQ+t4V1Pk2SP2h0aeAkewHBY5y0KNEun0HSTqHkmB1GnpgRBn3nP0R7nFk6uOF1nZ nabgpfGYp0O8LKc7EbL/3J0DRUDlpJXbqbijTpv3ND8XAiIwdRcxyKxLP2wLI3KcIyMp fJhciCqgXLXFWIinPtJtUU/BUOW08mrXWkxJg3ajBYbiV99Mx7RPuB4SKiZcGz2b+yHs GsEvXJXT1vcZEQxOicBVp6PTg/SvtaSKBSqvpJmJxOKepIaLsCiXXH1TgeDwJtXJ+44q Jd5AiUYKtEGmuxqqeV8wGZ3va0r8RmQQhoPrboPMgnqyIpwfGF+NZq1+qDFtqO5AmWLK 6AZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Q0AED1nj; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b16-20020aa7cd10000000b0053464dec88dsi5418426edw.462.2023.10.10.11.03.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 11:03:00 -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=Q0AED1nj; 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 831A438618D3 for ; Tue, 10 Oct 2023 18:02:47 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 29220385C6DD for ; Tue, 10 Oct 2023 18:01:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 29220385C6DD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1c9bf22fe05so5606655ad.2 for ; Tue, 10 Oct 2023 11:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696960895; x=1697565695; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/tMmjbNjay8l9Ar1cNsfbmGb8/lVFJEUoNGaSUe8Ee0=; b=Q0AED1nj0rOVChmlf9yD826cA+rIuX13S5PDcyTkeBi3UJ1QvaS6i/kQIVbfszf5Gv CefSLTJYJ6opZreJtUfeoDVIqg/d7SNCP8OfzmJYcaYIm6UuHH2ilipXP/ifI6C4/JQs NRsXp4Ot4gNVZNDyW4I5omSiH11KWGnsJ7oGww8+ngA+RFYMywOkxc5iTZT6UQUlO/am U+vSM8tWqndwoZMzeEpSCWP2OVjUbQJ9JJBpeHkKJNWCwZHBpfZyMUjNDzi36ErYGiaU vEjEzj6OnwJ98+8iw/jV+m7gQzhU8NGW3V6dXC1MxR0ejDe2qflafcij9BDSWbiwHpLK cyBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696960895; x=1697565695; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/tMmjbNjay8l9Ar1cNsfbmGb8/lVFJEUoNGaSUe8Ee0=; b=gohlMwJX12lTUTIGHP8RXygbILFTdvZo/CjlRsvheUIs/blgX/f738zr0PDaFzqwIP rkN5lABvFKN2kSfCtjGSTc1KwMBd3i48NKfwrIoy00OmsKTRWn1/NspNf9nj2vQgBi+N VsSc7oZAseejaQJ7g4aiXt1JN1XKsdS4dluyWzPuKb7WZfftk1Iky5VTspZV0xr+I+RC Z/VH9PX2WeCiaCPaP7KrVHT28J6jywqsawbiIEoMxHd9E9n1OLu2ir2n2icBBoYVuY7j h5H8t3A2I6EBpmH9YTIBKzcFd/H8187upXXJVHm7kItno1ol5mJATWQbJiLmxOIclwqo qi1g== X-Gm-Message-State: AOJu0YzR+vTaiEY9WhgkHq2t/MYnOLXz6KRAa7mfjQmWfx/lTdFUTmQO yAyiwGbG/a+RfAXBVoCb/2cohkqYGDXV4cmjULajNw== X-Received: by 2002:a17:903:246:b0:1c0:b84d:3f73 with SMTP id j6-20020a170903024600b001c0b84d3f73mr18725092plh.53.1696960894698; Tue, 10 Oct 2023 11:01:34 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:d09b:ef2e:7c42:5ecf:a4ef]) by smtp.gmail.com with ESMTPSA id 5-20020a170902c24500b001bb9d6b1baasm12088022plg.198.2023.10.10.11.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 11:01:33 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Siddhesh Poyarekar Subject: [PATCH 08/11] elf: Emit warning if tunable is ill-formatted Date: Tue, 10 Oct 2023 15:01:08 -0300 Message-Id: <20231010180111.561793-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231010180111.561793-1-adhemerval.zanella@linaro.org> References: <20231010180111.561793-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.7 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=unavailable 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 So caller knows that the tunable will be ignored. Checked on x86_64-linux-gnu. --- elf/dl-tunables.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index 5d4b8c5bc0..b39c14694c 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -236,7 +236,11 @@ parse_tunables (char *valstring) struct tunable_toset_t tunables[tunables_list_size]; int ntunables = parse_tunables_string (valstring, tunables); if (ntunables == -1) - return; + { + _dl_error_printf ( + "ERROR: ld.so: invalid GLIBC_TUNABLES `%s': ignored.\n", valstring); + return; + } for (int i = 0; i < ntunables; i++) tunable_initialize (tunables[i].t, tunables[i].value);