From patchwork Tue Oct 17 13:05:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 734386 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp468899wro; Tue, 17 Oct 2023 06:07:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGct8zSsm9LC4fUOb0kp23EjKAC0HwyBEUZqtSsx92utG98VrjlHVb0g6oXYaYf80Kddnoh X-Received: by 2002:a67:c190:0:b0:457:e587:a195 with SMTP id h16-20020a67c190000000b00457e587a195mr2524818vsj.10.1697548034425; Tue, 17 Oct 2023 06:07:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697548034; cv=pass; d=google.com; s=arc-20160816; b=hXu0M/s8CogeWGGxh7xZr7KIHKjmY0AtRcEIr2sAVH3Oj7ivIDTJd0gXlWCXLOYn7M rCEk7i2LE+YuKO1eCCsdvRxurAK1qFgNoGu0GIXXe9hsWJ1uw2YiuZo6LBkQ0yTj1EYg ybbAztvYPqDOwBbZt2vgsMhE8gGtFJ0qeqwxegOgkMlwV54gp59AKdXNaYZtfSQr8vmv heVw0d6yFr6W2EpYXTTwLPqkBeCsltQ/W215O0x6f8631Ax6mMA+SwUSSBy1+OG0SWkN BZuuFsoQH5lOKERE3AAUBbVXnYsNEISOedtS6e25RWRDpyX0BtMamk5V400SSB1vBTZg A/4Q== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=/tMmjbNjay8l9Ar1cNsfbmGb8/lVFJEUoNGaSUe8Ee0=; fh=+FUb54tScwW7D3lvWhZcQBi30wyNNn2DusdH7ahfqKk=; b=n0SLNGApaZWyEeC05UGddaXi5su+R/IoVc0h0f7yse+zHyvavrX67rrOQwp2s5Xn1R r4Q/sdjaQKZRAqFt/e51lW1CxeewferqrvwtcWvi1V5Np1/wurZFrzIZc1VHAHui9vhn 9gXgsR7EVX7g7DSGvg9z6Af8xKsZhZQKFNuJmJskMwKPRY6hNJgcvTcUDvFDT7vQbnyt 5ZOQiRfx5H6Juuvmqn/+gjyWrk7IwnD1QamgCiBzILw6/41sEuOt+wPz8i8+cUtjKdEI RX+tJmtykOsXlYEDqexjGXVAJHqiI88XI2KtQ3gop0t8U1iUaNeRgi7EgZAcwoO9fHG+ Rj8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qaIcFa8F; 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 (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id l24-20020a67ba18000000b00457bf7249dasi102951vsn.659.2023.10.17.06.07.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:07:14 -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=qaIcFa8F; 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 027FD3861818 for ; Tue, 17 Oct 2023 13:07:10 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by sourceware.org (Postfix) with ESMTPS id 3BFF4385697B for ; Tue, 17 Oct 2023 13:06:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3BFF4385697B 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 3BFF4385697B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697547993; cv=none; b=htFRY5Vu4cz46GTJU97MSmEHXzDfP0XPBvNMnD05WQZYlfmheh3mCzu83I7+CAsDuqph6bQ0U7qyulzwEsY+e7MJpF55Q/8hBHWsXua6EabAgx1fg4WUbDqAWkpDViLQhrZ4OwjAwV2bEp5cyT//gzZhhUoInyV9Dn8RiaDlIfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697547993; c=relaxed/simple; bh=+V9hAN96NtqhNIx8Kp4GL4rwJvojrU811w9LNnuDm2w=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=xa5HZu9CkPM89WlJ+ohJVDmr68mhwLG2UTcYw2pEmsJj7ykHBNqXSc9qKig+JXgV7KicrHRtVX9b568Dqq9a10n0AdoXkOLGsU5WTIAz/K2E/y0yWLUpSYsnb6n82ogriDg9LY0pdkB59McX01dOKje6JHgmFJFFQJQQtaB4bmg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6bb4abb8100so2262647b3a.2 for ; Tue, 17 Oct 2023 06:06:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697547990; x=1698152790; 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=qaIcFa8FHUGyDPc5ZjR6UpOBMRe0dpZk/4BZs9foOggMYKoDv+GK29sff6pQJh8kUR K7+txQqNFEoZZDpAte6dKm0u2wqWo96LofxGxNe8mxGdxr9TumXuQHAauLZhXFSYLbKC 8KbyQ1XMKBo10jUGUzo0CXI56riLcZJuIWgkGJSpWFNKqT+tovSmBSxsdZiXKShic8+D lXbGwScMRMNO8jjmY2rVVyn8n2RwGo5E088ZSTWIU36s4nml7+snOoX6X7+zWv8vM5MW Nsu4TwDxVM11EDhI7Tacrj6/W3yPvYe5bpiDR8kFmcB0ViN3jSg5Xxw0WdfHnVoIDerZ DQwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697547990; x=1698152790; 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=mKdGdeBnUKJE5/Y+/op1RqIWTdWDLEHdSxNYUdDQowtwq/PFwJ+OyQYYkZ7vd56bwS ivRIFvn03oIJ0YypzwemfFbKl9rtsMGAETpvVkizU5EAKrM3TKzawh8yCeBbUdGCEgRd 7qlRbaqRL2Eh4HEuPtGrNMODboDns9cviqLB3VEByn8nLOEeQR9ETbq4eO9Ud58ulSud Bb5utBMCOnvsHxmxQ9aT/AhV9kat2/gBtiAhVB9lQpLqrM5MJzYDarxDs1xR2p75gW+v H6UlY3l6w3b5shMexxMaoNAlDXNW/iVo1o07LC1XaIwwbYyRIYtmU1eHFHXuDektvNl9 MXSw== X-Gm-Message-State: AOJu0YxMKQKfYh2Gq3UauG1ImjcERIvTWVmrak6vUcnA83b04QsO4y0Q BeRSHiw+xzVuQFvufCM4/os2+pSGxZBbnHZJTNTLoQ== X-Received: by 2002:a05:6a20:e10f:b0:173:f3ee:6e77 with SMTP id kr15-20020a056a20e10f00b00173f3ee6e77mr2468574pzb.8.1697547990534; Tue, 17 Oct 2023 06:06:30 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:7f2e:11d:92b4:4d78:4197]) by smtp.gmail.com with ESMTPSA id l28-20020a635b5c000000b0056b6d1ac949sm1309788pgm.13.2023.10.17.06.06.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 06:06:29 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org, Siddhesh Poyarekar Subject: [PATCH v2 08/19] elf: Emit warning if tunable is ill-formatted Date: Tue, 17 Oct 2023 10:05:15 -0300 Message-Id: <20231017130526.2216827-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231017130526.2216827-1-adhemerval.zanella@linaro.org> References: <20231017130526.2216827-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);