From nobody Fri Jul 28 04:09:48 2023 X-Original-To: bugs@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 4RBvKn3VCfz4phnm for ; Fri, 28 Jul 2023 04:09:49 +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 4RBvKn27nZz40CX for ; Fri, 28 Jul 2023 04:09:49 +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=1690517389; 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=VipGee5Kx+1GQe4liudVb5kd9qpk8/3t/MruDsgC6CM=; b=mINxQiZDqKBE4KjipeFR8J3NxXDr22z1D2vesBxiPkJKPeD0LF6gnhKG7kG5t+0tQEWpIe v29CnynX//lzCzIKCyGOTbx+jY6w9h5zGxE+8lBcGXl7oPkovYw7MJM6rNStk1Dm0PfXLL wNbqTnaYHNJ1ed3dmDAwQ4APbtwb+CgBjLAcrgIV5FmVJwwdRfcaafzN/UYUwr5AYfbFHQ zVyO6mcyhAYBcHfYQNVyvPhf8iC19niWVM68ZOnXr8TwkXdIQ95/3UK5rb+MQxedS+qNU1 lpQJokIu0mm75nMm9TyKWaaQWz7nvu6b7IP0DeqEe/lxJNQdvRqrGUke/FYAdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690517389; a=rsa-sha256; cv=none; b=p9VrsSK9lP2S1U+sf+soBBqINoMQ6sF8QBtSaPfE3UOG/R38xNm+32vYg4WKwrWGedLDI+ yy5sDs0ngyP79RIcDV5s27yL2a/6vf03fRvyYP2xluHwr/hGHtyjY0EINNfmvGbLymJb4z 80gptLP4uyQBGKPX1kE+xCciPBSd+qwbdmu5fofZsOpgo0GRbLhLo9Sm2OMGiW5zemXBup tvb8bgU0hc5Fp4w3YA70HKZ1sdFtBdbRMAZHoQknjXxRoIbwQMK9kg/1tlNqElsopxPrpW RsFu2es/oPKUBLOx436GgnaJwIig5qe6HECZ0qQ87BbRhximEVxwTgveIKlrIg== 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 4RBvKm5p5gzclW for ; Fri, 28 Jul 2023 04:09:48 +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 36S49mmr027175 for ; Fri, 28 Jul 2023 04:09:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36S49mlA027174 for bugs@FreeBSD.org; Fri, 28 Jul 2023 04:09:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272744] cxgbe firmware fails to build on i386 Date: Fri, 28 Jul 2023 04:09:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272744 --- Comment #3 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D8a6ab0f71f1857037233fae19991b972b= 430d83c commit 8a6ab0f71f1857037233fae19991b972b430d83c Author: Jessica Clarke AuthorDate: 2023-07-28 04:08:43 +0000 Commit: Jessica Clarke CommitDate: 2023-07-28 04:08:43 +0000 Pre-quote macros passed to .incbin to avoid unwanted substitution Currently for the MFS, firmware and VDSO template assembly files we pass the path to include with .incbin unquoted and use __XSTRING within the assembly file to stringify it. However, __XSTRING doesn't just perform a single level of expansion, it performs the normal full expansion of the macro, and so if the path itself happens to tokenise to something that includes a defined macro in it that will itself be substituted. For example, with #define MACRO 1, a path like /path/containing/MACRO/in/it will expand to /path/containing/1/in/it and then, when stringified, end up as "/path/containing/1/in/it", not the intended string. Normally, macros have names that start or end witih underscores and are unlikely to appear in a tokenised path (even if technically they could), but now that we've switched to GNU C as of commit ec41a96daaa6 ("sys: Switch the kernel's C standard from C99 to GNU99.") there are a few new macros defined which don't start or end with underscores: unix, which is always defined to 1, and i386, which is defined to 1 on i386. The former probably doesn't appear in user paths in practice, but the latter has been seen to and is likely quite common in the wild. Fix this by defining the macro pre-quoted instead of using __XSTRING. Note that technically we don't need to do this for vdso_wrap.S today as all the paths passed to it are safe file names with no user-controlled prefix but we should do it anyway for consistency and robustness against future changes. This allows make tinderbox to pass when built with source and object directories inside ~/path-with-unix, which would otherwise expand to ~/path-with-1 and break. PR: 272744 Fixes: ec41a96daaa6 ("sys: Switch the kernel's C standard from C99 to GNU99.") sys/conf/kern.post.mk | 2 +- sys/conf/kern.pre.mk | 2 +- sys/conf/kmod.mk | 2 +- sys/dev/md/embedfs.S | 2 +- sys/kern/firmw.S | 2 +- sys/tools/amd64_ia32_vdso.sh | 2 +- sys/tools/amd64_vdso.sh | 2 +- sys/tools/vdso_wrap.S | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=