From nobody Mon Apr 8 20:49:03 2024 X-Original-To: freebsd-hackers@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 4VD1Rr2QjDz5FmGL; Mon, 8 Apr 2024 20:49:44 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VD1Rq0b2pz4DMy; Mon, 8 Apr 2024 20:49:43 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=iI8VKm5F; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of marietto2008@gmail.com designates 2607:f8b0:4864:20::529 as permitted sender) smtp.mailfrom=marietto2008@gmail.com Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5e4f79007ffso3334503a12.2; Mon, 08 Apr 2024 13:49:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712609380; x=1713214180; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=N817xL8L7824fxQfequheM+xKXT1IqIyZ1lWhSVTADk=; b=iI8VKm5FKH3PzvmUMZJcA9XB+VNWzlqRxE4qyUds4dA12YRnS2RAu7HG22xFfEZ2BO 2RD0RdQeYd4wlF4p8HtKvs15XrScMQtpzojbKj9ENv3X1ZDst8SE3WfzxJG8ZTS/n8Uk dfOZeyz5LTx8ceZqAUkShUOKlDHYL7O8xqTUH/qu6yNPKRphg61dZx/ebx1DiEmYc6fN hty1moG9YrEn+1KQpk/hGAbDoyrY4Yf02FexBuzCnL4v5Ax8I82BCSMGUhWHLgNsYCVc Cx2E6U2987kpmri5Um40ZR//TH76RPrtNyI1H5vY6VpIqQ+MnwAheOSSStFhqJUVGL9h bbaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712609380; x=1713214180; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=N817xL8L7824fxQfequheM+xKXT1IqIyZ1lWhSVTADk=; b=QwhZrArNJvfVSSJz1oCK5KBthAyF5wcZGnhY1R2ifDwK7V1NzcQD4jgemLFE6Xa3RH PgrH02t/3n71f8GpvD4lHBoMv4ynOwL61E6rSlE4RJE8UzVuKtG57pE7LI83Nk+lLA2p Uko6xDfQnXe7nMSapQapzFZiLzReViti5Kj5CtsjN1AXrNcPPQOCWfJX5y2mJxb0XpmK vjNhWAxrcdkiiE8QqCaxpo984InNY62Vl7ja6JvG2uYnW6ADd8+i92EhEW2o5NeR+dwN AVgSWaTPFEjW5InhwmyAfWkEj+GnIJMvGcLCw8hE4FUWk7cMU87OoSQGSxp+69LM7f3r 4NTg== X-Forwarded-Encrypted: i=1; AJvYcCWIdhzjnjJWDBlrfmyfkAFMogax/aZnxs+utO7BDfPir5ADDLG6szjOFCxO5ZtdlGWVccis1glClHV/6HpKRObvS104JPiw3fRbvdKcnQ== X-Gm-Message-State: AOJu0YxJMi+Gtg8EZ4oSyICo4ykixybvAsAcONMx4pXHaFSS0AHSPQM/ 4C0TyUPDdKz/0x5mXD5dCIrIygxy8a1fC2uY1DffkDElEFJaGeuH9NyX+NLczjM8yuNkTV6j9Ek fTJUhMRtweIgMxtXrZidIuiltsojFqDB1MRFc/F8I X-Google-Smtp-Source: AGHT+IFjudKGT9XI4iw49Xj7k5tlR/gmb1ayPxAL1sZppPsZXkhiEUPQntUChowUzICBmWE+ic42a1horAOlHN74BmY= X-Received: by 2002:a17:90b:33d2:b0:2a5:2870:6d with SMTP id lk18-20020a17090b33d200b002a52870006dmr3080029pjb.48.1712609380477; Mon, 08 Apr 2024 13:49:40 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 From: Mario Marietto Date: Mon, 8 Apr 2024 22:49:03 +0200 Message-ID: Subject: Implementing a kexec()-style system call for FreeBSD 14 to boot a Linux kernel directly from FreeBSD. To: freebsd-hackers , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="000000000000c3335206159bf1a0" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.992]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::529:from]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org,freebsd-questions@freebsd.org]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4VD1Rq0b2pz4DMy --000000000000c3335206159bf1a0 Content-Type: text/plain; charset="UTF-8" Hello. surfing the net I found this : https://github.com/fail0verflow/ps4-kexec It was built for Orbis (based on FreeBSD 9) ; a very old FreeBSD version. But I'm intrigued by the idea to update the code and make it work for a recent version of FreeBSD. It would be cool to "boot a Linux kernel directly from FreeBSD"...Any consideration ? -- Mario. --000000000000c3335206159bf1a0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello.

surfing the net I fou= nd this :


