From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 7C78F3858D28 for ; Fri, 13 Oct 2023 13:53:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C78F3858D28 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-ot1-x32a.google.com with SMTP id 46e09a7af769-6c7ce16ddfaso1396255a34.3 for ; Fri, 13 Oct 2023 06:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697205225; x=1697810025; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=NtTP+bDQi1S5CUFsM1mFqtoA4vSxbJTPi9TGCXOiE4s=; b=aoYcmwJXnqDo0qbDyoa4FQqut0hxNtKW0t0yvw+I39j7rbN1tQRwOqIT+fsA7SubS+ fcFlozCDCXKoSoFhD04Jf5IteplOQnbGWFHz/IOQzk3p+Uai9wi0AGlMYEC5rWoiu2fx JSviqnTp+zIu2FyxYOWd+texaLIbfm7PcngT/bFfth/KhQsoy4PWLqQd54xqxAeDYzsn 7dO8y4wc1wj1jjegY0bcRYXA1JZRiVpHOR0TeVQcxtQMfJc50MLSUfet8ueINGBIxQSc Tepuv/eq7CFabO+tuWdhNs58xZTd3glTHRIh0wETVPEzJkHZadGI6doW+gWEMQIZ8T0V cCaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697205225; x=1697810025; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=NtTP+bDQi1S5CUFsM1mFqtoA4vSxbJTPi9TGCXOiE4s=; b=LF0pMiRh7qLiUAFNKOIbx67MkaW1l9+Nd2bksd1Kv7D9CEkgCYOdzldXGOC9tK1jHq 6affYsBDQQBuXxHC+xVz3aawZeR3i9gCqM/R3EBvgm2n9dukbd8IE+2DLPHuVirBV+Sf WBW+2F/f6UETQeBjhRma2z0qzNIV1OO5zeKsafMHugWGxPvTbiOr4sg8Gt8w7p8Y9L7d N5RfinhAvtg2uOJG60E7pxNxW2HiyMUT8O/2Fk8WhisjiOyW4kPhPtP/hdkvF9B/MpQT cQhkIlNLCL+J6nTvPY8W7q64axuAyfJYE8k2IwWT39sRpM0q003DaxfYy4aJA2qfUmlO wfnw== X-Gm-Message-State: AOJu0Yxp0ll1pMEyR5t3whcQjJMbqx677EstFupP17zaMsRoYeDKK049 Wj1OdSjTN7c2g7K/MypxtQgrhA== X-Google-Smtp-Source: AGHT+IEyzUowahgKKtCSK+alX3lo87p8DMlh9pZTDsE4pOhaWe9f9eY0T+RUj5as94MQeBlAnqxQaQ== X-Received: by 2002:a05:6830:22d8:b0:6bd:836:4fc2 with SMTP id q24-20020a05683022d800b006bd08364fc2mr28544258otc.17.1697205224795; Fri, 13 Oct 2023 06:53:44 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:d09b:642a:4b0f:e5f0:8bf7? ([2804:1b3:a7c2:d09b:642a:4b0f:e5f0:8bf7]) by smtp.gmail.com with ESMTPSA id i19-20020aa787d3000000b0068fba4800cfsm13503460pfo.56.2023.10.13.06.53.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Oct 2023 06:53:44 -0700 (PDT) Message-ID: <6e0221ce-c852-4fe9-9d4a-3dafd4ebb055@linaro.org> Date: Fri, 13 Oct 2023 10:53:41 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 03/11] elf: Add all malloc tunable to unsecvars Content-Language: en-US To: Florian Weimer Cc: libc-alpha@sourceware.org, Siddhesh Poyarekar References: <20231010180111.561793-1-adhemerval.zanella@linaro.org> <20231010180111.561793-4-adhemerval.zanella@linaro.org> <87il7ckz1z.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <87il7ckz1z.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 List-Id: On 12/10/23 05:47, Florian Weimer wrote: > * Adhemerval Zanella: > >> @@ -36,57 +31,22 @@ >> >> static char SETGID_CHILD[] = "setgid-child"; >> >> -#ifndef test_child >> static int >> test_child (void) >> { >> - if (getenv ("MALLOC_CHECK_") != NULL) >> - { >> - printf ("MALLOC_CHECK_ is still set\n"); >> - return 1; >> - } >> - >> - if (getenv ("MALLOC_MMAP_THRESHOLD_") == NULL) >> - { >> - printf ("MALLOC_MMAP_THRESHOLD_ lost\n"); >> - return 1; >> - } >> + int ret = 0; >> >> - if (getenv ("LD_HWCAP_MASK") != NULL) >> + const char *nextp = UNSECURE_ENVVARS; >> + do >> { >> - printf ("LD_HWCAP_MASK still set\n"); >> - return 1; >> + const char *env = getenv (nextp); >> + ret |= env != NULL; >> + nextp = strchr (nextp, '\0') + 1; >> } >> + while (*nextp != '\0'); > > I think we should keep some tests that are independent of > UNSECURE_ENVVARS. Not sure what which tests you mean here, my understanding is elf/tst-env-setuid.c is testing that UNSECURE_ENVVARS is being correctly filtered out.