From nobody Wed Nov 20 03:55:57 2024 X-Original-To: dev-commits-src-all@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 4XtSG42PWjz5d9YL for ; Wed, 20 Nov 2024 03:56:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XtSG40f7pz46Pk for ; Wed, 20 Nov 2024 03:56:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-431481433bdso45094945e9.3 for ; Tue, 19 Nov 2024 19:56:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732074970; x=1732679770; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XOY4qZ87+HtmQaHMhrRG1Ulotrkt56GVxAs0okONcxQ=; b=WhffTCB2rc8zThq+XgiuhA4ZnJehNF9DpKw7zac4iUi4HvHx/Ic1nxD6vC3teEUtF9 aXyfRwWt/54vnYVubqPYwvExl9mPjpHmEmTmknrhggDOJG2qAv1bm3UoJ31Dsv/IWLub BBL3R+dumIGdFTG84Ljnha+xmTAj5ZRN/Dh0LoFUOAicRQYQzZzPKOhJObqPJEhFU+Sr VQFbd1z5c2/b9WOXnAi9VdfTHIQ+hF6VF5n4S5KvzCWX0xuM1OCfVU0urb7IR5ooaCT+ hAd6pHPN4ISkEMl4ez4L8sVrq4I4Nv5qPNU7J0TOAqvqhMVYLzlS2/GAOQ9+Vkcl9jIA b9bQ== X-Forwarded-Encrypted: i=1; AJvYcCUP5dXZj5gG0/kCVRZmsMK6e3OuJH7NoSnhPR+WSpnBzc+/o+Pw+ekYqSYPrKzPgFrXt2bLp9jZV8gY2O3Qr342dZ7Z@freebsd.org X-Gm-Message-State: AOJu0YxjSJqwgxvTT4ujWKHgpik/qnoQBkHLsjHfA7/BEPPidN2FkwdL EikZ3S6/xvdyZEroZIifAEhzcpI5n1j7of/bM86lQuFP1lWgv5V6iDuz8N3nXYVQ1TIsR+nGRMK J X-Google-Smtp-Source: AGHT+IGns7GySRDf/Ck4TTh7lwaT4ZyyDVbt2JPMrofUpkZ5iD0NEmrKk9ouZGYa3SR0NrkiflbvMA== X-Received: by 2002:a05:600c:3d18:b0:431:58bc:ad5e with SMTP id 5b1f17b1804b1-4334f025ee8mr8369275e9.28.1732074970463; Tue, 19 Nov 2024 19:56:10 -0800 (PST) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-433b45d4dd6sm4092705e9.24.2024.11.19.19.56.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Nov 2024 19:56:09 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.200.121\)) Subject: Re: git: c29cba408d19 - main - stand: Narrow the 'signal emulation' we provide From: Jessica Clarke In-Reply-To: <202411200335.4AK3ZnVU099504@gitrepo.freebsd.org> Date: Wed, 20 Nov 2024 03:55:57 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202411200335.4AK3ZnVU099504@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3826.200.121) X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4XtSG40f7pz46Pk X-Spamd-Bar: ---- On 20 Nov 2024, at 03:35, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc29cba408d197ed2c267d0605e4225bb= 54153e01 >=20 > commit c29cba408d197ed2c267d0605e4225bb54153e01 > Author: Warner Losh > AuthorDate: 2024-11-20 03:05:11 +0000 > Commit: Warner Losh > CommitDate: 2024-11-20 03:24:41 +0000 >=20 > stand: Narrow the 'signal emulation' we provide >=20 > We only need to provide sig_atomic_t in emulation. However, = including > machine/signal.h brings in too much namespace pollution related to > signals. Instead, define sig_atomic_t as long. Setting long is = async > atomic on all platforms (though powerpc64 defines it to an int), = though > that doesn't matter since the boot loader doesn't use signals. >=20 > Sponsored by: Netflix > --- > stand/libsa/stand.h | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h > index 260defa3a33d..e1188fb73a26 100644 > --- a/stand/libsa/stand.h > +++ b/stand/libsa/stand.h > @@ -82,8 +82,13 @@ > #define EOFFSET (ELAST+8) /* relative seek not supported */ > #define ESALAST (ELAST+8) /* */ >=20 > -/* Partial signal emulation for sig_atomic_t */ > -#include > +/* > + * LUA needs sig_atomic_t. This is defined to be long or int on all = our > + * platforms. On all but powerpc, these are all the same thing as = long. 64-bit > + * powerpc defines this as int, but long can also be accessed = atomically. It's > + * also OK because we don't have signal handlers in the boot loader. > + */ Presumably an oversight when adding the powerpc64* ports :( Probably we should fix this by taking advantage of being able to break ABI for tier 2 architectures between major versions. Shame it wasn=E2=80=99t done the = same time as ELFv1 -> ELFv2. We fixed riscv and arm64=E2=80=99s = SIG_ATOMIC_MIN/MAX recently, but the underlying types were still long in that case, thankfully. Jess > +typedef long sig_atomic_t; >=20 > __BEGIN_DECLS >=20