<= /div>
It was built for Orbis (based on FreeBSD 9) ; a very old FreeBSD = version. But I'm intrigued by the idea to update the code and make it w= ork for a recent version of FreeBSD. It would be cool to "boot a Linux= kernel directly from FreeBSD"...Any consideration ?
--
Mario.
--000000000000c3335206159bf1a0-- From nobody Tue Apr 9 00:54:40 2024 X-Original-To: freebsd-hackers@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 4VD6td1yDsz5GCMJ; Tue, 9 Apr 2024 00:54:49 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VD6td1P1zz4gvk; Tue, 9 Apr 2024 00:54:49 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712624089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=g8Z8cGkDAFLSfzeW/RqqFkALOclZQFPeAuBHnXu7Zu4=; b=q3QiwVo3ukwIgZ2KFZtTAz6TdumdZNVhaTeMW9GwL9594nb7MkUtAqhRjOFP96EptQtkmZ I3GUTJIKSzO82Vy6g/O/R3mjSNYXtvSXjFJbKq/O6p/5pB18Vm99xcyutW2HD1SnWYrbkb j5lpkUXGDWTPT1sCpZn+5gWMla3c8/Vyn1YDJ5R7c+1qncJNyjHlrketKoP+AvaoW9t+gI v9Qaxvq/T0QDzl5dxv/fBDCp54W7/Cr8Z5rVwMBE8CUiczygPV6mcHMrja0JEHVN5mKVm5 /TeBADDnDpsIsVokXEjKyj1w3LZUn4Lh8iOFZbph84lUmnKdfwalTlz2OJjadg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1712624089; a=rsa-sha256; cv=none; b=dUEgTOYaTeyOXbmdmbEp40AzLMS/UieDohmNYyt341gKM5EyMwQauHRcwlYN/NU3PWYLlt Yen4U5Bw87ysmqa31JEh8L10JzrJfI97quMjtpDpivP0xom4xQd2C/6nzWkgqm97Ax+VPS 4/S+Q6wpJQV8sStdlri5q0ZRDs4fKTAZHWi5z6EJo9t1FkGdFta9VOrfsAjRH0kyilnefO iUFXtBkHP3MxM+MYbRSzVFJ/1/ULLAL1OINLv4+Xg3uwQZeZgDvZchjqwbYiOkRk42Kv0F yqJZryoE86CEezCWcnDCrcWc/FLAbLtw9xEf9ITEGJe/1F3wNS0hSQZSg98Lhg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1712624089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=g8Z8cGkDAFLSfzeW/RqqFkALOclZQFPeAuBHnXu7Zu4=; b=mzt4ZnI4DaMzGh41nW3IohLY/T4Tb2dGHg5zwllOSohO6+3YLZJUntA9VY7eaxWFv8qjzN h0yXnjIU1HT75fdjZDGoEbCRYXejMjOCeGapwbjCU4BGH5prYCMgN1BG5hUtLDNx5xjgV7 Rx3OT07ScuUiOduJ1tf5jTm2NPnwU8RpgkLrykWRSKpVfh6DzPFxfgxFACZUqUKGZv3ZkN PPqVGGHIlLZEfeHCHxZGjVRIN/wsi8x1bW0DbBHmKveqNBO44cNvxVIRuNEFhTm7K6v19r xluiFWDZgCsIsLsIgzFBj/vo2ggkK7h9+3poo3y3Y0BBoLJsvlA19fEx7VPaXg== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VD6tc07r2zdTp; Tue, 9 Apr 2024 00:54:47 +0000 (UTC) (envelope-from zlei@FreeBSD.org) From: Zhenlei Huang Message-Id: <2C59E3CF-CF00-4E36-9DAC-5DA01C9B0B23@FreeBSD.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_604444C5-54B2-4B5A-8185-634D5E1AF1A5" List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: Implementing a kexec()-style system call for FreeBSD 14 to boot a Linux kernel directly from FreeBSD. Date: Tue, 9 Apr 2024 08:54:40 +0800 In-Reply-To: Cc: freebsd-hackers , FreeBSD Mailing List To: Mario Marietto References: X-Mailer: Apple Mail (2.3696.120.41.1.8) --Apple-Mail=_604444C5-54B2-4B5A-8185-634D5E1AF1A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Apr 9, 2024, at 4:49 AM, Mario Marietto = wrote: >=20 > Hello. >=20 > surfing the net I found this : >=20 > https://github.com/fail0verflow/ps4-kexec = >=20 > It was built for Orbis (based on FreeBSD 9) ; a very old FreeBSD = version. But I'm intrigued by the idea to update the code and make it = work for a recent version of FreeBSD. It would be cool to "boot a Linux = kernel directly from FreeBSD"...Any consideration ? Personally I do not care "boot a Linux kernel directly from FreeBSD". = I'm interested in "boot new FreeBSD kernel directly from FreeBSD". >=20 > --=20 > Mario. Best regards, Zhenlei --Apple-Mail=_604444C5-54B2-4B5A-8185-634D5E1AF1A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On Apr 9, 2024, at 4:49 AM, Mario Marietto <marietto2008@gmail.com> wrote:

Hello.

surfing the net I found this = :


It was built for Orbis = (based on FreeBSD 9) ; a very old FreeBSD version. But I'm intrigued by = the idea to update the code and make it work for a recent version of = FreeBSD. It would be cool to "boot a Linux kernel directly from = FreeBSD"...Any consideration ?

Personally I do not care "boot a Linux kernel = directly from FreeBSD". I'm interested in "boot new FreeBSD kernel = directly from FreeBSD".

--
Mario.

Best regards,
Zhenlei

