From nobody Wed Nov 20 03:55:57 2024 X-Original-To: dev-commits-src-main@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 4XtSG42PQRz5d99R for ; Wed, 20 Nov 2024 03:56:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 4XtSG40f4bz46kF 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-f46.google.com with SMTP id 5b1f17b1804b1-4315baa51d8so45228325e9.0 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=tQsd7T0jcTM0T7zgxlqlETjZ7cHHb6jYXEx4TCm3y9eX8QYKO45u26wL1nVPMQPjQj MzMLfmkKzMVuUr/0mwFBkpUSkZu8RNBWE+EsW8LRnoTcbkBTPDHZSl87YwcZMWalI8ss G+tjQAzG61YKukcFb81i3u31MJMIjxAXOan/9MGmsOoNFAl/KpROAvG5x99wP+U+6MYa SUaIejM5IBCh1SjqkCoNLZ+Q3ejQLY9IopcnHMOE4hHuUXIrnQMYRp6eal3j66/idh0j 3fxDBEvcr+F+Hk8dt/99mePHAK85Ny6PJ5gt7mt3MBlIhj3waLo0N1sXQFrQK4BZNpnd C/qg== X-Forwarded-Encrypted: i=1; AJvYcCWZ38Z7ggxqROp7efpEbXi3HNk29UwSKd3Urg4DczGBw/be0DgTl1d1Jku0RFzhbsJFCxpI5MUVxlpnt+s7eAXgm5RxJA==@freebsd.org X-Gm-Message-State: AOJu0Yz70l+0cJsqMLCbUPJ4YHF+J2hX6/PRVVNHF92WRVCKGpg8UPTJ uo9EW8Buf+crRz0MI2WinKXP1HDdA3QXn4r3Yzadg8wrCs9EQF3n2gOTIVcNWrI= 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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 4XtSG40f4bz46kF 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