From nobody Thu Dec 22 03:54:06 2022 X-Original-To: standards@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NcxJH06Q0z1GwCb for ; Thu, 22 Dec 2022 03:54:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NcxJG5gtbz4NS5 for ; Thu, 22 Dec 2022 03:54:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671681246; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9baR7daT2Yaom+zUWKGzpQcM5UiylqpoKRoXz3mif+s=; b=rhomIBl6CY0GHjbEdIVrJx9pETAA+p/ak4xE5Mss7Ayk7HtcXli1k5w0RMjyXXmRNHmM8v TKwhmjqh/1K0o0DlH1Ol9HtL4xQIB5cSD9ltrfURxZHrAw1U1RwLra4z0qzgWwZZrLBofv +Em0RBsSFoeJH3FPs1mp3KK0Gdj/q6Khs7pM4P8cCJcrSNpjyHU30R3ukslonIg9Gz2avU rpB9rpct6VP1q8evMMRDZxqHi+cdfKIaUYb/sQNkiDUN0FuxZMcpHvzn9+LXwlse5YszQk cApKLrs+po7IiF5S3qCsJuMPziF7b49TcnuUdst/RsEBBXiN1IHgWIiJeKPMxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671681246; a=rsa-sha256; cv=none; b=R/MeskM5Ke8YNlywMwZob/pzdMQ1UBWVUzs6kYhag1eCJVOvMpqClqDuNrdLLerLZ3w853 N/ykoUNnyDkQ500zfNkVs+BGUbcCmnFRpqgS85KD7IXQNMaHxt6Jox3F6OtAf15Ne0Tekg PIqPiamuIv2PwF2j22pki93NQXt5rn0WCykP5u0FG2HuSbF07vXhjy+oOhWVNoN3JpowJt 3/mNdimIunSVWoxbV/Q+YG6bkB4mmym8pYxIZ2UNyb60z5HJBnHJ0AE4XBm2Zji6YA9PYJ va8UjlOHkG9pwh8eiM7VGgYlFUCxDU0fTcA9PXRD3XSWLgKvUWYZh50K200tZw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NcxJG4mbkzgmM for ; Thu, 22 Dec 2022 03:54:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 2BM3s6tm023403 for ; Thu, 22 Dec 2022 03:54:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2BM3s6Da023402 for standards@FreeBSD.org; Thu, 22 Dec 2022 03:54:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: standards@FreeBSD.org Subject: [Bug 268479] lib/libc/stdlib/getenv.c may have a problem with putenv() Date: Thu, 22 Dec 2022 03:54:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: marklmi26-fbsd@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Standards compliance List-Archive: https://lists.freebsd.org/archives/freebsd-standards List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-standards@freebsd.org X-BeenThere: freebsd-standards@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268479 --- Comment #7 from Mark Millard --- (In reply to Dennis Clarke from comment #6) Not simple? # sysctl kern.supported_archs kern.supported_archs: aarch64 armv7 That is from a aarch64 Cortex-A72 system. It can have chroots and jails that are armv7 instead of aarch64: # uname -m arm64 # uname -p aarch64 # chroot /usr/obj/DESTDIRs/main-CA7-chroot # uname -m arm # uname -p armv7 # file /bin/sh /bin/sh: ELF 32-bit LSB executable, ARM, EABI5 version 1 (FreeBSD), dynamic= ally linked, interpreter /libexec/ld-elf.so.1, FreeBSD-style, for FreeBSD 14.0 (1400073), not stripped Same machine. Same kernel in operation. Different uname -m and uname -r results and a different execution environment. Are you expecting that? (This example lacks expect manipulation via UNAME_m and UNAME_p. I'll use uname -r and UNAME_r for an example of manipulation.) There is also running older worlds on newer kernels, such as poudriere buil= ding in/for for stable/13 or a releng/13.* on a system that booted main [so: 14] (both kernel and world). If I chroot to a tree that contains a stable/13 world (and, possibly an unused(!) kernel), what should uname -r report? Reporting 14.0-CURRENT would mess up various things that are trying to figure out what to build software for. Reporting 13.1-STABLE would make more sense for a port build targeting stable/13 . But just using chroot leads to: (chroot makes for simple to set up examples) # uname -r 14.0-CURRENT # bectl mount 13S-CA72 /be-13S-CA72-mnt # It is a 13.1 context here # chroot /be-13S-CA72-mnt/ # uname -r 14.0-CURRENT This is not what poudriere would want to provide to a builder process that is targeting a stable/13 context. Thus poudriere assigns UNAME_r in the processes for building to what a stable/13 kernel would indicate: 13.1-STABLE instead of 14-CURRENT . Then the builder sees uname -r as returning 13.1-STABLE . (Similar points could go for buildworld buildkernel targeting stable/13 in the chroot.) That is not to say that all jail/chroot contexts would want to see 13.1-STABLE . It is purpose driven: building things for stable/13 makes 13.1-STABLE appropriate. (The source tree involved has stable/13 material, including for kernel interface source code. main's source code is not in use, given the targeting of stable/13 .) So which do you expect to see: 14-CURRENT always? 13-STABLE always? A more context/purpose specific one or the other? I can not tell from what you have written what you mean by "and know the results". I can tell you that in various contexts FreeBSD assigns various UNAME_*'s to produce processes that see uname -* outputs appropriate to a specific purpose --and they need not match the boot environment. --=20 You are receiving this mail because: You are the assignee for the bug.=