= --Apple-Mail=_604444C5-54B2-4B5A-8185-634D5E1AF1A5-- From nobody Tue Apr 9 06:44:01 2024 X-Original-To: freebsd-hackers@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 4VDGdt0ckPz5GnWv for ; Tue, 9 Apr 2024 06:44:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VDGds55s8z4Fbg for ; Tue, 9 Apr 2024 06:44:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a51fd94c0bfso17065266b.2 for ; Mon, 08 Apr 2024 23:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1712645054; x=1713249854; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=K1pTS/tjh8ynp64oDkRSVO7Du6b7EljDPxyg1yGBvmI=; b=WslxXDEEbxG79PzxMHo1z1/eyZuZGyA2AKmrG5xVw65J/y+0TOuU6ramKaR8UgWhYE ZxIMdSpakFuMNeGxqtraopA8cvp5PNB5wDhMowVZ/7lg8Soa6KdLryh3duGVyAG61fYv 9r1qbKXg+NUCmaxkLdN3ZKXOkW+ZEw6Dl2hODGPn+BQhDHYRJW1/CBJ4IhXe5+/THgD9 +sGXuM4B048o1qjDE6HIqjD/rC4lk/hOTlduUTF6eIW3+a/psHgL+3t8j3xBAGbDmAlL QKdDbDiQQYB8F1J4N9/3btmDfj/Pn6+nJmSUZWyePYwkElIJCcWQm76SSpJ5zfPEXbph arJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712645054; x=1713249854; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K1pTS/tjh8ynp64oDkRSVO7Du6b7EljDPxyg1yGBvmI=; b=ftsu2xseCw6kuUeawUNzwcQ/rXGAMF4MeYiNsNmWXHf2P2o0ejLvmJjIhCipDdOOQ8 4fmW4H9MW9si05Xejfk/acIUyHZBXhhxpab5Gh04utWPCqAqXb/vlNkc5qpWL0Nk0gF7 N9KIyNgZhNhALi/6sNxYrVWML0VOBMfcXGV6BGZb0q9uKHCHrPINbNfKa5mv+p8HQRwJ eOFTrAXT1W7sfea62HQ4lBI53ww+iwda1vPrJB3HhXAOfbNwZ8gvwUj3DdpEE7Jf/4kX l+VTur9Zzxa72mQVHgrbCjxvsJPZSf/MNjKIGQAKdwJRu7r4nC2GhqzkbqR3v9zzRoFQ NAHg== X-Forwarded-Encrypted: i=1; AJvYcCXDp/ETWFFrwzkyBzskQqKoa0+DxrikWUboQyjuu/XoZI0GbnotAqMoioBmag5VDhsIhDb5FSNeQZxXZhFjvGiA7a6SHk8lFBQWZts= X-Gm-Message-State: AOJu0YyIMvkhqA1GaL28I70bSayTwcvDhjLPmfgDI+TaEtOaiKUA3kee NIU6wXQNIGI3bTeNdPMCNyAlJlt8fCbCeeFqFSO3+6AdZcq+uKg6YWCvLT75CDYA5UhUokjCrxs SC7y33MC/q8NlCNQJL9XZAyByx1hDsVV5UcVI7w== X-Google-Smtp-Source: AGHT+IHHDUFl/K1HetE0mzW5kri5N8xbsBqCNkTmJJeTt7YrfyYuarzo+UbXqGSA1CiRu+WPaYURY+GetPMaUocML/g= X-Received: by 2002:a17:907:1b17:b0:a51:da26:9062 with SMTP id mp23-20020a1709071b1700b00a51da269062mr3922756ejc.36.1712645053504; Mon, 08 Apr 2024 23:44:13 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 References: <2C59E3CF-CF00-4E36-9DAC-5DA01C9B0B23@FreeBSD.org> In-Reply-To: <2C59E3CF-CF00-4E36-9DAC-5DA01C9B0B23@FreeBSD.org> From: Warner Losh Date: Tue, 9 Apr 2024 00:44:01 -0600 Message-ID: Subject: Re: Implementing a kexec()-style system call for FreeBSD 14 to boot a Linux kernel directly from FreeBSD. To: Zhenlei Huang Cc: Mario Marietto , freebsd-hackers , FreeBSD Mailing List Content-Type: multipart/alternative; boundary="0000000000000a78850615a44093" X-Spamd-Bar: ---- 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:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VDGds55s8z4Fbg --0000000000000a78850615a44093 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Apr 8, 2024, 6:55=E2=80=AFPM Zhenlei Huang wrote= : > > > On Apr 9, 2024, at 4:49 AM, Mario Marietto wrote= : > > Hello. > > surfing the net I found this : > > https://github.com/fail0verflow/ps4-kexec > > It was built for Orbis (based on FreeBSD 9) ; a very old FreeBSD version. > But I'm intrigued by the idea to update the code and make it work for a > recent version of FreeBSD. It would be cool to "boot a Linux kernel > directly from FreeBSD"...Any consideration ? > > > Personally I do not care "boot a Linux kernel directly from FreeBSD". I'm > interested in "boot new FreeBSD kernel directly from FreeBSD" > Aarch64 is in and working in current. Amd64 is about 80% done. But you could also boot FreeBSD from FreeBSD with this... Warner > > -- > Mario. > > > Best regards, > Zhenlei > > --0000000000000a78850615a44093 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon, Apr 8, 2024, 6:55=E2=80=AFPM Zhenlei Huang <= ;zlei@freebsd.org> wrote:


On Apr = 9, 2024, at 4:49 AM, Mario Marietto <marietto2008@gmail.com> = wrote:

Hello.

= surfing the net I found this :


It was = built for Orbis (based on FreeBSD 9) ; a very old FreeBSD version. But I= 9;m intrigued by the idea to update the code and make it work for a recent = version of FreeBSD. It would be cool to "boot a Linux kernel directly = from FreeBSD"...Any consideration ?
=

Personally I do not care "boot a Linux kernel dire= ctly from FreeBSD". I'm interested in "boot new FreeBSD kerne= l directly from FreeBSD"

Aarch64 is in and working in cur= rent.=C2=A0 =C2=A0Amd64 is about 80% done.

But you could also boot FreeBSD from FreeBSD with this..= .

Warner=C2=A0

--
Mario.

Best regards,
Zhenlei

--0000000000000a78850615a44093-- From nobody Tue Apr 9 15:46:35 2024 X-Original-To: freebsd-hackers@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 4VDVgp6BZ3z5HCw8 for ; Tue, 9 Apr 2024 15:46:46 +0000 (UTC) (envelope-from rockyhotas@tilde.team) Received: from tilde.team (tilde.team [IPv6:2607:5300:60:4f58::248]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4VDVgp1CFXz4PtN for ; Tue, 9 Apr 2024 15:46:46 +0000 (UTC) (envelope-from rockyhotas@tilde.team) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tilde.team header.s=mail header.b="S8KKW/2v"; dmarc=pass (policy=reject) header.from=tilde.team; spf=pass (mx1.freebsd.org: domain of rockyhotas@tilde.team designates 2607:5300:60:4f58::248 as permitted sender) smtp.mailfrom=rockyhotas@tilde.team DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.team; s=mail; t=1712677597; bh=tKcMCNG4w00qLit1DCQixUUyxynKiQmrmQkVotw5eI0=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=S8KKW/2vXiplEXtdZwFbTnin8NmRv7VjZikfeqtfTQo/1N8yG6/wu4liAQOabKyLx zob11VMYWagedtKHIGADEU6Vk+aBx8sKpMF1ldzov+T589XQvhJ/QXqx3AjcFDSFYG 9LNDRVZsY/i4h5IHtrK5SgOxl54tYhiu6zS8iIac= Received: from localhost (mob-5-91-202-29.net.vodafone.it [5.91.202.29]) by tilde.team (Postfix) with ESMTPSA id D5D334C0383; Tue, 9 Apr 2024 15:46:36 +0000 (UTC) Date: Tue, 9 Apr 2024 17:46:35 +0200 From: Rocky Hotas To: freebsd-hackers@freebsd.org Cc: Warner Losh Subject: Re: Re: Re: Kernel module: return a number from a device Message-ID: Reply-To: Rocky Hotas References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.44 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[tilde.team,reject]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[tilde.team:s=mail]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; NEURAL_HAM_SHORT(-0.04)[-0.041]; TO_DN_SOME(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16276, ipnet:2607:5300::/32, country:FR]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[rockyhotas@tilde.team]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; DKIM_TRACE(0.00)[tilde.team:+]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 4VDVgp1CFXz4PtN On apr 06 22:21, Warner Losh wrote: > > running means there's a tight loop somewhere... uiomove doesn't do that. It > is a bunch of ifs that go to a copyout. Arc4random shouldn't either. I'd > add printf to see where. Using some uprintf along the code of rolld_read, I confirm that there's a loop involving cat. [...] > This should produce an infinite number of chars... maybe it is and d_size > is 1 and they are all NULs. Try cat -v. Yes: there was an infinite number of chars, but they were non-printable, so invisibile, because they are the raw values 0, 1, 2, 3, 4 or 5 resulting from `random_item % d_size'. Only `cat -v' could show them. The infinite `cat' output is provoked by the `1' value provided as second parameter of `uiomove(&random_out, 1, uio)' without any other comparison involving uio_offset, so never signaling the end of "file", as mentioned by Dag-Erling. Thank you! Rocky From nobody Tue Apr 9 15:56:52 2024 X-Original-To: freebsd-hackers@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 4VDVvl1L2Jz5HDZt for ; Tue, 9 Apr 2024 15:57:07 +0000 (UTC) (envelope-from greg@freebsdfoundation.org) Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VDVvk3kMWz4RT8 for ; Tue, 9 Apr 2024 15:57:06 +0000 (UTC) (envelope-from greg@freebsdfoundation.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=freebsdfoundation.org header.s=gfnp-20170908 header.b=YannsSr2; dmarc=pass (policy=none) header.from=freebsdfoundation.org; spf=pass (mx1.freebsd.org: domain of greg@freebsdfoundation.org designates 2607:f8b0:4864:20::530 as permitted sender) smtp.mailfrom=greg@freebsdfoundation.org Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-53fa455cd94so4457366a12.2 for ; Tue, 09 Apr 2024 08:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsdfoundation.org; s=gfnp-20170908; t=1712678223; x=1713283023; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=tNRtAcBQl/hypyhNqhc1cmDUPqZHZsG6M42E5DkBQ7U=; b=YannsSr2tMFGeUwWOwUqPOa/LcFcevaCckauzJD589oA7aG5AAw6pSCRJiZXm+uiey dh9jMnebWgJFvnCR5Kic3WSOBEWR2Cuj/BYz2nnYcDF8Wpr4iP5zQ7Xb8Kz1dQ6KjNrG gXhx5n7Ajif13HA5KOaPiQOOT4i8YJAk/WFOkvxBLa8/xiE5bET/iCZn18BWvProxJtA nf7x16yT1Xl+hJ67eh5k0/u2UW9go+xsQOhyyUQbM1eAWkoxBJgO3RIjVYIunvcGlKD3 2n967uLIHWeu1Lrt4xT2cRgY95p8YQVg7Yy3N2jLOfB7YfQY9bIum+Lw062cW8O+KifV 2sKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712678223; x=1713283023; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=tNRtAcBQl/hypyhNqhc1cmDUPqZHZsG6M42E5DkBQ7U=; b=kAwnsXBrD020ZrQOuHY2aqE07y2TTnIvTEHGoSBvV/hI3oyU1e2mbJY9C/cot7T9Pw INGAXg8MtG22wDPQnT2sHVG3bpMJSjJppvrK3QRPa0CBHPE+nKFwOQNXyn6+pvKt4cM3 A/NLcYebM42SvBFrp/iM/fdkTnO1EMzilkoRL4UcPvU7NKMVHBY9X4/mctfuSyMaDDES n7ssVg+iSdDbQ1AL61inYOlDTFM0ZWI+afJgJNl+aLhWUqi+cIUuKhSwaIODLMzu1bMR vQg85zR11K296W5dty9lvvIvkcXfvXefXgi9A9gmFAeu38m6s7wEpwFAXP3muPX7oR+5 gAeA== X-Gm-Message-State: AOJu0YwzWpnh1arb8RwAiz9HDu6mIJ9MP21cOOzXgLneIeBYYfmeA6gt BO8qpy66rFcHza0Nmp2tIBqLt6mzVzSlcT6EwBlMfgObnUxUzt65TKWMxRWxLKs7ULr4JnO9P0H YR6TMzqCkNUy3tu8fNiXH6Yx9gmJdRk+eOVBBjfsS/3j+gkY7cn5OXA== X-Google-Smtp-Source: AGHT+IEV4Ty23B6aAClRWxeIEJcQgEQtgqm/qxjSmMMX7OW1ev3m1x4VZDxQZou8HOZFM2L2Y5Kssesf6ELg35qjyrs= X-Received: by 2002:a17:90a:4b44:b0:2a4:833f:2c1b with SMTP id o4-20020a17090a4b4400b002a4833f2c1bmr50319pjl.9.1712678223459; Tue, 09 Apr 2024 08:57:03 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 From: Greg Wallace Date: Tue, 9 Apr 2024 11:56:52 -0400 Message-ID: Subject: FreeBSD hardware support To: freebsd-hackers@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001fd8c60615abf922" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.80 / 15.00]; URI_COUNT_ODD(1.00)[13]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[freebsdfoundation.org,none]; NEURAL_SPAM_SHORT(0.20)[0.205]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; R_DKIM_ALLOW(-0.20)[freebsdfoundation.org:s=gfnp-20170908]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MISSING_XM_UA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::530:from]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[freebsdfoundation.org:+] X-Rspamd-Queue-Id: 4VDVvk3kMWz4RT8 --0000000000001fd8c60615abf922 Content-Type: text/plain; charset="UTF-8" Hi everyone, Something that we hear from users is that it's not always easy to determine which hardware makers provide good FreeBSD support. An initial step to improving this situation is to gather the community's collective experience with hardware and publish a guide with aggregated, anonymous results. That's the idea with this survey: https://forms.gle/Es7Lwu4xYGde74dJ7 (Note that the survey asks for your email only in the event we have follow-up questions). Please take a few minutes to complete the survey and share it wherever you think is appropriate. Here's a bit of text you can use if you wish to share it with others: The FreeBSD Foundation is running a hardware support survey in order to help FreeBSD users more easily identify hardware that provides good FreeBSD support. If you have experience that will help, please complete the survey: https://forms.gle/Es7Lwu4xYGde74dJ7 If you have ideas on this topic outside the survey, I would love to hear from you. Note that others have brought up https://bsd-hardware.info/ which is a valuable list, however it may be incomplete since many FreeBSD users are unable to add the probe to their systems. Thank you! -- Greg Wallace Director of Partnerships & Research M +1 919-247-3165 Schedule a meeting Get your FreeBSD Gear --0000000000001fd8c60615abf922 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi everyone,
<= font face=3D"arial, sans-serif">
Something that we hear from users is that it's not always e= asy to determine which hardware makers provide good FreeBSD support.=C2=A0<= /font>

An initial step to improving this situation i= s to gather the community's collective experience with hardware and pub= lish a guide with aggregated,=C2=A0anonymous results.

That's the idea with this survey:=C2=A0https://forms.gle/Es7Lwu4xYGde74= dJ7
(Note that the su= rvey asks for your email only in the event we have follow-up questions).=C2= =A0

Please= take a few minutes to complete the survey and share it wherever you think = is appropriate.=C2=A0=C2=A0

Here's a bit = of text you can use if you wish to share it with others:

The FreeBSD Foundation is running a hard= ware support survey in order to help FreeBSD users more easily identify har= dware that provides good FreeBSD support. If you have experience that will = help, please complete the survey:=C2=A0
https://forms.gle/Es7Lwu4xYGde74dJ7

If you have ideas on this topic outside the survey, I would love to hear= from you.

Note that others have brought up= =C2=A0https://bsd-hardware.in= fo/ which is a valuable list, however it may be incomplete=C2=A0since m= any FreeBSD users are unable to add the probe to their systems.
<= font face=3D"arial, sans-serif">
Thank you!

--
Greg Wallace
Director o= f Partnerships & Research
M +1 919-247-3165
--0000000000001fd8c60615abf922-- From nobody Tue Apr 9 16:11:34 2024 X-Original-To: freebsd-hackers@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 4VDWDb2ZNLz5HFmy for ; Tue, 9 Apr 2024 16:11:43 +0000 (UTC) (envelope-from rockyhotas@tilde.team) Received: from tilde.team (tilde.team [198.50.210.248]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4VDWDZ4wMTz4VmZ for ; Tue, 9 Apr 2024 16:11:42 +0000 (UTC) (envelope-from rockyhotas@tilde.team) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=tilde.team header.s=mail header.b=uvPbfqYF; dmarc=pass (policy=reject) header.from=tilde.team; spf=pass (mx1.freebsd.org: domain of rockyhotas@tilde.team designates 198.50.210.248 as permitted sender) smtp.mailfrom=rockyhotas@tilde.team DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tilde.team; s=mail; t=1712679096; bh=fej+fZjxuhxtjS2aAQjLjul4PKrMfz6U5uyfAI3INR4=; h=Date:From:To:Subject:Reply-To:References:In-Reply-To:From; b=uvPbfqYF2q06wWlXwxJdImI12+Ue3FNyV6WhtWpniUChxIAFvPo+T2mSUec/+oNxE TLwa8VZxsjaqndOFC1ZABoaDMGEva1TcU+MFHILfyJhBTXufPt71ktCyKIWn6MIbgc DCE/Emuclg8RYB+smwnXqSQ1XQGeCmp1TjqCppNg= Received: from localhost (mob-5-91-202-29.net.vodafone.it [5.91.202.29]) by tilde.team (Postfix) with ESMTPSA id C02914C0CAF for ; Tue, 9 Apr 2024 16:11:35 +0000 (UTC) Date: Tue, 9 Apr 2024 18:11:34 +0200 From: Rocky Hotas To: freebsd-hackers@freebsd.org Subject: Re: Re: Kernel module: return a number from a device Message-ID: Reply-To: Rocky Hotas References: <86r0fh5twn.fsf@ltc.des.dev> List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86r0fh5twn.fsf@ltc.des.dev> X-Spamd-Bar: - X-Spamd-Result: default: False [-1.89 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.51)[0.511]; DMARC_POLICY_ALLOW(-0.50)[tilde.team,reject]; MID_RHS_NOT_FQDN(0.50)[]; R_SPF_ALLOW(-0.20)[+mx:c]; R_DKIM_ALLOW(-0.20)[tilde.team:s=mail]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[tilde.team:+]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; ASN(0.00)[asn:16276, ipnet:198.50.128.0/17, country:FR]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[rockyhotas@tilde.team]; REPLYTO_EQ_FROM(0.00)[] X-Rspamd-Queue-Id: 4VDWDZ4wMTz4VmZ On apr 07 12:50, Dag-Erling Smørgrav wrote: [...] > > Furthermore, this won't only return one byte; rather, it will return one > byte _at a time_, very inefficiently. This is why cat appears to hang. > To truly only return one byte, you need to look at uio->uio_offset and > return 0 without calling uiomove(), signaling EOF, if it is non-zero. > > In summary, you should write rolld_read() as: > > uint8_t roll = arc4random() % d_size; > if (uio->uio_offset > 0) > return (0); > return (uiomove(&roll, 1, uio)); A massive thank you for all your suggestions, which were very clarifying about the way `uio' data can be used. > You can also use uiomove_frombuf(), which will take care of that check > for you. It's a bit overkill when you're only writing a single byte, > but if you wanted to output text instead of binary, you could use this: > > char roll[2]; > roll[0] = '0' + arc4random() % d_size; > roll[1] = '\n'; > return (uiomove_frombuf(roll, sizeof(roll), uio)); Yes, I guess this is probably the most efficient way to perform this operation. If anyone moving the first steps into this topic and into uio(9) is interested, here are: 1) a repository with three versions of this same module: 2) a blog post with some comments about them: Rocky From nobody Fri Apr 12 17:45:10 2024 X-Original-To: freebsd-hackers@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 4VGP9F4Kb6z5HnlN; Fri, 12 Apr 2024 17:45:21 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VGP9D0MWwz49TX; Fri, 12 Apr 2024 17:45:19 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=margiolis.net header.s=mail header.b=J0SMUY05; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none); spf=softfail (mx1.freebsd.org: 95.179.159.8 is neither permitted nor denied by domain of christos@freebsd.org) smtp.mailfrom=christos@freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=mail; bh=mq/TEy7usEq9Kyo YFzduUMzaFPwbdU+pHuJFAfEvosU=; h=subject:cc:to:from:date; d=margiolis.net; b=J0SMUY053++8o1ola5bkpohs/Fvzx3ssyj81oazAe0TkJplfncK MII+QhlHvOrTydp+rwb2zX2lL20WRqKDtdZ9Zac/OPOjkALk8Ygh/XzSaRWg+UqO1ZMf7R MAT60ds+ARqQ0kHxfiXxCEBG5tuSZlJlxwOpeaRsO7TCOWTktA= Received: from tpad (ip-45-81-121-44.ask4internet.com [45.81.121.44]) by margiolis.net (OpenSMTPD) with ESMTPSA id 0b23b8cd (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 12 Apr 2024 17:45:11 +0000 (UTC) Date: Fri, 12 Apr 2024 19:45:10 +0200 From: Christos Margiolis To: freebsd-multimedia@freebsd.org Cc: freebsd-hackers@freebsd.org, jrm@freebsd.org, markj@freebsd.org, bapt@freebsd.org, dev@submerge.ch, emaste@freebsd.org, meka@tilda.center Subject: Call-for-testing: Asynchronous audio device detach Message-ID: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.69 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[margiolis.net:s=mail]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, DKIM not aligned (relaxed),none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEFALL_USER(0.00)[christos]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_SEVEN(0.00)[8]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-multimedia@freebsd.org,freebsd-hackers@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_NONE(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; DKIM_TRACE(0.00)[margiolis.net:+] X-Rspamd-Queue-Id: 4VGP9D0MWwz49TX Hello, Yesterday I committed a patch [1] which adds support for asynchronous device detach for audio devices, something that many people with detachable audio devices (e.g USB) have been asking for for years [2][3][4][5][6][many more...]. I would like to ask you to give it a try and let me know if everything works properly. Note that this patch depends on dc831e93bad6 [7], so make sure to apply this one as well. Christos [1] https://cgit.freebsd.org/src/commit/?id=44e128fe9d92c1a544b801cb56e907a66ef34691 [2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194727 [3] https://forums.freebsd.org/threads/not-entering-sleep-state-due-to-audio.82597/ [4] https://forums.freebsd.org/threads/forcing-off-the-computer-endlessly-waiting-for-sound-application-to-exit-at-sleep-suspend-time.80412/ [5] https://www.davidschlachter.com/misc/freebsd-usb-audio [6] https://randomnixfix.wordpress.com/2021/10/23/why-the-freebsd-desktop-and-my-linux-rant/ [7] https://cgit.freebsd.org/src/commit/?id=e8c0d15a64fadb4a330f2da7244becaac161bb70 From nobody Sun Apr 14 23:43:15 2024 X-Original-To: freebsd-hackers@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 4VHn1S01X1z5HJrB for ; Sun, 14 Apr 2024 23:43:24 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VHn1Q6hTmz41fG for ; Sun, 14 Apr 2024 23:43:22 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Kcw+w2BC; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7d95f2a2dfaso38823739f.0 for ; Sun, 14 Apr 2024 16:43:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; t=1713138200; x=1713743000; darn=freebsd.org; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=jn5W9cbDVSZzHz2fE7jLzGxj77/+k3BoenK4s7xKXmo=; b=Kcw+w2BCGhNsOXdQgT065NrePQrSpsYvBX1/RpQBAzhv1id88xA7IOw7ufqJB4DoKi METJn/87PhDcN8tzk4QLW7v0jMxUCiJcQi9kQyyVDcr1lmnyw7SmeX0GRthPKTsJ/XXu 8s9T/9+YQ9ZWiNJ/85iRZ1h25uVa37aLHSE1Ae8Ej6rDHIAfijr18oV2RF36WFyvLpiz N7SvUam+hdvCAD7wmvm680T3mIN2/6w12BmN2A4e9rmqkcUJCzDPc5xHfxfGQHNgTVe7 i9MoOoE6hnI4Az6Wc41lkXoynh+5i/Sxtw9JK/+i4srcfRtcjrTjQpf2VWW/4w5SBdD5 PgQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713138200; x=1713743000; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jn5W9cbDVSZzHz2fE7jLzGxj77/+k3BoenK4s7xKXmo=; b=c2AhTUfeyLnfx7fYvTxT3vCL56zwJy4Y+H6YyPx0XHIOczBJIH/Y0mHFiAVpUp20TS N5684IMwC0Fcs9qpmfyklVw0h3YXtVu/uJ+xIPz+F41iSICUXU7FlG7N9P8vJj8IRPFI Wneer0jco1FSK0Oo5kZkpVji1kSerm3k8yp2FTJBSG1v3gVheb+7afOaRlLphiQBSGaa HEs8gu17AURXq1KkBQZE5B/bkufepkMDtSl/CRyiZMxxNOLe7BJncgh/AC9MWLEgQn7i PTXA/UYtuK1VvPbehrEI/7Bm9sQPKI82WpxsaR39d+elsiEkr1zGWANbxxLsg/YYqkyG Vy3w== X-Gm-Message-State: AOJu0Yz3MZjmxN50ldzVim/ijRDtAG3wZYg7rgdvK0C05nktZRnTYW18 ux9M7x+ZL1AbND+aofn1dMe+ODWqB8liQVAng0gJVfFk5kUN49MurQyFgWdrzsrmBi0udFQmUw7 kCtiO47OAt9LNq/HC0RJHBnUmB7PxRdjZyXCQhTQv6ODYnQwdbHE9hjMPYfvk9abbI/sYr+qqnW NkNQ61TAjy7KvWFLVJ/QlCKlIldJinhJ76851Pan++yU+iPE5A0uz6 X-Google-Smtp-Source: AGHT+IHPO3AxeVVo1NMuVwXE+tg0cF7D43/HWfe0JX4pjfnSlsFG7akJ6f3VD5uGka2k9Pb3yzO6LQ== X-Received: by 2002:a05:6602:341c:b0:7d9:63c2:5059 with SMTP id n28-20020a056602341c00b007d963c25059mr2858939ioz.4.1713138200066; Sun, 14 Apr 2024 16:43:20 -0700 (PDT) Received: from mutt-hbsd ([184.99.37.29]) by smtp.gmail.com with ESMTPSA id y17-20020a056602165100b007d5bcafde90sm2439381iow.3.2024.04.14.16.43.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 16:43:19 -0700 (PDT) Date: Sun, 14 Apr 2024 23:43:15 +0000 From: Shawn Webb To: freebsd-hackers@freebsd.org Subject: Question regarding crunchgen(1) binaries Message-ID: X-Operating-System: FreeBSD mutt-hbsd 15.0-CURRENT-HBSD FreeBSD 15.0-CURRENT-HBSD X-PGP-Key: https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/blob/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mz2p6heg5z522xk2" Content-Disposition: inline X-Spamd-Bar: ----- X-Spamd-Result: default: False [-5.10 / 15.00]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[hardenedbsd.org]; FROM_HAS_DN(0.00)[]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2b:from]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+] X-Rspamd-Queue-Id: 4VHn1Q6hTmz41fG --mz2p6heg5z522xk2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey FreeBSD Hackers, Note: I originally posted this to the HardenedBSD users mailing list. I'm posting to freebsd-hackers@ to hopefully learn from a wider audience. I wanted to ping the HardenedBSD community, asking about the usefulness of crunchgen(1)-built applications in 2024. =46rom the crunchgen(1) manual page: > The main reason to crunch programs together is for fitting as many > programs as possible onto an installation or system recovery floppy. The binaries in /rescue are built with crunchgen. It seems that crunchgen-built applications are not (currently) compatible with a libc built with LTO due to the recent CSU and libc changes. The size of the binaries in /rescue on HardenedBSD 15-CURRENT/amd64 are 17MB in size. That application size alone makes it impossible to build a "system recovery floppy". Additionally, floppy drives aren't all too common on the amd64, arm64, and riscv64 systems HardenedBSD targets. Control Flow Integrity (CFI) is a compiler-based exploit mitigation that we apply to applications in HardenedBSD 15-CURRENT and 14-STABLE. In order to apply CFI to applications, application code must be built with Link Time Optimization (LTO). Over the past few years, I've slowly been working on applying CFI to shared objects (aka, Cross-DSO CFI). This requires building library code with LTO as well. It seems that with the recent changes to the CSU and libc, the crunchgen(1) built tool does not produce workable applications when libc is built with LTO. With libc having such a huge surface area, it would be prudent to apply Cross-DSO CFI to it. This presents two possible solutions: 1. Enhance crunchgen(1) to support libc built with LTO. 2. Kick crunchgen(1) to the curb. 3. Other ideas from the community are possible. Does anyone find crunchgen(1) to be truly useful in 2024? If we kick crunchgen(1) to the curb, we need to modify the build system for /rescue binaries. My own preference would indeed to rid ourselves of crunchgen(1) so that we can progress towards applying Cross-DSO CFI and LTO to libc. Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50 https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A= 4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --mz2p6heg5z522xk2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmYcahMACgkQ/y5nonf4 4fqc+g/7BAKhiQUJKcZj5shig7v7qKfxn9n2IDXm7M0DeqYm6krfLqm1DcWa5E4W ASJKmU5SlhXg8T77npF2b5Pwsbge3lTriRknakDEZg3mi7EXHSMgf2aLRuQZ6uAp RAbJtx9jb4hlvHE0ZXiQ1aUf5ZwGkGvWFCvBc9+yJh3vWjSHEJ8Z5fK8/5MPk0Pa +LgbtrNBaA54iVjBP8X29I6WA/uZoKMtieYYpn8q6e6vj2OuzYt5HxIPAIy2TmAw o0Awa1kEVCrA8TQWf0hXZHqAU73lOAZK1D7MGERfk4ODFH5EykLw7vSwNLz78/Qs aSNcYHTSPLrN+s6KA3RXAibbqLqEbNYwkrJ94jasAHxi0BY7iyI6oFdHXIABk9Ov WNhPDZDoqFwLJ+OAySZechajEkfE8d9+riie63iDkWjSW7AOX5xu9rQqOeAVUmiR SSXcTNQKzFjHtm6hoAxHbRoQe5S7SO0ddh43HDE+9IesLRKeyfr3zJmZk7UzA1+0 HplsuuL7nBXqxKgOkj8n8AOYmG/vJyyZPzIXJuBGDSkzeqvHfzZcc7F9c8j6JUEh RZSYFkjoQOfqV9kfMPyL+XP7xyT8jEWgp0hcAYBtk7jOkfDUJTTDcZL0t3WQrYfH 0bEEBxwpk6ST90EdknD+CPR9fdL0iNBO7hfF5AvXA9vPsi1aGjs= =mz3z -----END PGP SIGNATURE----- --mz2p6heg5z522xk2--