From nobody Sat Jun 3 21:10:19 2023 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 4QYXZg4Qg5z4YZPx; Sat, 3 Jun 2023 21:10:19 +0000 (UTC) (envelope-from git@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 4QYXZg3jVxz47kp; Sat, 3 Jun 2023 21:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685826619; 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; bh=aYeV7rC6xEqASzIivU6akFI1r3MuERM0lHHym/6cMiM=; b=fE6RL1LLPVNiQx66/WCRNb8VWR4SLTphAGzJBjmunB0G63cVUv8qnDomvP25CLQgW2y0nS W64We6fqkZQbL423FT3i6mlj0aWPoaUMh55lZ0MYoeguoj16Taulg+PqFu5aWCaMsdKULg UqfN4oj30MdiuCCqqzwDPG2njfbF0PJjmrT/jLNX/AN5u2BnbV4p3w4h/9vGCdeq0DBzAc W4U6m7tbqADEy2S98kQUhaICtr1xDrGbVfu0X6HtRUqhSy+NSub/ujDFslAzgp71A5WgfK wiKVgc3X8s1KNrQQN+Wre7qf2r/+EDLWgbYHnIdvWttHt4BrNiZNkZkGbsVKpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685826619; 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; bh=aYeV7rC6xEqASzIivU6akFI1r3MuERM0lHHym/6cMiM=; b=B2rw5LRA0QqP08CNf+JndhVYjnRJy3tS2e7KzmhacNnCcBTylKrgdubGU/1YFiEGX+OJLB V7/6Z+mRQ5OwFPshB2mvLrFXI4LJ7BvSj1wyVxmDAxxohodxMEyi2ILbtdqnqKBc4vuQnF qWDBsa/zPFlY45TXZSIj0sTdrj+uEj0Hi+t689/q7qyYp7NwlvTrMTIzLUbEPUtijokC1d aiY/KElTped1OQdNUIsyuvnrr7cDwi/hTRSjhKhXW2MbrKT6EiOelFzwifZDVtrUhtzPQh eC7KbApoRoro4wIZ9WhNHdJNPL8o3yGY9761WFeoj/6sXSUMFdWnSqfpYQYfUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685826619; a=rsa-sha256; cv=none; b=L1UgqTbSWzW5tQKpmJBMcz6AzbaNhp5NIGxnB8ymf5HHw38WBrQoWLv4XT1ycXa7H6Wfin lwoZiMURLwNZO5KM8+XEe3RPolxmXL7aKunDNUhE5Lqo67KjEl4iVM1VrKJ3UbRlsBMwt3 xa6CWwsep72XS3J8wjbeslVGoW56T4C2Cb9YTzf7bOEKmBB2AOnwNPLZ0y/u6Q6hJTjp9Q 5caTHVsSYqjLpVLnmUFdTpOb2pC+uwiSgVJ/eq29A0SnaJH0HgfDzugVTTTVH2UII/f95q PaO2TFXD5IQ2YCBzJJcGAZdYBZLmI4oXnc223oBG7q2rOl1+MNYBBXWAgr+L0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QYXZg2lh5zgBj; Sat, 3 Jun 2023 21:10:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 353LAJsZ026290; Sat, 3 Jun 2023 21:10:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 353LAJjo026289; Sat, 3 Jun 2023 21:10:19 GMT (envelope-from git) Date: Sat, 3 Jun 2023 21:10:19 GMT Message-Id: <202306032110.353LAJjo026289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: fa6fa98ac712 - main - sh(1): initialize smark to zero in main() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa6fa98ac712e48fe8e9bca1295b1c54cf744724 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=fa6fa98ac712e48fe8e9bca1295b1c54cf744724 commit fa6fa98ac712e48fe8e9bca1295b1c54cf744724 Author: Daniel Kolesa AuthorDate: 2023-06-03 21:08:56 +0000 Commit: Baptiste Daroussin CommitDate: 2023-06-03 21:09:31 +0000 sh(1): initialize smark to zero in main() As popstackmark may be called on this without pushstackmark having been called, we need to initialize it so that we don't get a bogus comparison inside popstackmark, which would have resulted in a NULL pointer dereference. MFC After: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D40413 --- bin/sh/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/main.c b/bin/sh/main.c index bc87440807b2..a77f9528064d 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -100,7 +100,7 @@ static char *find_dot_file(char *); int main(int argc, char *argv[]) { - struct stackmark smark, smark2; + struct stackmark smark = {0}, smark2; volatile int state; char *shinit; From nobody Sun Jun 4 00:46:25 2023 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 4QYdN167HNz4ZJts; Sun, 4 Jun 2023 00:46:25 +0000 (UTC) (envelope-from git@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 4QYdN154rJz3KMl; Sun, 4 Jun 2023 00:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685839585; 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; bh=2Doa2M+3KMSMyx9FDan6WJh6lcD3rLUJN2e9IE6pB3A=; b=ZGCBI4hqooFkoOHLOVR/HD2+7shw4pz7Nq6z2ksJ9i4PThrkLPRpaYRJTYEN9DqbDDlsfC PC/LGUTxHAW9of/U5U1UUcoyuxn0ZHb6niqbe1X0QRA0kgUZv3CwF57JXhhcYoyjsYMf+v 9qVm67KxcIcMhG4fPH6QQk+JyMt1nUbL5zHcFN61GkNM5TWqwEMR1HwoEV2/uLzELWbadi xxlYSwWmNZUITn1Z0mjdWQ/udaSMiWia6tbUD5GylGvMowQBPy1R+qvmQQsPMN82MgUfe/ J54ZgXOE7dcluSEFKqmkM8ybvI6u5EeoLXWNSGFEQ7WYGCMQOmNGahRZfx6oVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685839585; 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; bh=2Doa2M+3KMSMyx9FDan6WJh6lcD3rLUJN2e9IE6pB3A=; b=WOp0NlnAndQJIzdugAbxc4XJlzT4rPmVfyt+OsaFdVouLdu8WNK+TMC3i6DZUNEVVK4cMY BMylUR+3XXCGZ5QCJQnsu2Q6Iyc8czO/u3UG979OuseMbjZgq1ycI0GGR/MljozrQPzAkU nsnUzCalwUZ5WT2JwWgSUIdILxvKEoozf5zWD4MkLga4uxYttuAP68mXhiftDsosr1q7vN zKiiH5WyG6tkbr90pWJS3zkzLYm07r9L9jxB437+fTZ9hqyPnrf/FI3dTt5PLT7kkrfvBt EFStkHvH2dcETKzhcqIsXZmflLgKAEe55kr/4VecI9w1/XIfA8X1bKra2DEsWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685839585; a=rsa-sha256; cv=none; b=n/aEsHLVOyWMJEXqiB2pvQn6oB7ohbOQfMqqVv/RLIQMrHFpi5hE6BWA8P2S0OAfn6+nSU 4+8m1efEdLfxyjalLjaZYwoe2WlxwfTdE5fyhrLwcHA726P6pV3jCS7skNglrx4brYPL+X 9utoH2HVxXMzA4Npdaj+rrtoe96qHW206thYkQoSPGs/Z2lEzPSI3L+BA17IyONfai/oPU YOYwmb2pczAEJXN3dU1svP+12eYFUBI7Y7OLB/3OUvNT1guTCj3TbCLaQ2ZR+NnAgB7EOK G6oCcM4Y2aeW3RVE95KnUVGLmjixJh0RzebWPD2/qD6haiBn6Q+6cFtL384esg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QYdN1400rzmmk; Sun, 4 Jun 2023 00:46:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3540kPwG077838; Sun, 4 Jun 2023 00:46:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3540kPit077837; Sun, 4 Jun 2023 00:46:25 GMT (envelope-from git) Date: Sun, 4 Jun 2023 00:46:25 GMT Message-Id: <202306040046.3540kPit077837@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: 097db30a8e03 - main - jail: Allow nested jail definitions. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 097db30a8e0310ac28075787fb92ea40dad8b27b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=097db30a8e0310ac28075787fb92ea40dad8b27b commit 097db30a8e0310ac28075787fb92ea40dad8b27b Author: Jamie Gritton AuthorDate: 2023-06-04 00:45:54 +0000 Commit: Jamie Gritton CommitDate: 2023-06-04 00:45:54 +0000 jail: Allow nested jail definitions. Make the jail.conf specification recursive, with jail definitions allowed within a jail's parameter list, just as they are allowed at the top level. Such inner jails are part of the outer jail's hierarchy, as if they were specified with hierarchical names. --- usr.sbin/jail/jailp.h | 1 + usr.sbin/jail/jailparse.y | 65 +++++++++++++++++++++++++---------------------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/usr.sbin/jail/jailp.h b/usr.sbin/jail/jailp.h index 00865185fbd1..0325c2a101a4 100644 --- a/usr.sbin/jail/jailp.h +++ b/usr.sbin/jail/jailp.h @@ -176,6 +176,7 @@ struct cfjail { struct cfparams params; struct cfdepends dep[2]; struct cfjails *queue; + struct cfjail *cfparent; struct cfparam *intparams[IP_NPARAM]; struct cfstring *comstring; struct jailparam *jp; diff --git a/usr.sbin/jail/jailparse.y b/usr.sbin/jail/jailparse.y index 9426444f0d09..44e2aacb457e 100644 --- a/usr.sbin/jail/jailparse.y +++ b/usr.sbin/jail/jailparse.y @@ -38,11 +38,12 @@ __FBSDID("$FreeBSD$"); #ifdef DEBUG #define YYDEBUG 1 #endif + +static struct cfjail *current_jail; +static struct cfjail *global_jail; %} %union { - struct cfjail *j; - struct cfparams *pp; struct cfparam *p; struct cfstrings *ss; struct cfstring *s; @@ -52,8 +53,6 @@ __FBSDID("$FreeBSD$"); %token PLEQ %token STR STR1 VAR VAR1 -%type jail -%type param_l %type

param name %type value %type string @@ -61,46 +60,54 @@ __FBSDID("$FreeBSD$"); %% /* - * A config file is a series of jails (containing parameters) and jail-less - * parameters which really belong to a global pseudo-jail. + * A config file is a list of jails and parameters. Parameters are + * added to the current jail, otherwise to a global pesudo-jail. */ conf : - ; | conf jail - ; | conf param ';' { - struct cfjail *j; + struct cfjail *j = current_jail; - j = TAILQ_LAST(&cfjails, cfjails); - if (!j || strcmp(j->name, "*")) { - j = add_jail(); - j->name = estrdup("*"); + if (j == NULL) { + if (global_jail == NULL) { + global_jail = add_jail(); + global_jail->name = estrdup("*"); + } + j = global_jail; } TAILQ_INSERT_TAIL(&j->params, $2, tq); } | conf ';' + ; -jail : STR '{' param_l '}' +jail : jail_name '{' conf '}' { - $$ = add_jail(); - $$->name = $1; - TAILQ_CONCAT(&$$->params, $3, tq); - free($3); + current_jail = current_jail->cfparent; } ; -param_l : - { - $$ = emalloc(sizeof(struct cfparams)); - TAILQ_INIT($$); - } - | param_l param ';' - { - $$ = $1; - TAILQ_INSERT_TAIL($$, $2, tq); +jail_name : STR + { + struct cfjail *j = add_jail(); + + if (current_jail == NULL) + j->name = $1; + else { + /* + * A nested jail definition becomes + * a hierarchically-named sub-jail. + */ + size_t parentlen = strlen(current_jail->name); + j->name = emalloc(parentlen + strlen($1) + 2); + strcpy(j->name, current_jail->name); + j->name[parentlen++] = '.'; + strcpy(j->name + parentlen, $1); + free($1); + } + j->cfparent = current_jail; + current_jail = j; } - | param_l ';' ; /* @@ -131,8 +138,6 @@ param : name free($2); } | error - { - } ; /* From nobody Sun Jun 4 00:54:22 2023 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 4QYdYH2kxPz4ZKQf; Sun, 4 Jun 2023 00:54:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QYdYG3tqMz3KkV; Sun, 4 Jun 2023 00:54:26 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id 5TVcqmR3nLAoI5c0nqWKFQ; Sun, 04 Jun 2023 00:54:25 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id 5c0lqs1xOyAOe5c0mqTagM; Sun, 04 Jun 2023 00:54:25 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=647be0c1 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=of4jigFt-DYA:10 a=D3aUqHbKAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=ENfAQvD6Ca9huj4GcSgA:9 a=QEXdDO2ut3YA:10 a=cMCrhCMO5xpCME3_Hjt_:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 26E9A60E0; Sat, 3 Jun 2023 17:54:23 -0700 (PDT) Received: from slippy (localhost [IPv6:::1]) by slippy.cwsent.com (Postfix) with ESMTP id DF19717C; Sat, 3 Jun 2023 17:54:22 -0700 (PDT) Date: Sat, 3 Jun 2023 17:54:22 -0700 From: Cy Schubert To: Eric van Gyzen Cc: Gleb Smirnoff , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fe590ffe40f4 - main - Import vixie cron 4.0 Message-ID: <20230603175422.7d1c1fcb@slippy> In-Reply-To: <63EC8D2A-EA0A-48CD-B86C-011D848A2389@vangyzen.net> References: <202306011914.351JEPUd080685@gitrepo.freebsd.org> <63EC8D2A-EA0A-48CD-B86C-011D848A2389@vangyzen.net> Organization: KOMQUATS X-Mailer: Claws Mail 3.19.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.0) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CMAE-Envelope: MS4xfFbpcvQOBuZjdpd8jo2WqZMCtOuXX78tfVcTMAmHzkfZdSYX4XcO5eJw7laXKGnOLpqCb4eMxrxvZ/6eh3EqDUyAYIwnU2b1NKviYR5OFQB3C12t+t/B ttoVQeVaufbm94lNzTNSnD2WzKSFNPDHavom+4yTx7x7iqqIKf0o97GsMrqo0IryUWNoH5A9xoa6dK469ThLuzu7xSWdpBtQIAcQH6xEPR0hdlvQ9//7rms8 J5S7yI9cdDkvOdT4R/T5Mw9f6L5JN1S0rft6jeqdnPm9pkrYCbSLLy1ZVQ9CBICjt0NHBt0HuH2NM2a1LZZSDZCRhzjuEArh91FZSvyvynmPZw01I1+6OkfY paT3q30C X-Rspamd-Queue-Id: 4QYdYG3tqMz3KkV X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Sat, 3 Jun 2023 13:21:09 -0500 Eric van Gyzen wrote: > On Jun 2, 2023, at 11:08 AM, Gleb Smirnoff wrote: > >=20 > > Given that now source of truth is in git, it could be a good idea > > to seed usr.bin/cron as a git subtree, as we do with other contributed > > software. =20 >=20 > Good idea. There were more good ideas on this topic in the Phab review, = but I don=E2=80=99t have cycles to pursue any of them. This was suggested in the review (https://reviews.freebsd.org/D40260). >=20 > Eric --=20 Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=3D0 From nobody Sun Jun 4 03:07:28 2023 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 4QYhVm4x8qz4Zcp1; Sun, 4 Jun 2023 03:07:28 +0000 (UTC) (envelope-from git@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 4QYhVm40bXz3mnB; Sun, 4 Jun 2023 03:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685848048; 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; bh=w0bQ18tMMEzsmOjphoG6Lb15pWyUxMWNQAo+VsJFr4g=; b=mSafJGOPDZ6wgFBBLDZriDZaxlVUy4BiJZzjxvPrwl4bQpnGWou75VDQedaqfN8KdpQGsN XFhLpex4VNZtSHuCwb2ceZ/2DHqCNw4u0+n/FoCo8nb5BwdcNPCj8cF+2lFFW5HPnamr3M 8ArRhws8hztBXMa88J3M28KDnlVPAh1grOmZ76iTEUp6MlgY8UjNt89GW85n4Bx8wvNU5s OiXWJLyKuov4g/rklrIdjkyIasiJ+GxcApO++RrijrYfvhLwS0F9cV15ZH7Tv1FZ2khRPB LMzMcebRLLcR2IqFAgaMYeKpyyJWAfFkcHKRNpG5R47tLQ0CKVc5+oSX6w9h0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685848048; 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; bh=w0bQ18tMMEzsmOjphoG6Lb15pWyUxMWNQAo+VsJFr4g=; b=XGEcw5EYGNGd+L0PojEV21pP56dQXB6NLM3hDNnjFDElxDcJA3PrvPrmlhBo0Cz6RzxsLe jbgcMJOTjvuNpjSecEGvWQvY+5Q3y/4XghT/G7UZ9gr8V9eyCHzXdw44xEDGJ2hJ+G4h4d 4MAz3XkRhczrBGfJPCmDG+JkNtUqh5FwHrST+HxVtIjrLoBcSFVvBaNFNPetqlUgV7qB1d 5iBgZMUw9PVHAaUKMnPF1eh3dtxJtsfcksfYJ0W0mo7IqBn0Gt9opQ5F3IR4ZX7s4mB0Pg MwGlYKr63JTYcT+XmZt8jOG0tjASlleLOQPLV2/p2aozgG26yJrh8WRrmFkL7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685848048; a=rsa-sha256; cv=none; b=li19Yl9FSXeBVTSqdD6gQuGcGdX76OtizMvo48WmTvrYuUDd1+sCh4KV+gO+8N3Yan/Ij9 ntid3rtM8GpFV7baq9/106gFaCxnkIowZahK5NRYamuiPOdTPGjRdpAvXaadeqLWuLKd0R aI50Gdd/CE5NW9Fc3+fwZWlVke3cG6eJHOtCEeoBrfQ3WowZOb5W+j6Ol0AErBYGv0rGNI MoVkCmGGOZ2asX7uGMAm6C5HdRg1UdK1fbuj528zSDWlNriLDG61qjzzazxE3qbQ2CCD4/ wPkPvTMYTrwuZAjtF3IMTr/L+Bl22YeczLiHZVzu7fpiA1c6GWcfqQHnqZbUuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QYhVm2zCnzr0n; Sun, 4 Jun 2023 03:07:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35437Sm1010300; Sun, 4 Jun 2023 03:07:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35437S1P010299; Sun, 4 Jun 2023 03:07:28 GMT (envelope-from git) Date: Sun, 4 Jun 2023 03:07:28 GMT Message-Id: <202306040307.35437S1P010299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: 086e0149ae56 - main - jail: Use re-entrant versions of lex & yacc, and lex's yylineno 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 086e0149ae56641af245ce472e787c2f67d3aea5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=086e0149ae56641af245ce472e787c2f67d3aea5 commit 086e0149ae56641af245ce472e787c2f67d3aea5 Author: Jamie Gritton AuthorDate: 2023-06-04 03:07:09 +0000 Commit: Jamie Gritton CommitDate: 2023-06-04 03:07:09 +0000 jail: Use re-entrant versions of lex & yacc, and lex's yylineno --- usr.sbin/jail/config.c | 27 ++++++++++------- usr.sbin/jail/jail.c | 8 ++--- usr.sbin/jail/jaillex.l | 76 ++++++++++++++++++----------------------------- usr.sbin/jail/jailp.h | 11 +++---- usr.sbin/jail/jailparse.y | 27 +++++++++++++++++ 5 files changed, 83 insertions(+), 66 deletions(-) diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index cbf5859b1329..52e1cbf05c28 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -51,10 +51,10 @@ struct ipspec { unsigned flags; }; -extern FILE *yyin; -extern int yynerrs; - -extern int yyparse(void); +extern int yylex_init_extra(struct cflex *extra, void *scanner); +extern int yylex_destroy(void *scanner); +extern int yyparse(void *scanner); +extern int yyset_in(FILE *fp, void *scanner); struct cfjails cfjails = TAILQ_HEAD_INITIALIZER(cfjails); @@ -127,7 +127,7 @@ static const struct ipspec intparams[] = { * Parse the jail configuration file. */ void -load_config(void) +load_config(const char *cfname) { struct cfjails wild; struct cfparams opp; @@ -135,19 +135,26 @@ load_config(void) struct cfparam *p, *vp, *tp; struct cfstring *s, *vs, *ns; struct cfvar *v, *vv; + struct cflex cflex; char *ep; + void *scanner; int did_self, jseq, pgen; + cflex.cfname = cfname; + cflex.error = 0; + yylex_init_extra(&cflex, &scanner); if (!strcmp(cfname, "-")) { - cfname = "STDIN"; - yyin = stdin; + cflex.cfname = "STDIN"; + yyset_in(stdin, scanner); } else { - yyin = fopen(cfname, "r"); - if (!yyin) + FILE *yfp = fopen(cfname, "r"); + if (!yfp) err(1, "%s", cfname); + yyset_in(yfp, scanner); } - if (yyparse() || yynerrs) + if (yyparse(scanner) || cflex.error) exit(1); + yylex_destroy(scanner); /* Separate the wildcard jails out from the actual jails. */ jseq = 0; diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c index 02eb957a2d45..a2c725d51b70 100644 --- a/usr.sbin/jail/jail.c +++ b/usr.sbin/jail/jail.c @@ -56,7 +56,6 @@ struct permspec { int rev; }; -const char *cfname; int iflag; int note_remove; int verbose; @@ -138,6 +137,7 @@ main(int argc, char **argv) FILE *jfp; struct cfjail *j; char *JidFile; + const char *cfname; size_t sysvallen; unsigned op, pi; int ch, docf, error, i, oldcl, sysval; @@ -287,7 +287,7 @@ main(int argc, char **argv) } else if (op == JF_STOP || op == JF_SHOW) { /* Just print list of all configured non-wildcard jails */ if (op == JF_SHOW) { - load_config(); + load_config(cfname); show_jails(); exit(0); } @@ -300,7 +300,7 @@ main(int argc, char **argv) usage(); if ((docf = !Rflag && (!strcmp(cfname, "-") || stat(cfname, &st) == 0))) - load_config(); + load_config(cfname); note_remove = docf || argc > 1 || wild_jail_name(argv[0]); } else if (argc > 1 || (argc == 1 && strchr(argv[0], '='))) { /* Single jail specified on the command line */ @@ -348,7 +348,7 @@ main(int argc, char **argv) /* From the config file, perhaps with a specified jail */ if (Rflag || !docf) usage(); - load_config(); + load_config(cfname); } /* Find out which jails will be run. */ diff --git a/usr.sbin/jail/jaillex.l b/usr.sbin/jail/jaillex.l index 1dcf5bef5358..540b43ab3c5c 100644 --- a/usr.sbin/jail/jaillex.l +++ b/usr.sbin/jail/jaillex.l @@ -38,40 +38,32 @@ __FBSDID("$FreeBSD$"); #include "jailp.h" #include "y.tab.h" -extern int yynerrs; +#define YY_DECL int yylex(YYSTYPE *yylval, yyscan_t yyscanner) +#define YY_EXTRA_TYPE struct cflex* -static ssize_t text2lval(size_t triml, size_t trimr, int tovar); +extern YY_DECL; -static int instr; -static int lineno = 1; +static ssize_t text2lval(size_t triml, size_t trimr, int tovar, + YYSTYPE *yylval, yyscan_t scanner); -#define YY_DECL int yylex(void) +static int instr; %} %option noyywrap %option noinput %option nounput +%option reentrant +%option yylineno %start _ DQ %% /* Whitespace or equivalent */ -<_>[ \t]+ instr = 0; -<_>#.* ; -<_>\/\/.* ; -<_>\/\*([^*]|(\*+([^*\/])))*\*+\/ { - const char *s; - - for (s = yytext; s < yytext + yyleng; s++) - if (*s == '\n') - lineno++; - instr = 0; - } -<_>\n { - lineno++; - instr = 0; - } +<_>[ \t\r\n]+ instr = 0; +<_>#.* instr = 0; +<_>\/\/.* instr = 0; +<_>\/\*([^*]|(\*+([^*\/])))*\*+\/ instr = 0; /* Reserved tokens */ <_>\+= { @@ -87,13 +79,13 @@ static int lineno = 1; <_,DQ>[A-Za-z0-9_!%&()\-.:<>?@\[\]^`|~]+ | <_,DQ>\\(.|\n|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}) | <_,DQ>[$*+/\\] { - (void)text2lval(0, 0, 0); + (void)text2lval(0, 0, 0, yylval, yyscanner); return instr ? STR1 : (instr = 1, STR); } /* Single and double quoted strings */ <_>'([^\'\\]|\\(.|\n))*' { - (void)text2lval(1, 1, 0); + (void)text2lval(1, 1, 0, yylval, yyscanner); return instr ? STR1 : (instr = 1, STR); } <_>\"([^"\\]|\\(.|\n))*\" | @@ -102,7 +94,8 @@ static int lineno = 1; ssize_t atvar; skip = yytext[0] == '"' ? 1 : 0; - atvar = text2lval(skip, 1, 1); + atvar = text2lval(skip, 1, 1, yylval, + yyscanner); if (atvar < 0) BEGIN _; else { @@ -120,32 +113,32 @@ static int lineno = 1; /* Variables, single-word or bracketed */ <_,DQ>$[A-Za-z_][A-Za-z_0-9]* { - (void)text2lval(1, 0, 0); + (void)text2lval(1, 0, 0, yylval, yyscanner); return instr ? VAR1 : (instr = 1, VAR); } <_>$\{([^\n{}]|\\(.|\n))*\} | $\{([^\n\"{}]|\\(.|\n))*\} { - (void)text2lval(2, 1, 0); + (void)text2lval(2, 1, 0, yylval, yyscanner); return instr ? VAR1 : (instr = 1, VAR); } /* Partially formed bits worth complaining about */ <_>\/\*([^*]|(\*+([^*\/])))*\** { warnx("%s line %d: unterminated comment", - cfname, lineno); - yynerrs++; + yyextra->cfname, yylineno); + yyextra->error = 1; } <_>'([^\n'\\]|\\.)* | <_>\"([^\n\"\\]|\\.)* { warnx("%s line %d: unterminated string", - cfname, lineno); - yynerrs++; + yyextra->cfname, yylineno); + yyextra->error = 1; } <_>$\{([^\n{}]|\\.)* | $\{([^\n\"{}]|\\.)* { warnx("%s line %d: unterminated variable", - cfname, lineno); - yynerrs++; + yyextra->cfname, yylineno); + yyextra->error = 1; } /* A hack because "<0>" rules aren't allowed */ @@ -157,28 +150,19 @@ static int lineno = 1; %% -void -yyerror(const char *s) -{ - if (!yytext) - warnx("%s line %d: %s", cfname, lineno, s); - else if (!yytext[0]) - warnx("%s: unexpected EOF", cfname); - else - warnx("%s line %d: %s: %s", cfname, lineno, yytext, s); -} - /* * Copy string from yytext to yylval, handling backslash escapes, * and optionally stopping at the beginning of a variable. */ static ssize_t -text2lval(size_t triml, size_t trimr, int tovar) +text2lval(size_t triml, size_t trimr, int tovar, YYSTYPE *yylval, + yyscan_t scanner) { char *d; const char *s, *se; - yylval.cs = d = emalloc(yyleng - trimr - triml + 1); + struct yyguts_t *yyg = scanner; + yylval->cs = d = emalloc(yyleng - trimr - triml + 1); se = yytext + (yyleng - trimr); for (s = yytext + triml; s < se; s++, d++) { if (*s != '\\') { @@ -186,8 +170,6 @@ text2lval(size_t triml, size_t trimr, int tovar) *d = '\0'; return s - yytext; } - if (*s == '\n') - lineno++; *d = *s; continue; } @@ -209,8 +191,8 @@ text2lval(size_t triml, size_t trimr, int tovar) case 'r': *d = '\r'; break; case 't': *d = '\t'; break; case 'v': *d = '\v'; break; - case '\n': d--; lineno++; break; default: *d = *s; break; + case '\n': d--; break; case 'x': *d = 0; if (s + 1 >= se) diff --git a/usr.sbin/jail/jailp.h b/usr.sbin/jail/jailp.h index 0325c2a101a4..6ea4e3ec09a3 100644 --- a/usr.sbin/jail/jailp.h +++ b/usr.sbin/jail/jailp.h @@ -197,6 +197,11 @@ struct cfdepend { unsigned flags; }; +struct cflex { + const char *cfname; + int error; +}; + extern void *emalloc(size_t); extern void *erealloc(void *, size_t); extern char *estrdup(const char *); @@ -209,7 +214,7 @@ extern int next_command(struct cfjail *j); extern int finish_command(struct cfjail *j); extern struct cfjail *next_proc(int nonblock); -extern void load_config(void); +extern void load_config(const char *cfname); extern struct cfjail *add_jail(void); extern void add_param(struct cfjail *j, const struct cfparam *p, enum intparam ipnum, const char *value); @@ -232,13 +237,9 @@ extern int start_state(const char *target, int docf, unsigned state, extern void requeue(struct cfjail *j, struct cfjails *queue); extern void requeue_head(struct cfjail *j, struct cfjails *queue); -extern void yyerror(const char *); -extern int yylex(void); - extern struct cfjails cfjails; extern struct cfjails ready; extern struct cfjails depend; -extern const char *cfname; extern int iflag; extern int note_remove; extern int paralimit; diff --git a/usr.sbin/jail/jailparse.y b/usr.sbin/jail/jailparse.y index 44e2aacb457e..ccc311a76223 100644 --- a/usr.sbin/jail/jailparse.y +++ b/usr.sbin/jail/jailparse.y @@ -30,6 +30,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include @@ -57,6 +58,11 @@ static struct cfjail *global_jail; %type value %type string +%pure-parser + +%lex-param { void *scanner } +%parse-param { void *scanner } + %% /* @@ -221,3 +227,24 @@ string : STR ; %% + +extern int YYLEX_DECL(); + +extern struct cflex *yyget_extra(void *scanner); +extern int yyget_lineno(void *scanner); +extern char *yyget_text(void *scanner); + +static void +YYERROR_DECL() +{ + if (!yyget_text(scanner)) + warnx("%s line %d: %s", + yyget_extra(scanner)->cfname, yyget_lineno(scanner), s); + else if (!yyget_text(scanner)[0]) + warnx("%s: unexpected EOF", + yyget_extra(scanner)->cfname); + else + warnx("%s line %d: %s: %s", + yyget_extra(scanner)->cfname, yyget_lineno(scanner), + yyget_text(scanner), s); +} From nobody Sun Jun 4 09:08:36 2023 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 4QYrWT1kTpz4Z7y8; Sun, 4 Jun 2023 09:08:37 +0000 (UTC) (envelope-from git@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 4QYrWS6vs7z4Mnq; Sun, 4 Jun 2023 09:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685869717; 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; bh=OP0zk36p9WKOBOxLUZPIJRWTWSh2XldfSp+J7zk1GYI=; b=dWkcp4LUydAPlHR0M/BW6T9jb/dxTeQKInaGZP0E4C//ku02RTOdobIdnleS53thpfv9SM Emb1V9pfTrU4sVZdmp4JE8gvYWvgrynv9psJkiNF95usv2CekbJP/q3GMpjk39QbdPd+Gp AQk+cO4pAI63RpKZPc+TGHif5ftjQU5q7FbpfkPvtqMCZvesnLVnkH9CvyjF2IAjzvHbth NUBkaTnYl+RfTcYQLdCSuMAuzf2Gzvg/9FEikbdMb1GeSwoTbIOqB01bEaRg9eTzGW8Fpc Ho6hoWRVWOoYa7OOhn61Q8y9y+IWj+j4ekP7i83LwKIEcNn2qqnkRV+DpIlcXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685869717; 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; bh=OP0zk36p9WKOBOxLUZPIJRWTWSh2XldfSp+J7zk1GYI=; b=XcyfuhtPvRTjSEenm86P09U09zKbizo6uQqAB9Z5bgJPb8e+gtul+Ab/FwoEceuKk22Qci cIn5ZDzvMYm5s5JPniqb3Tkz403RD0pQ0muaPhHhofhbTEhWZOT7BI4STeKe1GU4lr4baR INMcNCfxLROiQLEWGUrh8rjaJqckhScgqKMEh+bFndI+yPubkQLya1yz6i+GwZzRYJMKF0 oH5UU+GwvReBgnKmTvGkOKW8WaKOYkhLQ8p7Pla1yFuvmpMo0SShy7pvkZIY/ao89WLSZr ZQ3bAMV+/Nldg5hn+c4TC32KFMC+78VNYdx7jtIiHOFt2lP2tI+qhdHoL3WuoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685869717; a=rsa-sha256; cv=none; b=R4c8CzndlbHrIsONSVmnJrdBHirGKFzAupbAf3mF/VxlmLdYWFPP7FelzK1EzUTSrUZuyV HXc4cOI4A6ybgD5ovGo2YmPjBrFNWrYFSochRj9iHDW+TBi09Tt1oPYy+wiDvakI00GLAa YYdjFOQ9EN07jr8Gk54D3uC8KDdbDpZPmiL7Itzj1k2lMwk/uTlEBXmoK2GX1Hf5hjOaEr BO/C8i19yWz/edFrOs+kQsC2ZvmTmRJqXZ6eVVUuEgsnroRPT/YDy5CZRoGcRo3U/+kLD+ VJaSAGCXrIfuRtsA362etQZfeZaSKg/s0T2DZ2sNoBUe8osp+SeRjuco9UOuIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QYrWS5tPmz10nk; Sun, 4 Jun 2023 09:08:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35498a8O002533; Sun, 4 Jun 2023 09:08:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35498a6a002532; Sun, 4 Jun 2023 09:08:36 GMT (envelope-from git) Date: Sun, 4 Jun 2023 09:08:36 GMT Message-Id: <202306040908.35498a6a002532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 0be13a45f7cb - main - xregs_sig: Add a ability to handle multiple register banks 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0be13a45f7cb18f8b86c800a28457bf918e130f2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=0be13a45f7cb18f8b86c800a28457bf918e130f2 commit 0be13a45f7cb18f8b86c800a28457bf918e130f2 Author: Dmitry Chagin AuthorDate: 2023-06-04 09:06:25 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-04 09:06:25 +0000 xregs_sig: Add a ability to handle multiple register banks While here replace the .global directive by traditionally used .globl. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40410 --- tools/test/xregs_sig/c2x2c_aarch64.S | 18 ++--- tools/test/xregs_sig/c2x2c_amd64.S | 18 ++--- tools/test/xregs_sig/xregs_sig.c | 128 ++++++++++++++++++++++------------- 3 files changed, 100 insertions(+), 64 deletions(-) diff --git a/tools/test/xregs_sig/c2x2c_aarch64.S b/tools/test/xregs_sig/c2x2c_aarch64.S index 6f1637f5bcdf..f53550b867fd 100644 --- a/tools/test/xregs_sig/c2x2c_aarch64.S +++ b/tools/test/xregs_sig/c2x2c_aarch64.S @@ -5,9 +5,11 @@ * $FreeBSD$ */ - .global cpu_to_xregs - .type cpu_to_xregs, @function -cpu_to_xregs: + .text + + .globl cpu_to_vfp + .type cpu_to_vfp, @function +cpu_to_vfp: stp q0, q1, [x0, #( 0 * 16)] stp q2, q3, [x0, #( 2 * 16)] stp q4, q5, [x0, #( 4 * 16)] @@ -26,12 +28,12 @@ cpu_to_xregs: stp q30, q31, [x0, #(30 * 16)] ret - .size cpu_to_xregs, . - cpu_to_xregs + .size cpu_to_vfp, . - cpu_to_vfp - .global xregs_to_cpu - .type xregs_to_cpu, @function -xregs_to_cpu: + .globl vfp_to_cpu + .type vfp_to_cpu, @function +vfp_to_cpu: ldp q0, q1, [x0, #( 0 * 16)] ldp q2, q3, [x0, #( 2 * 16)] ldp q4, q5, [x0, #( 4 * 16)] @@ -50,6 +52,6 @@ xregs_to_cpu: ldp q30, q31, [x0, #(30 * 16)] ret - .size xregs_to_cpu, . - xregs_to_cpu + .size vfp_to_cpu, . - vfp_to_cpu .section .note.GNU-stack,"",@progbits diff --git a/tools/test/xregs_sig/c2x2c_amd64.S b/tools/test/xregs_sig/c2x2c_amd64.S index e5ae5af99e97..7348e4871d53 100644 --- a/tools/test/xregs_sig/c2x2c_amd64.S +++ b/tools/test/xregs_sig/c2x2c_amd64.S @@ -5,9 +5,11 @@ * $FreeBSD$ */ - .global cpu_to_xregs - .type cpu_to_xregs, @function -cpu_to_xregs: + .text + + .globl cpu_to_xmm + .type cpu_to_xmm, @function +cpu_to_xmm: movdqu %xmm0, (%rdi) movdqu %xmm1, 1 * 16(%rdi) movdqu %xmm2, 2 * 16(%rdi) @@ -26,12 +28,12 @@ cpu_to_xregs: movdqu %xmm15, 15 * 16(%rdi) retq - .size cpu_to_xregs, . - cpu_to_xregs + .size cpu_to_xmm, . - cpu_to_xmm - .global xregs_to_cpu - .type xregs_to_cpu, @function -xregs_to_cpu: + .globl xmm_to_cpu + .type xmm_to_cpu, @function +xmm_to_cpu: movdqu (%rdi), %xmm0 movdqu 1 * 16(%rdi), %xmm1 movdqu 2 * 16(%rdi), %xmm2 @@ -50,6 +52,6 @@ xregs_to_cpu: movdqu 15 * 16(%rdi), %xmm15 retq - .size xregs_to_cpu, . - xregs_to_cpu + .size xmm_to_cpu, . - xmm_to_cpu .section .note.GNU-stack,"",@progbits diff --git a/tools/test/xregs_sig/xregs_sig.c b/tools/test/xregs_sig/xregs_sig.c index a67379a0080e..4e29165d39e2 100644 --- a/tools/test/xregs_sig/xregs_sig.c +++ b/tools/test/xregs_sig/xregs_sig.c @@ -44,30 +44,49 @@ #ifndef __unused #define __unused __attribute__((__unused__)) #endif -#ifndef nitems -#define nitems(x) (sizeof((x)) / sizeof((x)[0])) -#endif -#if defined(__amd64__) -#define XREGSRNAM "xmm" -#define NREGS 16 -#elif defined(__aarch64__) -#define XREGSRNAM "q" -#define NREGS 32 -#endif - -struct xregsreg { - uint8_t xregs_bytes[16]; +struct xregs_bank { + const char *b_name; + const char *r_name; + uint32_t regs; + uint32_t bytes; + void (*x2c)(uint8_t *); + void (*c2x)(uint8_t *); }; -struct xregs { - struct xregsreg xregsreg[NREGS]; +#if defined(__amd64__) +void cpu_to_xmm(uint8_t *); +void xmm_to_cpu(uint8_t *); + +static const struct xregs_bank xregs_banks[] = { + { + .b_name = "SSE", + .r_name = "xmm", + .regs = 16, + .bytes = 16, + .x2c = xmm_to_cpu, + .c2x = cpu_to_xmm, + }, }; - -void cpu_to_xregs(struct xregs *xregs); -void xregs_to_cpu(struct xregs *xregs); +#elif defined(__aarch64__) +void cpu_to_vfp(uint8_t *); +void vfp_to_cpu(uint8_t *); + +static const struct xregs_bank xregs_banks[] = { + { + .b_name = "VFP", + .r_name = "q", + .regs = 32, + .bytes = 16, + .x2c = vfp_to_cpu, + .c2x = cpu_to_vfp, + }, +}; +#endif static atomic_uint sigs; +static int max_bank_idx; + static void sigusr1_handler(int sig __unused, siginfo_t *si __unused, void *m __unused) @@ -87,23 +106,22 @@ sigalrm_handler(int sig __unused) alarm(TIMO); } -static struct xregs zero_xregs = {}; static void -fill_xregs(struct xregs *xregs) +fill_xregs(uint8_t *xregs, int bank) { - arc4random_buf(xregs, sizeof(*xregs)); + arc4random_buf(xregs, xregs_banks[bank].regs * xregs_banks[bank].bytes); } static void -dump_xregs(const struct xregsreg *r) +dump_xregs(const uint8_t *r, int bank) { unsigned k; - for (k = 0; k < nitems(r->xregs_bytes); k++) { + for (k = 0; k < xregs_banks[bank].bytes; k++) { if (k != 0) printf(" "); - printf("%02x", r->xregs_bytes[k]); + printf("%02x", r[k]); } printf("\n"); } @@ -111,9 +129,9 @@ dump_xregs(const struct xregsreg *r) static pthread_mutex_t show_lock; static void -show_diff(const struct xregs *xregs1, const struct xregs *xregs2) +show_diff(const uint8_t *xregs1, const uint8_t *xregs2, int bank) { - const struct xregsreg *r1, *r2; + const uint8_t *r1, *r2; unsigned i, j; #if defined(__FreeBSD__) @@ -121,14 +139,14 @@ show_diff(const struct xregs *xregs1, const struct xregs *xregs2) #elif defined(__linux__) printf("thr %ld\n", syscall(SYS_gettid)); #endif - for (i = 0; i < nitems(xregs1->xregsreg); i++) { - r1 = &xregs1->xregsreg[i]; - r2 = &xregs2->xregsreg[i]; - for (j = 0; j < nitems(r1->xregs_bytes); j++) { - if (r1->xregs_bytes[j] != r2->xregs_bytes[j]) { - printf("%%%s%u\n", XREGSRNAM, i); - dump_xregs(r1); - dump_xregs(r2); + for (i = 0; i < xregs_banks[bank].regs; i++) { + r1 = xregs1 + i * xregs_banks[bank].bytes; + r2 = xregs2 + i * xregs_banks[bank].bytes; + for (j = 0; j < xregs_banks[bank].bytes; j++) { + if (r1[j] != r2[j]) { + printf("%%%s%u\n", xregs_banks[bank].r_name, i); + dump_xregs(r1, bank); + dump_xregs(r2, bank); break; } } @@ -142,28 +160,32 @@ my_pause(void) } static void * -worker_thread(void *arg __unused) +worker_thread(void *arg) { - struct xregs xregs, xregs_cpu; + int bank = (uintptr_t)arg; + int sz = xregs_banks[bank].regs * xregs_banks[bank].bytes; + uint8_t xregs[sz], xregs_cpu[sz], zero_xregs[sz]; + + memset(zero_xregs, 0, sz); - fill_xregs(&xregs); + fill_xregs(xregs, bank); for (;;) { - xregs_to_cpu(&xregs); + xregs_banks[bank].x2c(xregs); my_pause(); - cpu_to_xregs(&xregs_cpu); - if (memcmp(&xregs, &xregs_cpu, sizeof(struct xregs)) != 0) { + xregs_banks[bank].c2x(xregs_cpu); + if (memcmp(xregs, xregs_cpu, sz) != 0) { pthread_mutex_lock(&show_lock); - show_diff(&xregs, &xregs_cpu); + show_diff(xregs, xregs_cpu, bank); abort(); pthread_mutex_unlock(&show_lock); } - xregs_to_cpu(&zero_xregs); + xregs_banks[bank].x2c(zero_xregs); my_pause(); - cpu_to_xregs(&xregs_cpu); - if (memcmp(&zero_xregs, &xregs_cpu, sizeof(struct xregs)) != 0) { + xregs_banks[bank].c2x(xregs_cpu); + if (memcmp(zero_xregs, xregs_cpu, sz) != 0) { pthread_mutex_lock(&show_lock); - show_diff(&zero_xregs, &xregs_cpu); + show_diff(zero_xregs, xregs_cpu, bank); abort(); pthread_mutex_unlock(&show_lock); } @@ -175,7 +197,9 @@ int main(void) { struct sigaction sa; - int error, i, ncpu; + int error, i, ncpu, bank; + + max_bank_idx = 0; bzero(&sa, sizeof(sa)); sa.sa_handler = sigalrm_handler; @@ -199,14 +223,22 @@ main(void) } ncpu = sysconf(_SC_NPROCESSORS_ONLN); - ncpu *= 2; + if (max_bank_idx == 0) + ncpu *= 2; + bank = 0; pthread_t wt[ncpu]; +nextbank: + printf("Starting %d threads for registers bank %s sized [%d][%d]\n", ncpu, + xregs_banks[bank].b_name, xregs_banks[bank].regs, xregs_banks[bank].bytes); for (i = 0; i < ncpu; i++) { - error = pthread_create(&wt[i], NULL, worker_thread, NULL); + error = pthread_create(&wt[i], NULL, worker_thread, + (void *)(uintptr_t)bank); if (error != 0) { fprintf(stderr, "pthread_create %s\n", strerror(error)); } } + if (++bank <= max_bank_idx) + goto nextbank; alarm(TIMO); for (;;) { From nobody Sun Jun 4 09:08:37 2023 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 4QYrWV2C1Dz4Z80d; Sun, 4 Jun 2023 09:08:38 +0000 (UTC) (envelope-from git@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 4QYrWV1Rykz4Mv2; Sun, 4 Jun 2023 09:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685869718; 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; bh=EpM+sQTx1he7BjYKaz5JNUq733v9s5R6QZ1RW15I26Y=; b=W5aX/Bhs2bv8sbeB0UF2/qtpScoKK2DAFfDdrucR+ZhNBvnMVM/RN90lrURdTR3DT+Rqnn g06Au/lzu7YBSbNbTdZFsEW8C+Jt2lQLt9NKYwuQCeJp/x5Q/ZeqlsJUH1piRO2d7sGJrm ee5hDwcXujGDmr1ATQ4SZ5dNsbplBqYjy2nerTM6WGaKc3fnroZMYSwRlM81/QzahLHDYE V4DlEAnWNpJ3zW+7gb+EAmsHOLgsbxxdScy1ytjS29zVdnoMRenA5nwTCuZixVAvIkaNbl nKhYXDqjrepHVczaJBYBvYg332KuwhS86pD8VVYlK6TsD8pG0SOsTGlmwK+WRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685869718; 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; bh=EpM+sQTx1he7BjYKaz5JNUq733v9s5R6QZ1RW15I26Y=; b=FdUaaEAqbBMtl85n3jsuvH1fn2ij9v+ScldjBDqpI3jEZlgtYG1EuQEDt5ouWqqyFA/qzN taNOIhl94RccIaiRFG6QR+tzqmnJHebZIx+ouEdGbHhixL9gDNdVxRUKgXrCjQ7KBgQLoP naTgaG8qPckCVAQ9aUdcr8O9kDGO3MtZFgkKptZ7uL26yG5QFyEyzr4lF9ebYU228++RUg MGM3K+25UMRdtmg3S5DKqWMAKfa7Rebj9qdSHGkcNZLmHNNG7zmQhFtiJp4QEi8U4m4F0P 2rCGEDy3uvKIErTWvatN9gf55/4DWtcciPVru+T41I6acEL5xeBbPvj8x/DHpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685869718; a=rsa-sha256; cv=none; b=DYKgcLCc8gXEvhCMOA41YJXSlD2EFrOp6Nk+A3MC1e76FuLeoXnECAULwFWwOo3fyw7qbO mgBgfpx7zEt7ruhWeCTrIThiC//hX9WsqgZp/zv+tE0fHbJqeqg0+yN7eap6O4WZxaY59b ScdaVQHwPsh9A/h6tLXLH5LEhnqCWI8Jp70ee6nBw/y6NPJkN7+PvcWWGOAqDy63GSY5Ni dnJETyZv2XsdQvZsvTeq0efozPUUiTAKW0+G3N2+pqVcLqMIMswjOxs8+HsLTRb/f6xR41 yWGmUzSMpzQnWKUZ6Rcvgj1sCsgU7dD3NRKWvQdYKbuCgxMT79XPhg+H+07pSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QYrWT6kcfz10nl; Sun, 4 Jun 2023 09:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35498b0i002559; Sun, 4 Jun 2023 09:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35498bRV002558; Sun, 4 Jun 2023 09:08:37 GMT (envelope-from git) Date: Sun, 4 Jun 2023 09:08:37 GMT Message-Id: <202306040908.35498bRV002558@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: c8dbef44ffbe - main - xregs_sig: Add avx registers to test 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8dbef44ffbe8d8acf33a5f20e20ca6b48beb4fa Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=c8dbef44ffbe8d8acf33a5f20e20ca6b48beb4fa commit c8dbef44ffbe8d8acf33a5f20e20ca6b48beb4fa Author: Dmitry Chagin AuthorDate: 2023-06-04 09:07:02 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-04 09:07:02 +0000 xregs_sig: Add avx registers to test Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D40384 --- tools/test/xregs_sig/c2x2c_aarch64.S | 9 ++++ tools/test/xregs_sig/c2x2c_amd64.S | 85 ++++++++++++++++++++++++++++++++++++ tools/test/xregs_sig/xregs_sig.c | 14 +++++- 3 files changed, 107 insertions(+), 1 deletion(-) diff --git a/tools/test/xregs_sig/c2x2c_aarch64.S b/tools/test/xregs_sig/c2x2c_aarch64.S index f53550b867fd..ef29cac8a087 100644 --- a/tools/test/xregs_sig/c2x2c_aarch64.S +++ b/tools/test/xregs_sig/c2x2c_aarch64.S @@ -7,6 +7,15 @@ .text + .globl xregs_banks_max + .type xregs_banks_max, @function +xregs_banks_max: + mov x0, #0 + ret + + .size xregs_banks_max, . - xregs_banks_max + + .globl cpu_to_vfp .type cpu_to_vfp, @function cpu_to_vfp: diff --git a/tools/test/xregs_sig/c2x2c_amd64.S b/tools/test/xregs_sig/c2x2c_amd64.S index 7348e4871d53..bdc0d782e5c8 100644 --- a/tools/test/xregs_sig/c2x2c_amd64.S +++ b/tools/test/xregs_sig/c2x2c_amd64.S @@ -5,8 +5,45 @@ * $FreeBSD$ */ +#if defined(__FreeBSD__) +#include +#else +#define CPUID2_OSXSAVE 0x08000000 +#define CPUID2_AVX 0x10000000 +#define XFEATURE_ENABLED_X87 0x00000001 +#define XFEATURE_ENABLED_SSE 0x00000002 +#define XFEATURE_ENABLED_AVX 0x00000004 +#define XFEATURE_AVX \ + (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE | XFEATURE_ENABLED_AVX) +#endif + .text + .globl xregs_banks_max + .type xregs_banks_max, @function +xregs_banks_max: + pushq %rbx + movl $1, %eax + cpuid + andl $(CPUID2_AVX|CPUID2_OSXSAVE), %ecx + cmpl $(CPUID2_AVX|CPUID2_OSXSAVE), %ecx + jne sse + xorl %ecx, %ecx + xgetbv + andl $XFEATURE_AVX, %eax + cmpl $XFEATURE_AVX, %eax + jne sse + movl $1, %eax + jmp out +sse: + xorl %eax, %eax +out: + popq %rbx + retq + + .size xregs_banks_max, . - xregs_banks_max + + .globl cpu_to_xmm .type cpu_to_xmm, @function cpu_to_xmm: @@ -54,4 +91,52 @@ xmm_to_cpu: .size xmm_to_cpu, . - xmm_to_cpu + + .globl cpu_to_avx + .type cpu_to_avx, @function +cpu_to_avx: + vmovdqu %ymm0, (%rdi) + vmovdqu %ymm1, 1 * 32(%rdi) + vmovdqu %ymm2, 2 * 32(%rdi) + vmovdqu %ymm3, 3 * 32(%rdi) + vmovdqu %ymm4, 4 * 32(%rdi) + vmovdqu %ymm5, 5 * 32(%rdi) + vmovdqu %ymm6, 6 * 32(%rdi) + vmovdqu %ymm7, 7 * 32(%rdi) + vmovdqu %ymm8, 8 * 32(%rdi) + vmovdqu %ymm9, 9 * 32(%rdi) + vmovdqu %ymm10, 10 * 32(%rdi) + vmovdqu %ymm11, 11 * 32(%rdi) + vmovdqu %ymm12, 12 * 32(%rdi) + vmovdqu %ymm13, 13 * 32(%rdi) + vmovdqu %ymm14, 14 * 32(%rdi) + vmovdqu %ymm15, 15 * 32(%rdi) + retq + + .size cpu_to_avx, . - cpu_to_avx + + + .globl avx_to_cpu + .type avx_to_cpu, @function +avx_to_cpu: + vmovdqu (%rdi), %ymm0 + vmovdqu 1 * 32(%rdi), %ymm1 + vmovdqu 2 * 32(%rdi), %ymm2 + vmovdqu 3 * 32(%rdi), %ymm3 + vmovdqu 4 * 32(%rdi), %ymm4 + vmovdqu 5 * 32(%rdi), %ymm5 + vmovdqu 6 * 32(%rdi), %ymm6 + vmovdqu 7 * 32(%rdi), %ymm7 + vmovdqu 8 * 32(%rdi), %ymm8 + vmovdqu 9 * 32(%rdi), %ymm9 + vmovdqu 10 * 32(%rdi), %ymm10 + vmovdqu 11 * 32(%rdi), %ymm11 + vmovdqu 12 * 32(%rdi), %ymm12 + vmovdqu 13 * 32(%rdi), %ymm13 + vmovdqu 14 * 32(%rdi), %ymm14 + vmovdqu 15 * 32(%rdi), %ymm15 + retq + + .size avx_to_cpu, . - avx_to_cpu + .section .note.GNU-stack,"",@progbits diff --git a/tools/test/xregs_sig/xregs_sig.c b/tools/test/xregs_sig/xregs_sig.c index 4e29165d39e2..2ed47b4eb3bc 100644 --- a/tools/test/xregs_sig/xregs_sig.c +++ b/tools/test/xregs_sig/xregs_sig.c @@ -54,9 +54,13 @@ struct xregs_bank { void (*c2x)(uint8_t *); }; +int xregs_banks_max(void); + #if defined(__amd64__) void cpu_to_xmm(uint8_t *); void xmm_to_cpu(uint8_t *); +void cpu_to_avx(uint8_t *); +void avx_to_cpu(uint8_t *); static const struct xregs_bank xregs_banks[] = { { @@ -67,6 +71,14 @@ static const struct xregs_bank xregs_banks[] = { .x2c = xmm_to_cpu, .c2x = cpu_to_xmm, }, + { + .b_name = "AVX", + .r_name = "ymm", + .regs = 16, + .bytes = 32, + .x2c = avx_to_cpu, + .c2x = cpu_to_avx, + }, }; #elif defined(__aarch64__) void cpu_to_vfp(uint8_t *); @@ -199,7 +211,7 @@ main(void) struct sigaction sa; int error, i, ncpu, bank; - max_bank_idx = 0; + max_bank_idx = xregs_banks_max(); bzero(&sa, sizeof(sa)); sa.sa_handler = sigalrm_handler; From nobody Sun Jun 4 16:39:56 2023 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 4QZ2XF0zKZz4ZJT3; Sun, 4 Jun 2023 16:39:57 +0000 (UTC) (envelope-from git@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 4QZ2XF0MCVz3tvn; Sun, 4 Jun 2023 16:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685896797; 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; bh=bBCzqL+kVIJDI2JOWpc0p+GWtE0EGsjyRG0NBl9foF0=; b=sOjeoOjfevcpDXm5OvIJSIHYWaEhSqF3qLlDzj+DAg1R72XE+Bc+aaG5Gi3+gh+9fceBG6 JHuVw6qOGctehQLmp5RABrpV8SkZZ0ViqSldLyZHQin9Z8gmhkrZZ+Ei6s1ldkzO00802E K95OZnR/8jKEZur+NZSCy+Fb/XKf6qb0g/AUBWEqVAVrfu9NyYd1ihcwgkHAd3vrCg44fj 1JK//z6+1HKY0dnje5H4J/gP4/ZBBKIlTt5CnULXp5Pwx1U3NMYS4tDrBjYjZ3Fczja8yh D99PMFUYyBYt0txR7c/uAnsyHxIiKPOfLzSOrPuTsPGa5H5HQELSVAcXxbMKGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685896797; 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; bh=bBCzqL+kVIJDI2JOWpc0p+GWtE0EGsjyRG0NBl9foF0=; b=fnax4hkdD4eoEMztQTwxQ8XEH36BYG+lNQY+cpasjsnNvIZHJset/vxOoH7VEJ8aQJ5+U0 fuIM30WGLpR63EzinirJZPBPyRivVgUqcrMcTKkf3fj8RbeUa1+DiwdPGEWNU+sMAYJQez Hf1VPPVhdLNAbs0n7i9O+0eHimHk3LK97fj0ao//+uDhg8ZDlIlb9lDnAR7Kf75wp7AZ6E Le/GPklbg5urIj/Txz2vhnD2yWR1/3sXw+pwRE21FO9/asrTzFU2jGvR2RTm0R6Np9o5Hb Zpr/gV8UKTnXURI23/IB1x7wg9qw8e/HsswR1Bi4vV/aU5117aD9k/dFRgN2Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685896797; a=rsa-sha256; cv=none; b=yrdmoFZnISWchXpqbIq/RODV10ClGtHQXV36v6M4mFXPUIlleCFLYCsNAyA2+grdSlVTQf q60iUvVpdXQ4kUeijiZp4cQyc+B3ygnsrbEQEiRLCCTWhj0XA38WvcnW3pubfngjiE+hhP vRqECNk2YoLyKqoWfOV45d8YSIxUSHRGHG2vdvBAFwxbuF9ysgSJ7M0SVrVGjlgvqSVih2 16R0PJYSzYHiqS19TEkdLsWUvKPj120IRUdUc5Tktzy6xKdFwmC23YeBEk9swG+Il9TwoR C62z71aeLhp9KRoMZiPdCM7MIDTIIYwFlU7a9+v4Iyxl+Y/GPgfg8xNN5M3IMg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ2XD6S48z1Cxg; Sun, 4 Jun 2023 16:39:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354Gdu0L043885; Sun, 4 Jun 2023 16:39:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354Gdu2O043884; Sun, 4 Jun 2023 16:39:56 GMT (envelope-from git) Date: Sun, 4 Jun 2023 16:39:56 GMT Message-Id: <202306041639.354Gdu2O043884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9d5a47e13c17 - main - ossl: Provide a fallback definition of __uint128_t when needed 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d5a47e13c175adf7486956847c3d060fe059f2c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9d5a47e13c175adf7486956847c3d060fe059f2c commit 9d5a47e13c175adf7486956847c3d060fe059f2c Author: Mark Johnston AuthorDate: 2023-06-02 22:18:05 +0000 Commit: Mark Johnston CommitDate: 2023-06-04 16:39:44 +0000 ossl: Provide a fallback definition of __uint128_t when needed This is required on i386. The patch has no functional change, since AES-GCM isn't implemented for that platform. Fixes: 9a3444d91c70 ("ossl: Add a VAES-based AES-GCM implementation for amd64") Reported by: Jenkins --- sys/crypto/openssl/ossl_aes_gcm.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/crypto/openssl/ossl_aes_gcm.h b/sys/crypto/openssl/ossl_aes_gcm.h index 9ce8ee193483..cd0c1e324354 100644 --- a/sys/crypto/openssl/ossl_aes_gcm.h +++ b/sys/crypto/openssl/ossl_aes_gcm.h @@ -49,6 +49,10 @@ struct ossl_aes_gcm_ops { size_t len); }; +#ifndef __SIZEOF_INT128__ +typedef struct { uint64_t v[2]; } __uint128_t; +#endif + struct ossl_gcm_context { struct { union { From nobody Sun Jun 4 17:17:56 2023 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 4QZ3N45MRcz4ZN3f; Sun, 4 Jun 2023 17:17:56 +0000 (UTC) (envelope-from git@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 4QZ3N44mPVz3y2v; Sun, 4 Jun 2023 17:17:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899076; 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; bh=1tgjOSZtO6aeODv46ndyopEm5cOYq2RktOgKpOiZYV4=; b=cNmsnxBXO7bt+jNS8kLyjhEnHc89FsPEWsHXfb7nQf58+dQdUVYxApbjtEdvIPupLr2jds b0H0rBznUPpRW27DVry0yiOE1du1BpCjeMei1/BoU4a7Cdpgo9J10aPlPM5dL73KiBEb38 y07EQyE7k2C3c23VjQ0QnkDjNut/b/1jgYH2gT817Zg2bRSUXjgA1nGNT7eTuFAILojraC 8dfHqAloo8kOE/UdRsu3UYVOF8u/yxu+9ij0ahSYPmnzpDtDuF/8BYOvhF/g45NDujVwyv 5G6eYmts6ZnPqziTQcRY8uEeCUtFotBN59wCFhSodBnYFfJqF1LTBpJ2QtwbAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899076; 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; bh=1tgjOSZtO6aeODv46ndyopEm5cOYq2RktOgKpOiZYV4=; b=rJCMhqtBlvxtHeH1/pHd7ckEP8DYb8Pht4BSCxZ/6cMIIBqYbzZ7ZpvbBE7cwwFiqP9XZk ZK9fbCbv/y/4x9ujShlCZfsE8Zb/mnHDp6lKcOe0Nq50hEmSVv2oCeeM8tm+T4lu6pgrVp QobaHbfpxUhJtJuBUPRi4sF5Z8YNNYZHGWyZaProSd68JwebBqO9nlB91E6ODQ9NGZT1qu VoN3fMtk57bwUsGZLaBHnhrcfJRw4UfJfDoxHs5bHKdKfc36HXsHQevRMGpxXpPZVaExzp txnwirEOdwVt3RjA2fbIN/1haheHU4P4Qy5hXVeBHm7IHGT207YtLioQPmkmNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685899076; a=rsa-sha256; cv=none; b=jzlbYqEOzdYtkoLsJmb9pjni/5t1V8WUInxQs3Cvsh8Cra2rfhLMwVVnv67NpTMazNQTfP t15pKM4+dkfLx+He+BdkXRdigj1gmE0AtcKRmmQo28t4UL1X+2ik4RN5092APif2pejorI vX94bv9xNNDoTLkbycfun/vjMXtm62ZTXQSTUQX6JaNesR2rTEJYUeRntDbXPG/+SBVHIT 6APTmGB6DkG8LZFAeaT/PmtgqsgDW3gB3X+5SqAPe9AQHSq9HV4v0ZlN6ktsGDXJGZGn2q 2miL9KZJlm3ZRqJOKAArqXGU9MtgY1Xe1Oq6E+7UIFr6TNMGltItoGEsSbRwjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ3N43kVSzF1T; Sun, 4 Jun 2023 17:17:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354HHuQS009943; Sun, 4 Jun 2023 17:17:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354HHuhf009942; Sun, 4 Jun 2023 17:17:56 GMT (envelope-from git) Date: Sun, 4 Jun 2023 17:17:56 GMT Message-Id: <202306041717.354HHuhf009942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 02d90458669d - main - tslog: Handle curthread equal to NULL 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02d90458669d6f8063ef32e35069e9246f487b37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=02d90458669d6f8063ef32e35069e9246f487b37 commit 02d90458669d6f8063ef32e35069e9246f487b37 Author: Colin Percival AuthorDate: 2023-05-21 20:03:33 +0000 Commit: Colin Percival CommitDate: 2023-06-04 17:16:22 +0000 tslog: Handle curthread equal to NULL Early in the kernel boot, curthread goes through three stages: 1. Kernel crash when you try to access it, because PCPU doesn't exist. 2. NULL, because PCU exists but isn't initialized. 3. &thread0, which is where most of the kernel boot process runs. This broke TSLOG from inside hammer_time since the scripts which parse logged records didn't understand that NULL meant &thread0. Tell tslog to record &thread0 as the active thread if passed NULL. Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D40324 --- sys/kern/kern_tslog.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_tslog.c b/sys/kern/kern_tslog.c index 5eba7719880d..3629f7d88a93 100644 --- a/sys/kern/kern_tslog.c +++ b/sys/kern/kern_tslog.c @@ -59,6 +59,10 @@ tslog(void * td, int type, const char * f, const char * s) uint64_t tsc = get_cyclecount(); long pos; + /* A NULL thread is thread0 before curthread is set. */ + if (td == NULL) + td = &thread0; + /* Grab a slot. */ pos = atomic_fetchadd_long(&nrecs, 1); From nobody Sun Jun 4 17:17:57 2023 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 4QZ3N6136Nz4ZMyK; Sun, 4 Jun 2023 17:17:58 +0000 (UTC) (envelope-from git@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 4QZ3N55V9kz3xrZ; Sun, 4 Jun 2023 17:17:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899077; 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; bh=Gt2alcKQIrrcAMV7X9E8X5b2Lpjc8/TLTxB9xUh1yac=; b=crRvrvUW6gZS4bnZdFHuMDo3HWjptSyZ6yPiB2UrpFaPzRVd9wtwJOQXpof3DYHcww51PX 6NFiBmywe5azTI45ibz2OVlSZDgsOTjAWMVVpK9kEkiQe3GwXFrjj4sCpDFHSDdo+vQRJ7 CvrZMf1T1weebFRGWGmizZWtkAdeISn0htEL2WYFUqpl5MHquxvxjCeYsg2OSyh3Ofeua6 rja9EgzVfkvhyoOKSJqW81QrZ8xQpc064xXVjHtAyhrmuSS/8+F5adFSPrkbCBWQQ3X1o6 6QJrLOAPSyygMIZbzvguJe4pr/wePrP8q5Hr+PKNXxgUNZdPjVt1Ly0+trCkWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899077; 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; bh=Gt2alcKQIrrcAMV7X9E8X5b2Lpjc8/TLTxB9xUh1yac=; b=VWL7/9+dfRHDuNo6ZWeOO7CIznUGNFKN4jUDo9V1F7IYgPi+3GyfJbijLNbVOlv17SHDv6 DcyGLdvQgbozRvsoQJOWxgfjxh4pMbREkFlkLRTqJi9Ge7Z2GLjpN+JPNrIbDkIiKoilPG lDsg98Xq657msliwd8BUn2X8szLvvilToHJHWysfyvVbppH4lyddjI3dcgnmhbXhx78uSz LA79EDMqAP8FYaBznPVjubbViwqZUtgS2UGWt/bPNAqXH0jMQg4SAhrR3ef2zD64xvxAfC jwxBmX06xZMsGkyB+UsUbqqV4Oss9XP+EUat4vfphz7aMHYbYSZyAXezPS1xCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685899077; a=rsa-sha256; cv=none; b=DQmY+xUkCLxf26FEA6OUaHMQDGHeGgmkWiKTaa43nUvy4zPqJH5kd7iDF4ZuhfvpERPaY1 KyxjtHLxSl9Kh6h1gv3JtuCQ795w8m0nk1jzSimuLcOHDUvjD84vU0HQl7OwO5pneKUrkM D08Y6aj4vjwdc24BptOfu4L17UiJZYfw4uo6jN8s3vpzxaPnyzR+i10ar2XEDoU7PZtRkX vdC1WhFREVbo2VaNlVFibhTPMqF/1bBhgKF9+i6KtJxH2gFzuOWlExa9GbT950KtXRwvJO Ex9pU8E4RIpFCgc/NyD08ljxONyqVrEsGjN/pwtdFOJzzO3blJwjsDWyr7+pqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ3N54TXqzF1V; Sun, 4 Jun 2023 17:17:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354HHvZh009962; Sun, 4 Jun 2023 17:17:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354HHvVL009961; Sun, 4 Jun 2023 17:17:57 GMT (envelope-from git) Date: Sun, 4 Jun 2023 17:17:57 GMT Message-Id: <202306041717.354HHvVL009961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 469cfa3c30ee - main - tslog: Annotate some early boot functions 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 469cfa3c30ee7a5ddeb597d0a8c3e7cac909b27a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=469cfa3c30ee7a5ddeb597d0a8c3e7cac909b27a commit 469cfa3c30ee7a5ddeb597d0a8c3e7cac909b27a Author: Colin Percival AuthorDate: 2023-05-22 09:54:04 +0000 Commit: Colin Percival CommitDate: 2023-06-04 17:16:22 +0000 tslog: Annotate some early boot functions Booting an amd64 kernel on Firecracker with 1 CPU and 128 MB of RAM, hammer_time takes roughly 2740 us: * 55 us in xen_pvh_parse_preload_data * 20 us in boot_parse_cmdline_delim * 20 us in boot_env_to_howto * 15 us in identify_hypervisor * 1320 us in link_elf_reloc * 1310 us in relocate_file1 handling ef->rela * 25 us in init_param1 * 30 us in dpcpu_init * 355 us in initializecpu * 255 us in initializecpu calling load_cr4 * 425 us in getmemsize * 280 us in pmap_bootstrap * 205 us in create_pagetables * 10 us in init_param2 * 25 us in pci_early_quirks * 60 us in cninit * 90 us in kdb_init * 105 us in msgbufinit * 20 us in fpuinit * 205 us elsewhere in hammer_time Some of these are unavoidable (e.g. identify_hypervisor uses CPUID and load_cr4 loads the CR4 register, both of which trap to the hypervisor) but others may deserve attention. Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D40325 --- sys/amd64/amd64/fpu.c | 3 +++ sys/amd64/amd64/initcpu.c | 4 ++++ sys/amd64/amd64/machdep.c | 2 ++ sys/amd64/amd64/pmap.c | 4 ++++ sys/kern/kern_cons.c | 3 +++ sys/kern/link_elf.c | 7 +++++++ sys/kern/subr_boot.c | 5 +++++ sys/kern/subr_kdb.c | 3 +++ sys/kern/subr_param.c | 4 ++++ sys/kern/subr_pcpu.c | 2 ++ sys/kern/subr_prf.c | 3 +++ sys/x86/pci/pci_early_quirks.c | 3 +++ sys/x86/x86/identcpu.c | 7 ++++++- sys/x86/xen/pv.c | 3 +++ 14 files changed, 52 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index a3421cf0d496..1310a27911fe 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -360,6 +361,7 @@ fpuinit(void) u_int mxcsr; u_short control; + TSENTER(); if (IS_BSP()) fpuinit_bsp1(); @@ -401,6 +403,7 @@ fpuinit(void) ldmxcsr(mxcsr); start_emulating(); intr_restore(saveintr); + TSEXIT(); } /* diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index a17ef89ba9f8..0de4bc3e2d60 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -276,6 +276,7 @@ initializecpu(void) uint64_t msr; uint32_t cr4; + TSENTER(); cr4 = rcr4(); if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { cr4 |= CR4_FXSR | CR4_XMM; @@ -311,7 +312,9 @@ initializecpu(void) if (cpu_stdext_feature & CPUID_STDEXT_SMAP) cr4 |= CR4_SMAP; } + TSENTER2("load_cr4"); load_cr4(cr4); + TSEXIT2("load_cr4"); /* Reload cpu ext features to reflect cr4 changes */ if (IS_BSP() && cold) identify_cpu_ext_features(); @@ -340,6 +343,7 @@ initializecpu(void) if (!IS_BSP()) cpu_init_small_core(); + TSEXIT(); } void diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 29a0bd6f9db4..dfd60777110f 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -870,6 +870,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) quad_t dcons_addr, dcons_size; int page_counter; + TSENTER(); /* * Tell the physical memory allocator about pages used to store * the kernel and preloaded data. See kmem_bootstrap_free(). @@ -1125,6 +1126,7 @@ do_next: /* Map the message buffer. */ msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); + TSEXIT(); } static caddr_t diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6de7f955d624..889311d598d6 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1668,6 +1668,7 @@ create_pagetables(vm_paddr_t *firstaddr) #endif int i, j, ndm1g, nkpdpe, nkdmpde; + TSENTER(); /* Allocate page table pages for the direct map */ ndmpdp = howmany(ptoa(Maxmem), NBPDP); if (ndmpdp < 4) /* Minimum 4GB of dirmap */ @@ -1884,6 +1885,7 @@ create_pagetables(vm_paddr_t *firstaddr) } kernel_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); + TSEXIT(); } /* @@ -1906,6 +1908,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) u_long res; int i; + TSENTER(); KERNend = *firstaddr; res = atop(KERNend - (vm_paddr_t)kernphys); @@ -2061,6 +2064,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ load_cr4(rcr4() | CR4_PCIDE); } + TSEXIT(); } /* diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 7c63b8e4ed9c..ff57b2bdfd8a 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,6 +135,7 @@ cninit(void) { struct consdev *best_cn, *cn, **list; + TSENTER(); /* * Check if we should mute the console (for security reasons perhaps) * It can be changes dynamically using sysctl kern.consmute @@ -195,6 +197,7 @@ cninit(void) */ early_putc = NULL; #endif + TSEXIT(); } void diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index b410469b6270..bd8994ff0e4d 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -1431,6 +1432,7 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc, const Elf_Rela *rela; const char *symname; + TSENTER(); #define APPLY_RELOCS(iter, tbl, tblsize, type) do { \ for ((iter) = (tbl); (iter) != NULL && \ (iter) < (tbl) + (tblsize) / sizeof(*(iter)); (iter)++) { \ @@ -1449,12 +1451,15 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc, } while (0) APPLY_RELOCS(rel, ef->rel, ef->relsize, ELF_RELOC_REL); + TSENTER2("ef->rela"); APPLY_RELOCS(rela, ef->rela, ef->relasize, ELF_RELOC_RELA); + TSEXIT2("ef->rela"); APPLY_RELOCS(rel, ef->pltrel, ef->pltrelsize, ELF_RELOC_REL); APPLY_RELOCS(rela, ef->pltrela, ef->pltrelasize, ELF_RELOC_RELA); #undef APPLY_RELOCS + TSEXIT(); return (0); } @@ -1950,6 +1955,7 @@ link_elf_ireloc(caddr_t kmdp) struct elf_file eff; elf_file_t ef; + TSENTER(); ef = &eff; bzero_early(ef, sizeof(*ef)); @@ -1966,6 +1972,7 @@ link_elf_ireloc(caddr_t kmdp) link_elf_preload_parse_symbols(ef); relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true); + TSEXIT(); } #if defined(__aarch64__) || defined(__amd64__) diff --git a/sys/kern/subr_boot.c b/sys/kern/subr_boot.c index 057ffb5b7e08..73e75ba11750 100644 --- a/sys/kern/subr_boot.c +++ b/sys/kern/subr_boot.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #ifdef _KERNEL #define SETENV(k, v) kern_setenv(k, v) @@ -95,12 +96,14 @@ boot_env_to_howto(void) int i, howto; char *val; + TSENTER(); for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) { val = GETENV(howto_names[i].ev); if (val != NULL && strcasecmp(val, "no") != 0) howto |= howto_names[i].mask; FREE(val); } + TSEXIT(); return (howto); } @@ -193,12 +196,14 @@ boot_parse_cmdline_delim(char *cmdline, const char *delim) char *v; int howto; + TSENTER(); howto = 0; while ((v = strsep(&cmdline, delim)) != NULL) { if (*v == '\0') continue; howto |= boot_parse_arg(v); } + TSEXIT(); return (howto); } diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index f8b37c2319b0..2f419b4d8ad5 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -559,6 +560,7 @@ kdb_init(void) struct kdb_dbbe *be, **iter; int cur_pri, pri; + TSENTER(); kdb_active = 0; kdb_dbbe = NULL; cur_pri = -1; @@ -582,6 +584,7 @@ kdb_init(void) printf("KDB: current backend: %s\n", kdb_dbbe->dbbe_name); } + TSEXIT(); } /* diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index bb8cb5871af2..b988f28944cc 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -171,6 +171,7 @@ void init_param1(void) { + TSENTER(); #if !defined(__arm64__) TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages); #endif @@ -245,6 +246,7 @@ init_param1(void) pid_max = 300; TUNABLE_INT_FETCH("vfs.unmapped_buf_allowed", &unmapped_buf_allowed); + TSEXIT(); } /* @@ -254,6 +256,7 @@ void init_param2(long physpages) { + TSENTER(); /* Base parameters */ maxusers = MAXUSERS; TUNABLE_INT_FETCH("kern.maxusers", &maxusers); @@ -335,6 +338,7 @@ init_param2(long physpages) if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64) maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64; + TSEXIT(); } /* diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index c4c220d66c97..c13a52dffccd 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -103,6 +103,7 @@ dpcpu_init(void *dpcpu, int cpuid) { struct pcpu *pcpu; + TSENTER(); pcpu = pcpu_find(cpuid); pcpu->pc_dynamic = (uintptr_t)dpcpu - DPCPU_START; @@ -115,6 +116,7 @@ dpcpu_init(void *dpcpu, int cpuid) * Place it in the global pcpu offset array. */ dpcpu_off[cpuid] = pcpu->pc_dynamic; + TSEXIT(); } static void diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 0506c21b5ad8..db4ef168bc70 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1037,6 +1038,7 @@ msgbufinit(void *ptr, int size) static struct msgbuf *oldp = NULL; bool print_boot_tag; + TSENTER(); size -= sizeof(*msgbufp); cp = (char *)ptr; print_boot_tag = !msgbufmapped; @@ -1052,6 +1054,7 @@ msgbufinit(void *ptr, int size) if (print_boot_tag && *current_boot_tag != '\0') printf("%s\n", current_boot_tag); oldp = msgbufp; + TSEXIT(); } /* Sysctls for accessing/clearing the msgbuf */ diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c index 97ba7e1a0631..ab8072b38d14 100644 --- a/sys/x86/pci/pci_early_quirks.c +++ b/sys/x86/pci/pci_early_quirks.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* XXX: enable this once the KPI is available */ @@ -317,5 +318,7 @@ void pci_early_quirks(void) { + TSENTER(); intel_graphics_stolen(); + TSEXIT(); } diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 42cca3250481..3ff59344e17d 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -1424,6 +1424,7 @@ identify_hypervisor(void) u_int regs[4]; char *p; + TSENTER(); /* * If CPUID2_HV is set, we are running in a hypervisor environment. */ @@ -1432,8 +1433,10 @@ identify_hypervisor(void) identify_hypervisor_cpuid_base(); /* If we have a definitive vendor, we can return now. */ - if (*hv_vendor != '\0') + if (*hv_vendor != '\0') { + TSEXIT(); return; + } } /* @@ -1446,11 +1449,13 @@ identify_hypervisor(void) if (regs[1] == VMW_HVMAGIC) { vm_guest = VM_GUEST_VMWARE; freeenv(p); + TSEXIT(); return; } } freeenv(p); } + TSEXIT(); } bool diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 367214fe35be..b3da26e9b78e 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -417,6 +418,7 @@ xen_pvh_parse_preload_data(uint64_t modulep) char *envp; char acpi_rsdp[19]; + TSENTER(); if (start_info->modlist_paddr != 0) { struct hvm_modlist_entry *mod; const char *cmdline; @@ -507,6 +509,7 @@ xen_pvh_parse_preload_data(uint64_t modulep) #ifdef DDB xen_pvh_parse_symtab(); #endif + TSEXIT(); return (kmdp); } From nobody Sun Jun 4 17:17:58 2023 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 4QZ3N672Vmz4ZMyN; Sun, 4 Jun 2023 17:17:58 +0000 (UTC) (envelope-from git@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 4QZ3N66Y0Zz3xxG; Sun, 4 Jun 2023 17:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899078; 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; bh=SWX4oJ0IxoGDYZt8OZm+FOzn5KWpSsjMpT1eUPsfgpc=; b=XzAQ6V2WbK34/Gan29+gxcGC5eYmzJlVl8fjzwsNacfGZNC/xv0vHgZZX2nQgCAzVUQtJD hAef6Ag+4s5I1hbsBNySvvOvI4lA2fo6BZ+TRjxhWs3U0lRv6geJJjI3yO9kPkoxGI1CFQ JaNZprlkcTIR9QO1RQ5P6rhzlaHa0i5yYvLJZ74yehU0L4Aq3dPIXFTj5uH2veK8lk8oi4 hamATMBNwLLfRK0P4ofkJO3TfSvgQxgBgHCycUi8L4jQm9e4r4tqaSzHUfisKfFxisyh4+ c+5ZhizCETe8TLhIk+bVOPsDs8ERMAEGKmL/f8+ck+H6CGalXqsHFavIQ0BgaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899078; 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; bh=SWX4oJ0IxoGDYZt8OZm+FOzn5KWpSsjMpT1eUPsfgpc=; b=DAZgdWbxTOSfgZuu/rhnWnNeqMq5zUWgeJmLcgfL4EI2hYlGErpXfnJ9YWheF+r+P+vTtx JBI/04F+xn0DsPujE57JV9B/SVu0qtbk4ov2xZW0BeYMmjYUiE0iTFyA+IRCD63Mxaa4Ea ItVz7//d4iZCQU1PxBRAL987+suZ4kOer0oKfSMbwhrnA4qpUvDKXIE6XBrMWnhvD+a4Qx LsG31myQGnyp9jtDrThEGGoKnKx99vXFraPNut7lv0KG2q++QpDUDdgY6+JGVNCFWnIf0S 5vVT3LmT2JSRVlIIH17rP/q588uz4BudeRx1OEM4yPZIgJmal1+xxSc8pEN+dg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685899078; a=rsa-sha256; cv=none; b=HveN2cEi5VOYSLfYWFLO6j5H4pxCGYOlNfwzH6du2RRxU7BBBobDuu7mL1gHOEMF2f1X+A 4x7DUeeNj2Dk6xJP7MCfS75A2RLUvPBc5M0dzZB3CCufdEP7Mma+9QMM/98754Fg8HiUEi NqAhM6r2cwmssosP2/D80e+K1zAXG+ITzyWUtKy+04P5rkzFYoZqWODSPTtnA1T+ASPxlT UNo/wjI0Go8xRvOCCkIDjJltYaWVlgMdE2RTRXuu0JUiYKlBlghiRjHa+Kk8YrBSwcRphp nYUSYUvhTY3ECN1mYxXrFcvoNOghhugQBfCawyO+j1Qb5IcLPJX/jh8UqCU/Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ3N65VgDzFjQ; Sun, 4 Jun 2023 17:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354HHw6W009981; Sun, 4 Jun 2023 17:17:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354HHwUi009980; Sun, 4 Jun 2023 17:17:58 GMT (envelope-from git) Date: Sun, 4 Jun 2023 17:17:58 GMT Message-Id: <202306041717.354HHwUi009980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 2404380aac7e - main - tslog: Optionally instrument pmap_zero_page 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2404380aac7eaf8019aa0939224bbce2d561d01f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2404380aac7eaf8019aa0939224bbce2d561d01f commit 2404380aac7eaf8019aa0939224bbce2d561d01f Author: Colin Percival AuthorDate: 2023-05-29 23:03:14 +0000 Commit: Colin Percival CommitDate: 2023-06-04 17:16:31 +0000 tslog: Optionally instrument pmap_zero_page Booting an amd64 kernel on Firecracker with 1 CPU and 128 MB of RAM, pmap_zero_page is responsible for 4.6 ms of the 25.0 ms of boot time. This is not in fact time spent zeroing pages though; almost all of that time is spent in a first-touch penalty, presumably due to the host Linux kernel faulting in backing pages one by one. There's probably a way to improve that by teaching Firecracker to fault in all the VM's pages from the start rather than having them faulted in one at a time, but that's outside of FreeBSD's control. This commit adds a TSLOG_PAGEZERO option which enables TSLOG on the amd64 pmap_zero_page function; it's a separate option (turned off by default even if TSLOG is enabled) since zeroing pages happens enough that it can easily fill the TSLOG buffer and prevent other timing information from being recorded. Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D40326 --- sys/amd64/amd64/pmap.c | 9 ++++++++- sys/conf/NOTES | 3 +++ sys/conf/options | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 889311d598d6..657ba67cd619 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -8155,9 +8155,16 @@ pmap_vmspace_copy(pmap_t dst_pmap, pmap_t src_pmap) void pmap_zero_page(vm_page_t m) { - vm_offset_t va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); + vm_offset_t va; +#ifdef TSLOG_PAGEZERO + TSENTER(); +#endif + va = PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)); pagezero((void *)va); +#ifdef TSLOG_PAGEZERO + TSEXIT(); +#endif } /* diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 8725d11a5434..23ec7b5c45c9 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -615,6 +615,9 @@ options NUM_CORE_FILES=5 # before it is possible to use more sophisticated tools like DTrace. # The TSLOGSIZE option controls the size of the (preallocated, fixed # length) buffer used for storing these events (default: 262144 records). +# The TSLOG_PAGEZERO option enables TSLOG of pmap_zero_page; this must be +# enabled separately since it typically generates too many records to be +# useful. # # For security reasons the TSLOG option should not be enabled on systems # used in production. diff --git a/sys/conf/options b/sys/conf/options index a8b441e320cb..7a34fa0f7333 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -67,6 +67,7 @@ SYSCTL_DEBUG opt_sysctl.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h TSLOG opt_global.h +TSLOG_PAGEZERO opt_global.h TSLOGSIZE opt_global.h # Miscellaneous options. From nobody Sun Jun 4 17:17:59 2023 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 4QZ3N819ZNz4ZMsd; Sun, 4 Jun 2023 17:18:00 +0000 (UTC) (envelope-from git@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 4QZ3N80Mzqz3xw2; Sun, 4 Jun 2023 17:18:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899080; 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; bh=rL2mF/20oyfUVVD26znBTD1J9DCORXpRC7YII4ayjYg=; b=iWSy/1ZNAZRKG8ybjP876G/P+X1uO4YA/irLYkRP/WD30Sc6oapTdCWc4ixYyWQ0EPa1lA x3BXjrdBZ4V7q2/8G2YaKtnhBSqWc60kvOJnS//qcwBSIfq3VWAbXQ/xIJrfwR1cxFvWFS IjsgPQAPFHEQmYbS2BD5/M/z+0zXlXaLDipz3uGiky4gtwv7Cwr1Z/0U3bVtJKV3g9coF5 vfX8AxPhtQ2hSqObJPzMSqFlHP6gFU5bsYM9abcgzAZ2nqskdR/lz9W4b+bJ5U7175XD77 fAKdy/Xmw/7T7t+4iV3qjJD/iTcr5uLra77b2IrlIUnNivvnuRHBrrgydKaVWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685899080; 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; bh=rL2mF/20oyfUVVD26znBTD1J9DCORXpRC7YII4ayjYg=; b=wev4uVOWW4y9bF+NWAwuR/HWrYkmKYyb+R3aJ0lwkMwuzGMIeQ05zNDoxIXCdbHrp85Ef0 t50w/WSWuez/5OzU6pUAJoC1QY4IhteACxy5A6707jVqQyH7ZaasctNbaCzCPR2jguhXHb 7F7+YJX6dajwEHWEgrFd9lTE1t2a24izrKstnlIrZpN1U33w8ie92ire6pPxMz/kIS+7bt KyGEVVzFadeu8I/cySTJyUdCKFY9cUG/uz++2EkboP0t4jPGWKoq0BfhLWUnzt9KcIJsb/ o2EiqPUXrEVPnYAB7bf54NcxgZKclUSvQ+AI6z5qYom1iXm0H0QtcRbMRIjM2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685899080; a=rsa-sha256; cv=none; b=MKzpDNcT6cFCHqXvy7v0+dxRxdl9kh/dN2wWeDgxzQp1QL89o9fNzuIDIX76MM2XG+YsE7 yKSyR8OPPY6HH7kgDoMzQ8s6+hLj7ucP7Kjs6piS1YItFL5Tg1FSTcUGXKCeB57SJKxYek AAq7THIr+GNyqwLFi3OG/0iY51Fs8wyc6PPYhMoEHkKzMRelyY7f5apcQGI+Obbzs8cJ49 zDZwGH61kVUowpPSHD6qbPlx1YcGT2VhakZGmthOhEMbm5EXffco/hwYjaHY9oTt7DY1OQ QuF4Fo6yYmr0dru7TvTxafJu97ZEUx5iBHslMsphCVWv0BPjEuxpm0pZ3hMFww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ3N76b3DzFcX; Sun, 4 Jun 2023 17:17:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354HHxN0010000; Sun, 4 Jun 2023 17:17:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354HHxKO009999; Sun, 4 Jun 2023 17:17:59 GMT (envelope-from git) Date: Sun, 4 Jun 2023 17:17:59 GMT Message-Id: <202306041717.354HHxKO009999@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 45cc8519f590 - main - tslog: Annotate parts of SYSINIT cpu 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45cc8519f5900574826dfd22c851b136023d044e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=45cc8519f5900574826dfd22c851b136023d044e commit 45cc8519f5900574826dfd22c851b136023d044e Author: Colin Percival AuthorDate: 2023-05-30 00:29:24 +0000 Commit: Colin Percival CommitDate: 2023-06-04 17:16:35 +0000 tslog: Annotate parts of SYSINIT cpu Booting an amd64 kernel on Firecracker with 1 CPU and 128 MB of RAM, SYSINIT cpu takes roughly 2770 us: * 2280 us in vm_ksubmap_init * 535 us in kmem_malloc * 450 us in pmap_zero_page * 1720 us in pmap_growkernel * 1620 us in pmap_zero_page * 80 us in bufinit * 480 us in cpu_setregs * 430 us in cpu_setregs calling load_cr0 Much of this is hypervisor overhead: load_cr0 is slow because it traps to the hypervisor, and 99% of the time in pmap_zero_page is spent when we first touch the page, presumably due to the host Linux kernel faulting in backing pages one by one. Sponsored by: https://www.patreon.com/cperciva Differential Revision: https://reviews.freebsd.org/D40327 --- sys/amd64/amd64/machdep.c | 4 ++++ sys/amd64/amd64/pmap.c | 7 ++++++- sys/kern/vfs_bio.c | 2 ++ sys/vm/vm_init.c | 2 ++ sys/vm/vm_kern.c | 12 ++++++++++-- 5 files changed, 24 insertions(+), 3 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index dfd60777110f..fa3ffe84bfe1 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -326,13 +326,17 @@ cpu_setregs(void) { register_t cr0; + TSENTER(); cr0 = rcr0(); /* * CR0_MP, CR0_NE and CR0_TS are also set by npx_probe() for the * BSP. See the comments there about why we set them. */ cr0 |= CR0_MP | CR0_NE | CR0_TS | CR0_WP | CR0_AM; + TSENTER2("load_cr0"); load_cr0(cr0); + TSEXIT2("load_cr0"); + TSEXIT(); } /* diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 657ba67cd619..123811ed573f 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -5049,6 +5049,7 @@ pmap_growkernel(vm_offset_t addr) pdp_entry_t *pdpe; vm_offset_t end; + TSENTER(); mtx_assert(&kernel_map->system_mtx, MA_OWNED); /* @@ -5075,8 +5076,10 @@ pmap_growkernel(vm_offset_t addr) */ if (KERNBASE < addr) { end = KERNBASE + nkpt * NBPDR; - if (end == 0) + if (end == 0) { + TSEXIT(); return; + } } else { end = kernel_vm_end; } @@ -5089,6 +5092,7 @@ pmap_growkernel(vm_offset_t addr) * The grown region is already mapped, so there is * nothing to do. */ + TSEXIT(); return; } @@ -5136,6 +5140,7 @@ pmap_growkernel(vm_offset_t addr) kernel_vm_end = end; else nkpt = howmany(end - KERNBASE, NBPDR); + TSEXIT(); } /*************************************************** diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index a76ea26d8859..cf01d2a239ea 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1201,6 +1201,7 @@ bufinit(void) struct buf *bp; int i; + TSENTER(); KASSERT(maxbcachebuf >= MAXBSIZE, ("maxbcachebuf (%d) must be >= MAXBSIZE (%d)\n", maxbcachebuf, MAXBSIZE)); @@ -1336,6 +1337,7 @@ bufinit(void) buffreekvacnt = counter_u64_alloc(M_WAITOK); bufdefragcnt = counter_u64_alloc(M_WAITOK); bufkvaspace = counter_u64_alloc(M_WAITOK); + TSEXIT(); } #ifdef INVARIANTS diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index c5a58c7a0ac7..86b1ade64cb6 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -156,6 +156,7 @@ vm_ksubmap_init(struct kva_md_info *kmi) vm_offset_t minaddr; vm_offset_t maxaddr; + TSENTER(); /* * Allocate space for system data structures. * The first available kernel virtual address is in "v". @@ -252,4 +253,5 @@ again: exec_map_entries * exec_map_entry_size + 64 * PAGE_SIZE, false); kmem_subinit(pipe_map, kernel_map, &minaddr, &maxaddr, maxpipekva, false); + TSEXIT(); } diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 10fe07cc86da..8b4e69dbebc2 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -451,8 +451,12 @@ kmem_malloc_domain(int domain, vm_size_t size, int flags) void * kmem_malloc(vm_size_t size, int flags) { + void * p; - return (kmem_malloc_domainset(DOMAINSET_RR(), size, flags)); + TSENTER(); + p = kmem_malloc_domainset(DOMAINSET_RR(), size, flags); + TSEXIT(); + return (p); } void * @@ -731,17 +735,21 @@ kva_import(void *unused, vmem_size_t size, int flags, vmem_addr_t *addrp) vm_offset_t addr; int result; + TSENTER(); KASSERT((size % KVA_QUANTUM) == 0, ("kva_import: Size %jd is not a multiple of %d", (intmax_t)size, (int)KVA_QUANTUM)); addr = vm_map_min(kernel_map); result = vm_map_find(kernel_map, NULL, 0, &addr, size, 0, VMFS_SUPER_SPACE, VM_PROT_ALL, VM_PROT_ALL, MAP_NOFAULT); - if (result != KERN_SUCCESS) + if (result != KERN_SUCCESS) { + TSEXIT(); return (ENOMEM); + } *addrp = addr; + TSEXIT(); return (0); } From nobody Sun Jun 4 18:42:37 2023 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 4QZ5Fn2pgLz4Zd71; Sun, 4 Jun 2023 18:42:37 +0000 (UTC) (envelope-from git@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 4QZ5Fn1ymXz49GQ; Sun, 4 Jun 2023 18:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685904157; 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; bh=8K2KwWmDDzF0MFBFQXT2vR/n6g6dtmRE9EaVC9n9DI4=; b=mUjv9ET5TtIwz5+sZFI6fHDjgJ6P4xhzp8fzJIDcXJ1X/lCgbEXwIY4SoWOzlOsUl0SiH0 znG6cG8lVMf3K1YL91TV3WfwXjAcTHZbTORIsWlreTeMz65NLFUHZKBh0trxzxe3W9q4kq s9tB7PNhNHrexy2nw+Tt9TIBH8H87dRpsnTtter54v9GFLzCqPRENpTABdAExTSq+zVFsO l8DAD6m/qivhvRpOzgwmAr1zgFE5fgmiQivnPR30X/jNLruX8Fdk5f/LeHh6ZfNDLYrZlE RqjBC/w15C0+VuYu0kLSz5h3CGrqjixXATb5rXkcyLkS3mFEtVnmKYaqrRNLdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685904157; 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; bh=8K2KwWmDDzF0MFBFQXT2vR/n6g6dtmRE9EaVC9n9DI4=; b=OIPanPaFw46+svz/ZnJjVpgYy0LANsKHuDC0t2sAH95b3xjlEiiF8S7kWg5GpoZF1nruSY DMPTg0gLeM6vJ8daH//Q/RAvl+qp1tN0F0Ji5JEm6tSZ1ZPcCm60LfrZ6+AR9vxdsJbAgF JL/7BdoEClxq0m9OWnh99NqD+O5PJ0nG/HUlowTffua5XymKhyWsL2MNpv8qqmKqsGqgKh k6DPfSSBuEdVS+zahFwNjy7qAz9Dn7dDkuFNx9OCPIKOxsy7BkKa2jkpZGh7jNdtJs99Ff LrO5YGyYFUJNzkqfHb/xDlUwD59/F1ICQGt5r6twYVNLsowHuyqoBOF5/lZw2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685904157; a=rsa-sha256; cv=none; b=pjiP9tf1hL2TM4JN2r9x7dbSY7Fz/BepLPeqtqsSEnUtMc645l9cs+7RsxLQVoBdEAWH5f AofhBHQB+DbV1CAiipMGbuHTEy2qgNNFM8NdKr87TBqw4nH8yFc/bEs3oNqrp0uFN+pnMw 77f8KX8db6foUQ3JAtnXrs/tE+hKL+Nfhprv6iGyVeo+gQVWQj/YAOHfPbYCnk2+8LDSK2 dwPZRyDtFKZV+lRv2TGFYKth6P3DFX+oYS+RavE4CoptU18j0clBn7hDPksqAVG2iX2nvS PGwGyl9c73zkXoxsMG7IbFlZfRxshw+/LtOuK3k1GWbRX763QAqcIiPCqpBUnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ5Fn12X3zHbV; Sun, 4 Jun 2023 18:42:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354IgbPE057426; Sun, 4 Jun 2023 18:42:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354IgbOj057425; Sun, 4 Jun 2023 18:42:37 GMT (envelope-from git) Date: Sun, 4 Jun 2023 18:42:37 GMT Message-Id: <202306041842.354IgbOj057425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 59588a546f55 - main - Revert "tslog: Annotate some early boot functions" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 59588a546f55523d6fd37ab42eb08b719311d7d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=59588a546f55523d6fd37ab42eb08b719311d7d6 commit 59588a546f55523d6fd37ab42eb08b719311d7d6 Author: Colin Percival AuthorDate: 2023-06-04 18:39:45 +0000 Commit: Colin Percival CommitDate: 2023-06-04 18:39:45 +0000 Revert "tslog: Annotate some early boot functions" The change to subr_boot.c broke the libsa build because the TSLOG macros have their own definitions for the boot loader -- I didn't realize that the loader code used subr_boot.c. I'm currently testing a fix and I'll revert this revert once I'm satisfied that everything works, but I don't want to leave the tree broken for too long. This reverts commit 469cfa3c30ee7a5ddeb597d0a8c3e7cac909b27a. --- sys/amd64/amd64/fpu.c | 3 --- sys/amd64/amd64/initcpu.c | 4 ---- sys/amd64/amd64/machdep.c | 2 -- sys/amd64/amd64/pmap.c | 4 ---- sys/kern/kern_cons.c | 3 --- sys/kern/link_elf.c | 7 ------- sys/kern/subr_boot.c | 5 ----- sys/kern/subr_kdb.c | 3 --- sys/kern/subr_param.c | 4 ---- sys/kern/subr_pcpu.c | 2 -- sys/kern/subr_prf.c | 3 --- sys/x86/pci/pci_early_quirks.c | 3 --- sys/x86/x86/identcpu.c | 7 +------ sys/x86/xen/pv.c | 3 --- 14 files changed, 1 insertion(+), 52 deletions(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index 1310a27911fe..a3421cf0d496 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -361,7 +360,6 @@ fpuinit(void) u_int mxcsr; u_short control; - TSENTER(); if (IS_BSP()) fpuinit_bsp1(); @@ -403,7 +401,6 @@ fpuinit(void) ldmxcsr(mxcsr); start_emulating(); intr_restore(saveintr); - TSEXIT(); } /* diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index 0de4bc3e2d60..a17ef89ba9f8 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -276,7 +276,6 @@ initializecpu(void) uint64_t msr; uint32_t cr4; - TSENTER(); cr4 = rcr4(); if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { cr4 |= CR4_FXSR | CR4_XMM; @@ -312,9 +311,7 @@ initializecpu(void) if (cpu_stdext_feature & CPUID_STDEXT_SMAP) cr4 |= CR4_SMAP; } - TSENTER2("load_cr4"); load_cr4(cr4); - TSEXIT2("load_cr4"); /* Reload cpu ext features to reflect cr4 changes */ if (IS_BSP() && cold) identify_cpu_ext_features(); @@ -343,7 +340,6 @@ initializecpu(void) if (!IS_BSP()) cpu_init_small_core(); - TSEXIT(); } void diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index fa3ffe84bfe1..757606311123 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -874,7 +874,6 @@ getmemsize(caddr_t kmdp, u_int64_t first) quad_t dcons_addr, dcons_size; int page_counter; - TSENTER(); /* * Tell the physical memory allocator about pages used to store * the kernel and preloaded data. See kmem_bootstrap_free(). @@ -1130,7 +1129,6 @@ do_next: /* Map the message buffer. */ msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); - TSEXIT(); } static caddr_t diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 123811ed573f..b2abab429730 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1668,7 +1668,6 @@ create_pagetables(vm_paddr_t *firstaddr) #endif int i, j, ndm1g, nkpdpe, nkdmpde; - TSENTER(); /* Allocate page table pages for the direct map */ ndmpdp = howmany(ptoa(Maxmem), NBPDP); if (ndmpdp < 4) /* Minimum 4GB of dirmap */ @@ -1885,7 +1884,6 @@ create_pagetables(vm_paddr_t *firstaddr) } kernel_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); - TSEXIT(); } /* @@ -1908,7 +1906,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) u_long res; int i; - TSENTER(); KERNend = *firstaddr; res = atop(KERNend - (vm_paddr_t)kernphys); @@ -2064,7 +2061,6 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ load_cr4(rcr4() | CR4_PCIDE); } - TSEXIT(); } /* diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index ff57b2bdfd8a..7c63b8e4ed9c 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -135,7 +134,6 @@ cninit(void) { struct consdev *best_cn, *cn, **list; - TSENTER(); /* * Check if we should mute the console (for security reasons perhaps) * It can be changes dynamically using sysctl kern.consmute @@ -197,7 +195,6 @@ cninit(void) */ early_putc = NULL; #endif - TSEXIT(); } void diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index bd8994ff0e4d..b410469b6270 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -1432,7 +1431,6 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc, const Elf_Rela *rela; const char *symname; - TSENTER(); #define APPLY_RELOCS(iter, tbl, tblsize, type) do { \ for ((iter) = (tbl); (iter) != NULL && \ (iter) < (tbl) + (tblsize) / sizeof(*(iter)); (iter)++) { \ @@ -1451,15 +1449,12 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc, } while (0) APPLY_RELOCS(rel, ef->rel, ef->relsize, ELF_RELOC_REL); - TSENTER2("ef->rela"); APPLY_RELOCS(rela, ef->rela, ef->relasize, ELF_RELOC_RELA); - TSEXIT2("ef->rela"); APPLY_RELOCS(rel, ef->pltrel, ef->pltrelsize, ELF_RELOC_REL); APPLY_RELOCS(rela, ef->pltrela, ef->pltrelasize, ELF_RELOC_RELA); #undef APPLY_RELOCS - TSEXIT(); return (0); } @@ -1955,7 +1950,6 @@ link_elf_ireloc(caddr_t kmdp) struct elf_file eff; elf_file_t ef; - TSENTER(); ef = &eff; bzero_early(ef, sizeof(*ef)); @@ -1972,7 +1966,6 @@ link_elf_ireloc(caddr_t kmdp) link_elf_preload_parse_symbols(ef); relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true); - TSEXIT(); } #if defined(__aarch64__) || defined(__amd64__) diff --git a/sys/kern/subr_boot.c b/sys/kern/subr_boot.c index 73e75ba11750..057ffb5b7e08 100644 --- a/sys/kern/subr_boot.c +++ b/sys/kern/subr_boot.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #endif #include #include -#include #ifdef _KERNEL #define SETENV(k, v) kern_setenv(k, v) @@ -96,14 +95,12 @@ boot_env_to_howto(void) int i, howto; char *val; - TSENTER(); for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) { val = GETENV(howto_names[i].ev); if (val != NULL && strcasecmp(val, "no") != 0) howto |= howto_names[i].mask; FREE(val); } - TSEXIT(); return (howto); } @@ -196,14 +193,12 @@ boot_parse_cmdline_delim(char *cmdline, const char *delim) char *v; int howto; - TSENTER(); howto = 0; while ((v = strsep(&cmdline, delim)) != NULL) { if (*v == '\0') continue; howto |= boot_parse_arg(v); } - TSEXIT(); return (howto); } diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 2f419b4d8ad5..f8b37c2319b0 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -560,7 +559,6 @@ kdb_init(void) struct kdb_dbbe *be, **iter; int cur_pri, pri; - TSENTER(); kdb_active = 0; kdb_dbbe = NULL; cur_pri = -1; @@ -584,7 +582,6 @@ kdb_init(void) printf("KDB: current backend: %s\n", kdb_dbbe->dbbe_name); } - TSEXIT(); } /* diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index b988f28944cc..bb8cb5871af2 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -171,7 +171,6 @@ void init_param1(void) { - TSENTER(); #if !defined(__arm64__) TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages); #endif @@ -246,7 +245,6 @@ init_param1(void) pid_max = 300; TUNABLE_INT_FETCH("vfs.unmapped_buf_allowed", &unmapped_buf_allowed); - TSEXIT(); } /* @@ -256,7 +254,6 @@ void init_param2(long physpages) { - TSENTER(); /* Base parameters */ maxusers = MAXUSERS; TUNABLE_INT_FETCH("kern.maxusers", &maxusers); @@ -338,7 +335,6 @@ init_param2(long physpages) if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64) maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64; - TSEXIT(); } /* diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index c13a52dffccd..c4c220d66c97 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -103,7 +103,6 @@ dpcpu_init(void *dpcpu, int cpuid) { struct pcpu *pcpu; - TSENTER(); pcpu = pcpu_find(cpuid); pcpu->pc_dynamic = (uintptr_t)dpcpu - DPCPU_START; @@ -116,7 +115,6 @@ dpcpu_init(void *dpcpu, int cpuid) * Place it in the global pcpu offset array. */ dpcpu_off[cpuid] = pcpu->pc_dynamic; - TSEXIT(); } static void diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index db4ef168bc70..0506c21b5ad8 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -1038,7 +1037,6 @@ msgbufinit(void *ptr, int size) static struct msgbuf *oldp = NULL; bool print_boot_tag; - TSENTER(); size -= sizeof(*msgbufp); cp = (char *)ptr; print_boot_tag = !msgbufmapped; @@ -1054,7 +1052,6 @@ msgbufinit(void *ptr, int size) if (print_boot_tag && *current_boot_tag != '\0') printf("%s\n", current_boot_tag); oldp = msgbufp; - TSEXIT(); } /* Sysctls for accessing/clearing the msgbuf */ diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c index ab8072b38d14..97ba7e1a0631 100644 --- a/sys/x86/pci/pci_early_quirks.c +++ b/sys/x86/pci/pci_early_quirks.c @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* XXX: enable this once the KPI is available */ @@ -318,7 +317,5 @@ void pci_early_quirks(void) { - TSENTER(); intel_graphics_stolen(); - TSEXIT(); } diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 3ff59344e17d..42cca3250481 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -1424,7 +1424,6 @@ identify_hypervisor(void) u_int regs[4]; char *p; - TSENTER(); /* * If CPUID2_HV is set, we are running in a hypervisor environment. */ @@ -1433,10 +1432,8 @@ identify_hypervisor(void) identify_hypervisor_cpuid_base(); /* If we have a definitive vendor, we can return now. */ - if (*hv_vendor != '\0') { - TSEXIT(); + if (*hv_vendor != '\0') return; - } } /* @@ -1449,13 +1446,11 @@ identify_hypervisor(void) if (regs[1] == VMW_HVMAGIC) { vm_guest = VM_GUEST_VMWARE; freeenv(p); - TSEXIT(); return; } } freeenv(p); } - TSEXIT(); } bool diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index b3da26e9b78e..367214fe35be 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -418,7 +417,6 @@ xen_pvh_parse_preload_data(uint64_t modulep) char *envp; char acpi_rsdp[19]; - TSENTER(); if (start_info->modlist_paddr != 0) { struct hvm_modlist_entry *mod; const char *cmdline; @@ -509,7 +507,6 @@ xen_pvh_parse_preload_data(uint64_t modulep) #ifdef DDB xen_pvh_parse_symtab(); #endif - TSEXIT(); return (kmdp); } From nobody Sun Jun 4 19:52:52 2023 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 4QZ6pr3w93z4ZsHx; Sun, 4 Jun 2023 19:52:52 +0000 (UTC) (envelope-from git@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 4QZ6pr3NGVz4KpK; Sun, 4 Jun 2023 19:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685908372; 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; bh=RIeqLpcd5uN7jwCjfWAlKwDjd6PbgMHSM8pN8qwOPZY=; b=vN6yuKwXmVmGDV4aZ6FMjTeVI5o2HNvXFvuXIpDc/PYr420ubicHRfeUiTsLsgQ4kCm4xq a1MeZOtiZVgL21uiXyZYasvkweKR3ZvM/rX8ElV4dkT7jmmPnDX9b0qWOKO513V+DT+9O5 QVcAX90HjOKWFd7GNWnkzwlvcOFsSMn1r9TVumdWkfohWMAs0pl3l9IyLPb51jRtLVcZIt XaFbU2xe0JKbVvV9Qiq1uo2sATqpUWEzLXF5438s0+NYV6RVgawhsuweSOqUF0ude8K7jc J7nC1mfgjOC1aLYUyGXPC7arhyCyhAP6DzhVLNJmTJWC6sQ3iDgXPhaf8nl2Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685908372; 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; bh=RIeqLpcd5uN7jwCjfWAlKwDjd6PbgMHSM8pN8qwOPZY=; b=qT58t1hdvJLLiLgmFeN4Zlb2Ce/yWwE19wenOwARJfC58yLLsTgogTiDzAsDNtYu6aeJUM z6aYBb7TXTCBLY1s3iv+WzCQZMB9srWsUvWT4TE8MWa3IgQVFtwm0bL8LuZyLkqzc/S4y/ lHmyCLsdN8dMB7xegqV0049YSbM7lieBmfuC6DHD3YOofkQEvJCg6/UyKpwxMuBwfgm7mn 0D5b/Sr455+nkoARTWdDigwTULHOEc1yn3e5kFJCDpRU1w/bIiL9Cu8/WH/MfALfsLhBTh Sprgw2zuYQxlBRLYf/cBTOynNWeuhV4W8gfy+5Sx4wmLGeGoBWg6ahJMeXCMBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685908372; a=rsa-sha256; cv=none; b=icvCbHjIwOF37hTNhigprEbACxc8M5ltepVEherzIa8ZxrZRfdvpsDoJJkw4roV4zJzv00 eJ7Q0KfTBxHkdb0p8wGdTBP6jVrVHcESu76IMEVLJrnTdzLuBYzKmN4RoKZqnrIfun0U0T vbiZTo7uJTrAJB9p3uB+QaWt4bLFo3jY8jPiZbXx9UOgMLKy37n8isppEqePXfU2+OS0Py moGAhMIg/HT+qoVMDuf9yijI0S9MYjwn1oQyFp0kRrkBAdTrDLjD+0xpktAZ1QhJC909Nr WvWl+Is7bQtPxny5xRzAgaVaBcNNaaowSrVnBecHdXpu4k6nQImKaE8OVJjXdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZ6pr2R0tzK3h; Sun, 4 Jun 2023 19:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354JqqCU072575; Sun, 4 Jun 2023 19:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354Jqq4v072574; Sun, 4 Jun 2023 19:52:52 GMT (envelope-from git) Date: Sun, 4 Jun 2023 19:52:52 GMT Message-Id: <202306041952.354Jqq4v072574@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 6fa30de4d3ca - main - nfsuserd.8: Change machines to machine's 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6fa30de4d3caf5be3fd4dd44bf73fda0fb7616c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=6fa30de4d3caf5be3fd4dd44bf73fda0fb7616c5 commit 6fa30de4d3caf5be3fd4dd44bf73fda0fb7616c5 Author: Rick Macklem AuthorDate: 2023-06-04 19:52:04 +0000 Commit: Rick Macklem CommitDate: 2023-06-04 19:52:04 +0000 nfsuserd.8: Change machines to machine's Change machines to machine's. Suggested by: grahamperrin Differential Revision: https://reviews.freebsd.org/D39877 --- usr.sbin/nfsuserd/nfsuserd.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/nfsuserd/nfsuserd.8 b/usr.sbin/nfsuserd/nfsuserd.8 index 9fff5cd12a30..1912043668b5 100644 --- a/usr.sbin/nfsuserd/nfsuserd.8 +++ b/usr.sbin/nfsuserd/nfsuserd.8 @@ -53,7 +53,7 @@ owner and owner_group strings. It also provides support for manage-gids and must be running on the server if this is being used for any version of NFS. .Pp -Upon startup, it loads the machines DNS domain name, plus timeout and cache size +Upon startup, it loads the machine's DNS domain name, plus timeout and cache size limit into the kernel. It then preloads the cache with group and user information, up to the cache size limit and forks off From nobody Sun Jun 4 23:35:08 2023 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 4QZClK2ZGyz4Zc9d; Sun, 4 Jun 2023 23:35:09 +0000 (UTC) (envelope-from git@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 4QZClK1WJWz3spm; Sun, 4 Jun 2023 23:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685921709; 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; bh=OuJd66LnZYrw1sFkaeWN2zPxNViiV254c3bpcOtbojM=; b=Pd0VcDHWe1qQRBtUSHlVj7OWpOeuC2+55SnjraEblCc46OTjbbUDQxQCuaS3M2pXKehSmb J2VYJdIIy5yzqbBk8tJi0v7klsIpMOUVBLHNmJOQz4qP2BjDHtGaqvHH93yt7OJCv7lmlQ pOPUqjhg27wt8BtlNyLGqAHmOhtT6PA6EGRNKH1HrmY0jbLtVfepdMbJBU9PYZV41ERr0D 5WY4CvNdCT20EOFkw/D/f8OBpdQrxYQinMX8pmEnMGh8EmSzwYs4uasVrOLNRxPT/RaCAe j829li55OjnUYmBO0nQeJAddrKkOUk1sh+oJZfIc7xyvKiPIMavTc2QjB6j31g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685921709; 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; bh=OuJd66LnZYrw1sFkaeWN2zPxNViiV254c3bpcOtbojM=; b=xKHcIcPNTpn9Rp+HUpA7DUEuDyIdGyByNOwhpTsLHnFuUyMIRElYt1EpdFDySyfkofRvUs Cuut+POpn0uZ/SrtvNuD74Q58CdvArWkdaqaX3AE+w56dM/PXY8d5D4jfG13U/vp7Oiy3V yUFy3Gst5/KIkccCvC24U+owOc4btHFnQ1B1Otqf7nz+6fH9lCtdeajg1lqW083sBVwJ4W o1KMaiicSfVAxlIRLGo/XXc7MhfhypoDVwgPI7HleYabcWuuJ4pec0KDIrTkgADhfpJ0U3 +6yWwg4DV3/RAkmWL12yLNaaLtFWbLw5kzELZm9iZ0Htq/Dt9TlSdVMjcqQ0ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685921709; a=rsa-sha256; cv=none; b=DPAj3XUGSPlovcNCn+UQdcfaFJEmkoKZsvHF7Qi5NgMNAD81r3/xkgB2yhtnP9PS1t/Quo gDGz6Rxeer1zrQ84s62SkcJ3aQciCjuQW7aZpc6pgdtmr1LkevxLvxw68+Y1HsvQc8Apeg FAtfT7kS4rBCfKF8tJwpFqDL7BEGXglkbKpavlh0v/Yl/Pd/1LH/1Fpfs3xIMF0h6rOIfB fzvqOW3Xv4PoupXlq6uxxzgfaaOccI+06qPGcOK1A04uhjwaFtyLcnPsarcg/+zhcVI8gN +KHMZnIbuRSs4LS+ZtPq7/WqSbcEkbJb6Qx03bplYltWDx+SthR5SahiG+qp9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZClK0YvvzQZt; Sun, 4 Jun 2023 23:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 354NZ8SV034610; Sun, 4 Jun 2023 23:35:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354NZ8cX034609; Sun, 4 Jun 2023 23:35:08 GMT (envelope-from git) Date: Sun, 4 Jun 2023 23:35:08 GMT Message-Id: <202306042335.354NZ8cX034609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 4d779448adb3 - main - gve: Fix build on i386 and enable LINT builds. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4d779448adb32ef6424abb781dab87065964d42f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=4d779448adb32ef6424abb781dab87065964d42f commit 4d779448adb32ef6424abb781dab87065964d42f Author: Xin LI AuthorDate: 2023-06-04 23:35:00 +0000 Commit: Xin LI CommitDate: 2023-06-04 23:35:00 +0000 gve: Fix build on i386 and enable LINT builds. Reviewed-by: imp Differential Revision: https://reviews.freebsd.org/D40419 --- share/man/man4/Makefile | 5 +---- sys/amd64/conf/LINT-NOIP | 1 + sys/amd64/conf/NOTES | 3 +++ sys/arm64/conf/NOTES | 3 +++ sys/dev/gve/gve_qpl.c | 6 +++--- sys/i386/conf/NOTES | 3 +++ sys/modules/Makefile | 5 +---- 7 files changed, 15 insertions(+), 11 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 9149a562383f..2567cde793ee 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -891,15 +891,12 @@ _nvme.4= nvme.4 .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ ${MACHINE_CPUARCH} == "aarch64" +_gve.4= gve.4 _ipmi.4= ipmi.4 _linux.4= linux.4 _ossl.4= ossl.4 .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "aarch64" -_gve.4= gve.4 -.endif - .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "riscv" _cgem.4= cgem.4 diff --git a/sys/amd64/conf/LINT-NOIP b/sys/amd64/conf/LINT-NOIP index 0d4ec1e8c1ac..05b1ce75f57f 100644 --- a/sys/amd64/conf/LINT-NOIP +++ b/sys/amd64/conf/LINT-NOIP @@ -13,6 +13,7 @@ nodevice ale nodevice bxe nodevice em nodevice fxp +nodevice gve nodevice jme nodevice lio nodevice msk diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index ef0f7076633f..3ae61c8ac922 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -499,6 +499,9 @@ device virtio_console # VirtIO Console device # Linux KVM paravirtualization support device kvm_clock # KVM paravirtual clock driver +# Google Virtual NIC +device gve # Google Virtual NIC (gVNIC) driver + # Microsoft Hyper-V enhancement support device hyperv # HyperV drivers device hvhid # HyperV HID device diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index ce5b071e5ab5..d309ee346b67 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -68,6 +68,9 @@ device virtio_mmio device virtio_blk device vtnet +# Google Virtual NIC +device gve # Google Virtual NIC (gVNIC) driver + # Microsoft Hyper-V device hyperv diff --git a/sys/dev/gve/gve_qpl.c b/sys/dev/gve/gve_qpl.c index 891d132d2f10..3c6d9af6feee 100644 --- a/sys/dev/gve/gve_qpl.c +++ b/sys/dev/gve/gve_qpl.c @@ -101,9 +101,9 @@ gve_alloc_qpl(struct gve_priv *priv, uint32_t id, int npages, bool single_kva) int i; if (npages + priv->num_registered_pages > priv->max_registered_pages) { - device_printf(priv->dev, "Reached max number of registered pages %lu > %lu\n", - npages + priv->num_registered_pages, - priv->max_registered_pages); + device_printf(priv->dev, "Reached max number of registered pages %ju > %ju\n", + (uintmax_t)npages + priv->num_registered_pages, + (uintmax_t)priv->max_registered_pages); return (EINVAL); } diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES index 4e4c6193ebab..65218529e565 100644 --- a/sys/i386/conf/NOTES +++ b/sys/i386/conf/NOTES @@ -701,6 +701,9 @@ device virtio_console # VirtIO Console device # Linux KVM paravirtualization support device kvm_clock # KVM paravirtual clock driver +# Google Virtual NIC +device gve # Google Virtual NIC (gVNIC) driver + options HYPERV device hyperv # HyperV drivers device hvhid # HyperV HID device diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 8e91e20720ca..67b95a8db6f7 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -555,13 +555,10 @@ _mlx5ib= mlx5ib .endif .endif -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" -_gve= gve -.endif - .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" _ena= ena +_gve= gve _iwlwifi= iwlwifi .if ${MK_SOURCELESS_UCODE} != "no" _iwlwififw= iwlwififw From nobody Mon Jun 5 02:24:16 2023 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 4QZHVS3C9cz4b86g; Mon, 5 Jun 2023 02:24:16 +0000 (UTC) (envelope-from git@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 4QZHVS2lSyz4FDH; Mon, 5 Jun 2023 02:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685931856; 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; bh=61nqXhyoFPr0xYLccQThg4eu8QEV6natZrnELcoMYEw=; b=VsrnBxtLIz8MxXPbCqu3lrsixFcmCJrXxX4o4h28xe7MKNvZ/DK2WNbCbEM7rLbRn5lHhr jTZN5jbYb0O5GcdXa6UHi+YUIUwnWSfXHE/lJz+gmorJjUCLSXeORCj3xPnHe5NyGGWjvg AfIFnfFG52AHAnX0Ljl5GBFVxLcefY6oqCHRXxbWSrAkzTaZFnzJNWWaIBDQz5ghXaaiB0 99l6EtlNmWodbXnoXgWKjhCndSmafWkVTUrWO32uzxapJIBH/7Ir7q+pZERaMY4uMqKNiJ zZr+Bllvai4uo3WIRfsQ1Fq/7W0asAbe60dLsSZwP3uJpj36uLoxfIcEFC8Qsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685931856; 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; bh=61nqXhyoFPr0xYLccQThg4eu8QEV6natZrnELcoMYEw=; b=EfK358qvxD8UaIqH5STrIt94UJDt9QqLoyvRQDLC1/0EbiZelCIb7M6jZHluTqIkleaWIC 6wrpcQ1NDZ95wbzksgI2yoeon4e2AdDA06TrBUDFyXUiSFy5aUWQyg9VaFe9GAJmlQehJ7 OQntkFb93uudLz3Xdmx9OsLBFHJCc795RuBpaoiWqV9tiwmH/e2XGkPLAqvG1eXLdBG3dZ WXMCL+H9hlSLvivCnbs5Wdtn79C69vKbt2cPqNYBid39BqUzI00BgzfJUYys2E0zs4dWom DfJA+SmAQlH3J/wey3+HwahHgFFjkcvwHMGZrczvlWczspjA/Nh0kXXSL4nTGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685931856; a=rsa-sha256; cv=none; b=ls8JO8anLMo60QcNq/6/quX2FX/tQq+ZlkYXZe+Eue3behTRg05Sr84UxYGbI31/YhCYnn KjqePqg7OqktuRBfEFnfEzNq8ojYORxIg8jmYQ1jXRDC9nRN9acm/Gc/IEmMkNriiBxbjW 649p49rhRQanZzraLM/dqrA26cNb4hcGr3s3ckUyUK1ThudbSBZinL2ZcvIL5l26fNzUKn PVnUVK8rxXUEGUrHz585GTAp/6Hs17/ugVtNoexObUMzlUy0/SEnH07O4MjpH1nHUCZCul Vt9kwL/8YHAsx1xkLeuvzV/Jjk9WqNlskm/mbWFQzH2zZDIbgXbszLRr5LRpRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZHVS1kctzW2r; Mon, 5 Jun 2023 02:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3552OGMp014311; Mon, 5 Jun 2023 02:24:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3552OGor014310; Mon, 5 Jun 2023 02:24:16 GMT (envelope-from git) Date: Mon, 5 Jun 2023 02:24:16 GMT Message-Id: <202306050224.3552OGor014310@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 37e3f5b23b07 - main - Enable support for printing 8-byte integers. For some reason, most of the code for this was present, but disabled. This is required for POSIX compliance on platforms with 8-byte longs. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37e3f5b23b0720223186f5a00108fdb8d3e88150 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=37e3f5b23b0720223186f5a00108fdb8d3e88150 commit 37e3f5b23b0720223186f5a00108fdb8d3e88150 Author: Ben Harris AuthorDate: 2001-12-07 13:37:39 +0000 Commit: Xin LI CommitDate: 2023-06-05 02:23:35 +0000 Enable support for printing 8-byte integers. For some reason, most of the code for this was present, but disabled. This is required for POSIX compliance on platforms with 8-byte longs. Obtained-From: NetBSD PR: 238586 Reported-By: Mohamed Akram MFC after: 2 weeks --- usr.bin/hexdump/display.c | 2 +- usr.bin/hexdump/parse.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index 5e5b30b73fd0..cad548e1ec41 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -123,8 +123,8 @@ print(PR *pr, u_char *bp) double f8; float f4; int16_t s2; - int8_t s8; int32_t s4; + int64_t s8; u_int16_t u2; u_int32_t u4; u_int64_t u8; diff --git a/usr.bin/hexdump/parse.c b/usr.bin/hexdump/parse.c index f59f0d9b6356..c6616fdd24d7 100644 --- a/usr.bin/hexdump/parse.c +++ b/usr.bin/hexdump/parse.c @@ -303,6 +303,9 @@ isint: cs[2] = '\0'; case 2: pr->bcnt = 2; break; + case 8: + pr->bcnt = 8; + break; default: p1[1] = '\0'; badcnt(p1); From nobody Mon Jun 5 05:50:07 2023 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 4QZN3z6d2gz4Zq0J; Mon, 5 Jun 2023 05:50:07 +0000 (UTC) (envelope-from git@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 4QZN3z63vSz3MM8; Mon, 5 Jun 2023 05:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685944207; 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; bh=O53VJ7sWIKAcgSeahcocIX0P79K3Ook11KlqLKHk80E=; b=bAiJ25vix9OoWpaiaPYlc6g+LnpoFdWcq5gUw7t4Cplp1TBHeqfL7/1pc+R26HtFzDLcSt RuN2duhsYzt5SxYDu0SskkH3ITG43+1yFVIv2uQB7sALGG7WvdoAz1exqjak8iujGCXBkS i9R9FXNs7YX1bR6UsJ5YgSw+VRBEB4XuZ+hQr3GZP/Zl0ABIUkZGaq1Yfd3vmAFguAAUlg qm0TXZtLqMPbcWN9bRkmTN5cA8loVrYlPVKGgIoDM2kKwRRJeBjikcOV+OIQshKBhGSG0P ceUiyH+Ct0ymI5k5cKTK9kWY4piu1ENSOrxSMxeynYHDVmec8V3SZFEqpfMbSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685944207; 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; bh=O53VJ7sWIKAcgSeahcocIX0P79K3Ook11KlqLKHk80E=; b=OHD7YjvEvKvxdKlUb7cR35EGDI8UmKl8hHp9ymQ+PXiyCMSvzPWBeaiZiZMfKR51df9oHT VWoW6NKjI9/BiIkEHsmucbN91ES8vE/6gYkWmdbVTAsWHuPioZKhyyj1Z2pwTXd24hi2SZ 2UCuPUsFpz7xVMf7KGOZ5lWkIy30EMEYWqrhS4WJBpSCcX9xgEhIbGJBDQJj1ybHdez1bV Iw+2RNvgbj27FcCW9pj7/17C/TF9dfr6Oee6bkK+tY2cGy3SU8GtxFey8/6DsVGvhPPPg8 RjbD31/jDUSMMnLPtuNQrdS8it0VGKQzgW6VUsVQbPt0/wE6eQ+0zCedn6ljjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685944207; a=rsa-sha256; cv=none; b=YvxsP6fm+fwz8j5uVo+0DSrt6/poQq4bh1/RHLqW+dhAAFckXpwL5auZQ3xlKFSUNNduaT cGQnZWhMgTEJbBAzdzafXIQYuyoaBHRxTZicrgFOU4VsGthtoeQvASWQoB30A3+AG0FW25 W68XB0BT6MI+01ipSxIhCp/WOe4EbYnrPVuEKIA3JVLbdz4XXMuBlya8Y/UnlxD3eG9cVL jOUytP7jy0jyO5jXH2hdXQrb6Xsz+PJr8msGOd1mRmzfpT+Wr7MN8mo4hJ6Kw49EejPIM4 tw62HquBW/nprP643zFrl9QE6ucMV5SRR0HB7Ipjp4FMhcJdCKXNv+QW1TCI9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZN3z56Yczbr9; Mon, 5 Jun 2023 05:50:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3555o73D047696; Mon, 5 Jun 2023 05:50:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3555o7La047693; Mon, 5 Jun 2023 05:50:07 GMT (envelope-from git) Date: Mon, 5 Jun 2023 05:50:07 GMT Message-Id: <202306050550.3555o7La047693@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 1e4b7ab136b4 - main - tslog.h: Wrap in #ifdef _KERNEL 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1e4b7ab136b434dcb296833e509f87c95ac868bc Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=1e4b7ab136b434dcb296833e509f87c95ac868bc commit 1e4b7ab136b434dcb296833e509f87c95ac868bc Author: Colin Percival AuthorDate: 2023-06-04 22:59:10 +0000 Commit: Colin Percival CommitDate: 2023-06-05 05:49:38 +0000 tslog.h: Wrap in #ifdef _KERNEL This is not intended to be used from outside of the kernel; in particular, the boot loader has its own version of tslog. --- sys/sys/tslog.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/tslog.h b/sys/sys/tslog.h index af3c0931cac8..dcbfd266c5c2 100644 --- a/sys/sys/tslog.h +++ b/sys/sys/tslog.h @@ -29,6 +29,7 @@ #ifndef _TSLOG_H_ #define _TSLOG_H_ +#ifdef _KERNEL #ifdef TSLOG #include #include @@ -66,4 +67,5 @@ void tslog_user(pid_t, pid_t, const char *, const char *); #define TSRAW_USER(a, b, c, d) /* Timestamp logging disabled */ #endif +#endif /* _KERNEL */ #endif /* _TSLOG_H_ */ From nobody Mon Jun 5 05:50:08 2023 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 4QZN410cvDz4Zq2Z; Mon, 5 Jun 2023 05:50:09 +0000 (UTC) (envelope-from git@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 4QZN406MNcz3MXX; Mon, 5 Jun 2023 05:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685944209; 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; bh=ijSjajLM6I8+BJVyfohkgFuiUxog45Lp0TmGXG8H5q8=; b=UCJb8PDG3Jl8vbm/OERHUCljf/SMir5Um38gt9PK+jvHYURg1wQ8pvD4pwdo2UQh2AZfjS Lbrd2rUEqDfO/2Sq2QmG3ZF2t88V61noh2TIQKF2y6gvx7oMXudj0ROojetMvZZnOGf0tg MBQA8ivieewyCIkrZEXEccBtdaIF4Y/kWdKfF73eKjRWADTtYlu61a7Yrc+sLbz/pm6vpp r6nmj6iqBjlwY3Bt3MLGAXGF2XKnfFlHutRDt/dXtXBRktLqFtl1LcZmr6DcW3dVljk5GV LAd1Yk2qWJzx+mnuzXdueU8iUD92bBV2L5cl9O5udlespC5aoAQAR5/V37gq+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685944209; 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; bh=ijSjajLM6I8+BJVyfohkgFuiUxog45Lp0TmGXG8H5q8=; b=WtXaDsofiGtnzh5G/kCgTSVJS7ynO0es55BbIYUSfW24Sl6aVclSWWcGfMUY0hiyWBK2L5 OfnD2f5sNBVFVQuFmOtR+RdOMzyXcy96oUNY4C8IrOUqhpadk+10c+jEbPYrx8zHU5YIRo tbKf80TFc84g0dyCQD/4ngWQPMGbwGHKTXDcDljBYBSRjlplb8YjKY5eg/MH/09qLE4RMg yYKj+j163IyMA4DR7RO6C46/62dGKJ8GEcI8U0chV3szmVVJ7sE0IGsNq0yzm2R9CFqt8p Mi4yZ5AXLEqJ0JSMg/fdncuekgfp5KRh0Z+at2ff1hJLKW05DXFtYX6ZJTJLjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685944209; a=rsa-sha256; cv=none; b=JA+X9r8kjn5rJ3esCYSGnGH95bhMLMHqAZQpeHqrL8pCTpOiPWxlhdCfY9+4P9A9/XV7xH Lak2Svz5SMVarXEpkrieKCdB5VKrfHgzrntmDMWctlXrUqYlxuwRh7cAOoLFesozS6gwJ9 oIudQ8tfZjpnywoTsuIOsHDFxAsAJkSAkUv3Y0cgznDZskGyYr8zIEZ9NuhO/G+WfpI3Zg 7crQhGMJRX8PIDnCMJOCXCOIEYnGI/twAqEUprvBcTtLsHiztEqIULeXokk1UnkeOf2SeT a2yTPShCb1+YzVE5dspDzvMRb16OgmZwNt/IdC1g8ljsp1dV+J1qwmCo5f9iNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZN405SB6zc5D; Mon, 5 Jun 2023 05:50:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3555o83c047950; Mon, 5 Jun 2023 05:50:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3555o8G2047943; Mon, 5 Jun 2023 05:50:08 GMT (envelope-from git) Date: Mon, 5 Jun 2023 05:50:08 GMT Message-Id: <202306050550.3555o8G2047943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 9d6ae1e3c26a - main - Revert "Revert "tslog: Annotate some early boot functions"" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d6ae1e3c26a0c3334a268b587f17dccb9a503d7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=9d6ae1e3c26a0c3334a268b587f17dccb9a503d7 commit 9d6ae1e3c26a0c3334a268b587f17dccb9a503d7 Author: Colin Percival AuthorDate: 2023-06-04 23:01:31 +0000 Commit: Colin Percival CommitDate: 2023-06-05 05:49:38 +0000 Revert "Revert "tslog: Annotate some early boot functions"" Now that is wrapped in #ifdef _KERNEL, it's safe to have tslog annotations in files which might be built from userland (i.e. in subr_boot.c, which is built as part of the boot loader). This reverts commit 59588a546f55523d6fd37ab42eb08b719311d7d6. --- sys/amd64/amd64/fpu.c | 3 +++ sys/amd64/amd64/initcpu.c | 4 ++++ sys/amd64/amd64/machdep.c | 2 ++ sys/amd64/amd64/pmap.c | 4 ++++ sys/kern/kern_cons.c | 3 +++ sys/kern/link_elf.c | 7 +++++++ sys/kern/subr_boot.c | 5 +++++ sys/kern/subr_kdb.c | 3 +++ sys/kern/subr_param.c | 4 ++++ sys/kern/subr_pcpu.c | 2 ++ sys/kern/subr_prf.c | 3 +++ sys/x86/pci/pci_early_quirks.c | 3 +++ sys/x86/x86/identcpu.c | 7 ++++++- sys/x86/xen/pv.c | 3 +++ 14 files changed, 52 insertions(+), 1 deletion(-) diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index a3421cf0d496..1310a27911fe 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -360,6 +361,7 @@ fpuinit(void) u_int mxcsr; u_short control; + TSENTER(); if (IS_BSP()) fpuinit_bsp1(); @@ -401,6 +403,7 @@ fpuinit(void) ldmxcsr(mxcsr); start_emulating(); intr_restore(saveintr); + TSEXIT(); } /* diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c index a17ef89ba9f8..0de4bc3e2d60 100644 --- a/sys/amd64/amd64/initcpu.c +++ b/sys/amd64/amd64/initcpu.c @@ -276,6 +276,7 @@ initializecpu(void) uint64_t msr; uint32_t cr4; + TSENTER(); cr4 = rcr4(); if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { cr4 |= CR4_FXSR | CR4_XMM; @@ -311,7 +312,9 @@ initializecpu(void) if (cpu_stdext_feature & CPUID_STDEXT_SMAP) cr4 |= CR4_SMAP; } + TSENTER2("load_cr4"); load_cr4(cr4); + TSEXIT2("load_cr4"); /* Reload cpu ext features to reflect cr4 changes */ if (IS_BSP() && cold) identify_cpu_ext_features(); @@ -340,6 +343,7 @@ initializecpu(void) if (!IS_BSP()) cpu_init_small_core(); + TSEXIT(); } void diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 757606311123..fa3ffe84bfe1 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -874,6 +874,7 @@ getmemsize(caddr_t kmdp, u_int64_t first) quad_t dcons_addr, dcons_size; int page_counter; + TSENTER(); /* * Tell the physical memory allocator about pages used to store * the kernel and preloaded data. See kmem_bootstrap_free(). @@ -1129,6 +1130,7 @@ do_next: /* Map the message buffer. */ msgbufp = (struct msgbuf *)PHYS_TO_DMAP(phys_avail[pa_indx]); + TSEXIT(); } static caddr_t diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b2abab429730..123811ed573f 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1668,6 +1668,7 @@ create_pagetables(vm_paddr_t *firstaddr) #endif int i, j, ndm1g, nkpdpe, nkdmpde; + TSENTER(); /* Allocate page table pages for the direct map */ ndmpdp = howmany(ptoa(Maxmem), NBPDP); if (ndmpdp < 4) /* Minimum 4GB of dirmap */ @@ -1884,6 +1885,7 @@ create_pagetables(vm_paddr_t *firstaddr) } kernel_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); + TSEXIT(); } /* @@ -1906,6 +1908,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) u_long res; int i; + TSENTER(); KERNend = *firstaddr; res = atop(KERNend - (vm_paddr_t)kernphys); @@ -2061,6 +2064,7 @@ pmap_bootstrap(vm_paddr_t *firstaddr) */ load_cr4(rcr4() | CR4_PCIDE); } + TSEXIT(); } /* diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index 7c63b8e4ed9c..ff57b2bdfd8a 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -134,6 +135,7 @@ cninit(void) { struct consdev *best_cn, *cn, **list; + TSENTER(); /* * Check if we should mute the console (for security reasons perhaps) * It can be changes dynamically using sysctl kern.consmute @@ -195,6 +197,7 @@ cninit(void) */ early_putc = NULL; #endif + TSEXIT(); } void diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index b410469b6270..bd8994ff0e4d 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -1431,6 +1432,7 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc, const Elf_Rela *rela; const char *symname; + TSENTER(); #define APPLY_RELOCS(iter, tbl, tblsize, type) do { \ for ((iter) = (tbl); (iter) != NULL && \ (iter) < (tbl) + (tblsize) / sizeof(*(iter)); (iter)++) { \ @@ -1449,12 +1451,15 @@ relocate_file1(elf_file_t ef, elf_lookup_fn lookup, elf_reloc_fn reloc, } while (0) APPLY_RELOCS(rel, ef->rel, ef->relsize, ELF_RELOC_REL); + TSENTER2("ef->rela"); APPLY_RELOCS(rela, ef->rela, ef->relasize, ELF_RELOC_RELA); + TSEXIT2("ef->rela"); APPLY_RELOCS(rel, ef->pltrel, ef->pltrelsize, ELF_RELOC_REL); APPLY_RELOCS(rela, ef->pltrela, ef->pltrelasize, ELF_RELOC_RELA); #undef APPLY_RELOCS + TSEXIT(); return (0); } @@ -1950,6 +1955,7 @@ link_elf_ireloc(caddr_t kmdp) struct elf_file eff; elf_file_t ef; + TSENTER(); ef = &eff; bzero_early(ef, sizeof(*ef)); @@ -1966,6 +1972,7 @@ link_elf_ireloc(caddr_t kmdp) link_elf_preload_parse_symbols(ef); relocate_file1(ef, elf_lookup_ifunc, elf_reloc, true); + TSEXIT(); } #if defined(__aarch64__) || defined(__amd64__) diff --git a/sys/kern/subr_boot.c b/sys/kern/subr_boot.c index 057ffb5b7e08..73e75ba11750 100644 --- a/sys/kern/subr_boot.c +++ b/sys/kern/subr_boot.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #endif #include #include +#include #ifdef _KERNEL #define SETENV(k, v) kern_setenv(k, v) @@ -95,12 +96,14 @@ boot_env_to_howto(void) int i, howto; char *val; + TSENTER(); for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) { val = GETENV(howto_names[i].ev); if (val != NULL && strcasecmp(val, "no") != 0) howto |= howto_names[i].mask; FREE(val); } + TSEXIT(); return (howto); } @@ -193,12 +196,14 @@ boot_parse_cmdline_delim(char *cmdline, const char *delim) char *v; int howto; + TSENTER(); howto = 0; while ((v = strsep(&cmdline, delim)) != NULL) { if (*v == '\0') continue; howto |= boot_parse_arg(v); } + TSEXIT(); return (howto); } diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index f8b37c2319b0..2f419b4d8ad5 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -559,6 +560,7 @@ kdb_init(void) struct kdb_dbbe *be, **iter; int cur_pri, pri; + TSENTER(); kdb_active = 0; kdb_dbbe = NULL; cur_pri = -1; @@ -582,6 +584,7 @@ kdb_init(void) printf("KDB: current backend: %s\n", kdb_dbbe->dbbe_name); } + TSEXIT(); } /* diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c index bb8cb5871af2..b988f28944cc 100644 --- a/sys/kern/subr_param.c +++ b/sys/kern/subr_param.c @@ -171,6 +171,7 @@ void init_param1(void) { + TSENTER(); #if !defined(__arm64__) TUNABLE_INT_FETCH("kern.kstack_pages", &kstack_pages); #endif @@ -245,6 +246,7 @@ init_param1(void) pid_max = 300; TUNABLE_INT_FETCH("vfs.unmapped_buf_allowed", &unmapped_buf_allowed); + TSEXIT(); } /* @@ -254,6 +256,7 @@ void init_param2(long physpages) { + TSENTER(); /* Base parameters */ maxusers = MAXUSERS; TUNABLE_INT_FETCH("kern.maxusers", &maxusers); @@ -335,6 +338,7 @@ init_param2(long physpages) if (maxpipekva > (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64) maxpipekva = (VM_MAX_KERNEL_ADDRESS - VM_MIN_KERNEL_ADDRESS) / 64; + TSEXIT(); } /* diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c index c4c220d66c97..c13a52dffccd 100644 --- a/sys/kern/subr_pcpu.c +++ b/sys/kern/subr_pcpu.c @@ -103,6 +103,7 @@ dpcpu_init(void *dpcpu, int cpuid) { struct pcpu *pcpu; + TSENTER(); pcpu = pcpu_find(cpuid); pcpu->pc_dynamic = (uintptr_t)dpcpu - DPCPU_START; @@ -115,6 +116,7 @@ dpcpu_init(void *dpcpu, int cpuid) * Place it in the global pcpu offset array. */ dpcpu_off[cpuid] = pcpu->pc_dynamic; + TSEXIT(); } static void diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 0506c21b5ad8..db4ef168bc70 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1037,6 +1038,7 @@ msgbufinit(void *ptr, int size) static struct msgbuf *oldp = NULL; bool print_boot_tag; + TSENTER(); size -= sizeof(*msgbufp); cp = (char *)ptr; print_boot_tag = !msgbufmapped; @@ -1052,6 +1054,7 @@ msgbufinit(void *ptr, int size) if (print_boot_tag && *current_boot_tag != '\0') printf("%s\n", current_boot_tag); oldp = msgbufp; + TSEXIT(); } /* Sysctls for accessing/clearing the msgbuf */ diff --git a/sys/x86/pci/pci_early_quirks.c b/sys/x86/pci/pci_early_quirks.c index 97ba7e1a0631..ab8072b38d14 100644 --- a/sys/x86/pci/pci_early_quirks.c +++ b/sys/x86/pci/pci_early_quirks.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* XXX: enable this once the KPI is available */ @@ -317,5 +318,7 @@ void pci_early_quirks(void) { + TSENTER(); intel_graphics_stolen(); + TSEXIT(); } diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 42cca3250481..3ff59344e17d 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -1424,6 +1424,7 @@ identify_hypervisor(void) u_int regs[4]; char *p; + TSENTER(); /* * If CPUID2_HV is set, we are running in a hypervisor environment. */ @@ -1432,8 +1433,10 @@ identify_hypervisor(void) identify_hypervisor_cpuid_base(); /* If we have a definitive vendor, we can return now. */ - if (*hv_vendor != '\0') + if (*hv_vendor != '\0') { + TSEXIT(); return; + } } /* @@ -1446,11 +1449,13 @@ identify_hypervisor(void) if (regs[1] == VMW_HVMAGIC) { vm_guest = VM_GUEST_VMWARE; freeenv(p); + TSEXIT(); return; } } freeenv(p); } + TSEXIT(); } bool diff --git a/sys/x86/xen/pv.c b/sys/x86/xen/pv.c index 367214fe35be..b3da26e9b78e 100644 --- a/sys/x86/xen/pv.c +++ b/sys/x86/xen/pv.c @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -417,6 +418,7 @@ xen_pvh_parse_preload_data(uint64_t modulep) char *envp; char acpi_rsdp[19]; + TSENTER(); if (start_info->modlist_paddr != 0) { struct hvm_modlist_entry *mod; const char *cmdline; @@ -507,6 +509,7 @@ xen_pvh_parse_preload_data(uint64_t modulep) #ifdef DDB xen_pvh_parse_symtab(); #endif + TSEXIT(); return (kmdp); } From nobody Mon Jun 5 12:36:57 2023 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 4QZY5P34NJz4Zvs2; Mon, 5 Jun 2023 12:36:57 +0000 (UTC) (envelope-from git@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 4QZY5P2Gvgz3lPp; Mon, 5 Jun 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685968617; 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; bh=OC/v5krMth7gl9Xk5R20e7c9vDbUdW4ebdZAkWrZDo8=; b=gmlLeu5XOdaitDM1GX0n5RufczSQDuAiHK+q7REWlaYzvwwoMeILRtpOMefy6FT8HF9I5g sKfcQcBdWS8zf9SNrYzBEXDz65sey2XG6DRfgrTdFjo5924NDTxGnQ5GTdASrdbcf02Z9O ngayUUq4jvpjjXbov36qWGF7VxnnrTw0EwaU7/e3v26o8ZZ4OwtrvOpbm7/iwq/kQyNG27 0IxNUhfLRh21esC1lAMh6WzTWBXyq/kJfiO6LWeh7avS4pJ8n/o2i+U6/nFrOnr+5YaKyt bGirs5KUu/9TJZWaOnhA572HT2xt5KOY+A6OMP64SQQiqdGlaC+Xq6MawSKUtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685968617; 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; bh=OC/v5krMth7gl9Xk5R20e7c9vDbUdW4ebdZAkWrZDo8=; b=bu47YEswyU2K5x4BKkvGZs5DjYI7J5C5WVhs+1V2RPRpOt2pmVws9XZ43fmiHPSFJSHJyU M1vTP6ZhPhps9hNKZlIh0TN7nnu8IiMjggqkRiLMMu97eY5gQagJUYHi20BpRScqxfxqE7 NFm/6TUnKjrEMYiXJ+Yox/pGudC8eK10hEMBdO4wOt2WxGAatyjOrgTPZi69fNDRt54quz XhhjvNzUARCTHLUPrbE4fkaOHh+lwG4S50Q9zveavl/YvTJKMwM/T7pXO6MdP/Tu2VTjVo VL2KmrD0q3IaBnytmyVZPSxzdLS5VVGsWabLHiAcYT8imKk3dhOlLUGq5Sfh0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685968617; a=rsa-sha256; cv=none; b=wdy0Eqnux6HS0KUoaTurJlg9IIR/G9ughEXwN6dd+jggN7nhrmL5qFRxsXkoKazHlA3B/s HORYEDluxuLbNA9acs1iP0IuuoxEQZQ2ab8W+tv2mhkE3EyuhaGQ7h/r3GcWC6vCxPoB6f ir6TJ1vQynsKDtQQoKCsGCA38c/upPduy+b/9Wv+4+USXwJbaGHBWBwzTWiXKUQskcF2bl VSKiofq18C0yXyvx19W634cDRqWlxSFBxTcxMUBxjBuMcextb9BmC46PB1zZs8p9jTSIqz q3lmx5rv3jLlxlBWoPviOZqIBWFg7ERoO3vwzi6awKO7/q+JPPWoioSaFUhw5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZY5P1DHjznbc; Mon, 5 Jun 2023 12:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355Cavjv020079; Mon, 5 Jun 2023 12:36:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355CavVs020078; Mon, 5 Jun 2023 12:36:57 GMT (envelope-from git) Date: Mon, 5 Jun 2023 12:36:57 GMT Message-Id: <202306051236.355CavVs020078@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 979754a15ae4 - main - nfsstat.1: Add a missing argument to -w 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 979754a15ae4c507cd739163331cbaef7b100e23 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=979754a15ae4c507cd739163331cbaef7b100e23 commit 979754a15ae4c507cd739163331cbaef7b100e23 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-06-05 12:32:46 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-06-05 12:33:55 +0000 nfsstat.1: Add a missing argument to -w MFC after: 3 days Sponsored by: Klara Inc. --- usr.bin/nfsstat/nfsstat.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/nfsstat/nfsstat.1 b/usr.bin/nfsstat/nfsstat.1 index 4a37fdc7529a..892e675390b3 100644 --- a/usr.bin/nfsstat/nfsstat.1 +++ b/usr.bin/nfsstat/nfsstat.1 @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 31, 2019 +.Dd June 5, 2023 .Dt NFSSTAT 1 .Os .Sh NAME @@ -53,7 +53,7 @@ If you wish to compare RPC counts between NFSv3 and NFSv4, you must use statistics in the client(s). .Pp The options are as follows: -.Bl -tag -width indent +.Bl -tag -width "-w wait" .It Fl c Only display client side statistics. .It Fl d @@ -111,7 +111,7 @@ useful when combined with or .Fl s and a time delay. -.It Fl w +.It Fl w Ar wait Display a shorter summary of .Tn NFS activity for both the client and server at From nobody Mon Jun 5 15:54:05 2023 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 4QZdSs2d42z4Z5QK; Mon, 5 Jun 2023 15:54:05 +0000 (UTC) (envelope-from git@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 4QZdSs25Psz4HXt; Mon, 5 Jun 2023 15:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685980445; 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; bh=lrGfzoqGqpJUSLU1PXnRvUnzypNtJ7t5xonQG8WWFVw=; b=vu3uHmb6nJqE9+mu4Vkz9iyuIdrCqyF4zxVEbkfMb+NLuN3wNRGnFOnHVHtYRm4Yk0auVf S3JbKXuKqiCfHsMe39OsQ+b6ivnhBov20/QzdO/djCgc4gIurr/Op9mZS6xQJ3w29pB7zr CVGbp3oovRzfdwEf4YnfOXdCqp/4cd70oaBIbsJXgMAyO7Cu6SeTl/KQoMuO/q27JyizL1 UbkWXIC1el7v/lO0KiS4nxv1hpPbyNcWjvvLdplhVPVbIXf7gKtsbIfyShqqrzZBZsDbUJ 013nbwmJt6kHuDID3JF58tkriNThwjY7YYFgtMtBpt6Miaes70cqbvNtmV+/2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685980445; 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; bh=lrGfzoqGqpJUSLU1PXnRvUnzypNtJ7t5xonQG8WWFVw=; b=aXUknfTxYMON5gMB59Her4yv+q/B96QyKn19P4aBmFQ696fEkpfdkz+E8mn80ZkY/lQ/OX A9PVVao6f5EYy6ZY3pk5WeFc6fMIS1bYCBe+I0LX3Vf/TVu2s/a121fm93xerD34WeaPnX pid+KtxYsRv0f9p0B9VNXsTsYa0EMJeY7hJkHQ36vM/7HM6Lfpybz/O/d16NJxkyROxiHc 7JY8GGwyQnwAa3R646r4emofaaWPgFCIzm5Cyw8BwpJaKhr4JlWKH4FNqxZcAsf752NELc wH8VG3IZV3TtXDozgOv6Xlegu6FjRDxFRHIOGNdbqPCba62TXsv+DWzhq4nnaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685980445; a=rsa-sha256; cv=none; b=gLj75+442qEGLj6P7cDpXH7fYdPKupM5p871rs1UuHGFvQSpFIqszgG6KdLfhxhz3c8rOj +jBGB0HRWXGvRxG5IRdjVb3yMydu7XQD5WdndRxxY289yiz6qqPpzs8O4ZTfb+YjmfJVHL G3fJbArT9PoJtxOVFJfaKtj15KFKXup2WaFvsklRQqdDoeNdHVRAmKq74eNxKa0QE5lt8Z T4SZACQGVpXJShfgf35UA3qsOyPDc7TdAjetYhjimhQlP3dp1nrz1Ec/15rLmSZwZkVXND v3j9nDiQa/ti64uTATXdBeHw1a2byNWtlTyWktHrwzz32lMbm5jzbu/joxXzhQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZdSs19JLztRC; Mon, 5 Jun 2023 15:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355Fs5uR049379; Mon, 5 Jun 2023 15:54:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355Fs5gh049378; Mon, 5 Jun 2023 15:54:05 GMT (envelope-from git) Date: Mon, 5 Jun 2023 15:54:05 GMT Message-Id: <202306051554.355Fs5gh049378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 7ba6119e22b5 - main - ctags: Don't undercount lines when handling // comments. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ba6119e22b54c2104b1948f0e8a4157d4112958 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7ba6119e22b54c2104b1948f0e8a4157d4112958 commit 7ba6119e22b54c2104b1948f0e8a4157d4112958 Author: Dag-Erling Smørgrav AuthorDate: 2023-06-05 15:53:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-05 15:53:45 +0000 ctags: Don't undercount lines when handling // comments. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D40374 --- usr.bin/ctags/C.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/ctags/C.c b/usr.bin/ctags/C.c index 80b6c42a7a5c..e36b60de4a55 100644 --- a/usr.bin/ctags/C.c +++ b/usr.bin/ctags/C.c @@ -483,9 +483,9 @@ skip_comment(int t) /* t is comment character */ return; break; case '\n': + SETLINE; if (t == '/') return; - SETLINE; /*FALLTHROUGH*/ default: star = NO; From nobody Mon Jun 5 16:11:53 2023 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 4QZdsP3nnrz4Z7gX; Mon, 5 Jun 2023 16:11:53 +0000 (UTC) (envelope-from git@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 4QZdsP3Mxtz4Mdd; Mon, 5 Jun 2023 16:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685981513; 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; bh=uyFMxcg3TuyT9371TkyBpBq5nVXl2N7yGUwcpUb5ObQ=; b=o1UsIXPhWIjj1AHiA+6BZbNDhG+mj2MwnSWxLUzFOLyhGJj989VbE1gp7zKx46vzL/IjcU pLPEgAVJVwYgheKp/su2BVJrDBqn52l81fm49glGf7hL9WcvmO+Nt7SNMy/k2s4dKblA0B 7WqVHK4aJ7xmRHNue/aNCIql/qb6GfU5XX3bo6aBLfj3CBsPE5dTCe7HFYPCB0sZ4JDK/2 VSfk929cImKN7hpRwPMF5I21iPli/IOXC+rm3YXibAhlpzubUXNumTYqfUg2AyDPr3abNA JtBa4qDkiu/IKIpNsQPU1hygD67WZIPf/S6E+g7geF7NLRDJBJFyBzBYH0e6zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685981513; 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; bh=uyFMxcg3TuyT9371TkyBpBq5nVXl2N7yGUwcpUb5ObQ=; b=LyyPfbtf4PFe3z95B9cyab7u+QtG+iCk8efNDnmTTrXBRzVfmrt3tash5JSqxtAmpaxiGZ 4mQ9Bf0bl0V7pH+1GWccVv/BXJJntRnXKn0VWuhTg9SOHYeMLeYC/zRPcqTH7UC81o8tN5 zKfc1jnij+dmllNM9au8Dx0A8CgqzPwpxHg/0G+VB+aVG0trg2zEdtCYBGqJLHjuAYCbF0 1Z1ds5DJbgOiRmibfrc/bK46CKzyoLmDpW+4SNi50ERXDjrwNNzfSfoEyzHrvLRp93fkQt joMtnyayqOos38wCn87utS4d3mhhc/Wd0O1aH2XlRocJK8WleivaQ2VdLM9oDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685981513; a=rsa-sha256; cv=none; b=IcA3Kp8TqbO1OfJ/pp20npB/oFeIlTQdd8+6+VYsBTcZHKwGGtPidrt/0GrTHovn2K6kbY zUmEa8rwl60H16Zka4d8RWwH1IRQA2qTOCJbnqo07VC15WDtG7nxA0vr7T5BbFdASsQn8z PmOqqZA4uCOlbEhGFWB3fkAh9tfYmOMldnOtNeFyQRgBj7Z/cfn6PWoeobC6PbkhDQvyiO b2rb/JqoDN7jRP/URRssbJM9248LgRt7fBFRCAyXjMqFt15+up9zWCVF5nJrNubrufj9va h2HY8vEgPSDtZOIkk4sB/QlIVJtFPtF0Cxc/yyfitX338OFU8Ds5oKqn2xSvQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZdsP2QwQztlL; Mon, 5 Jun 2023 16:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355GBrht081927; Mon, 5 Jun 2023 16:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355GBrxY081926; Mon, 5 Jun 2023 16:11:53 GMT (envelope-from git) Date: Mon, 5 Jun 2023 16:11:53 GMT Message-Id: <202306051611.355GBrxY081926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: 6d777389e19d - main - xargs: Fix typo in error message. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6d777389e19d3bebde515e88e8405de45d8af7bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6d777389e19d3bebde515e88e8405de45d8af7bd commit 6d777389e19d3bebde515e88e8405de45d8af7bd Author: Dag-Erling Smørgrav AuthorDate: 2023-06-05 16:10:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-05 16:11:44 +0000 xargs: Fix typo in error message. MFC after: 1 week Sponsored by: Klara, Inc. --- usr.bin/xargs/xargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index cadb0c76cc2f..eb496d8e09fe 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -526,7 +526,7 @@ prerun(int argc, char *argv[]) *tmp = *avj++; if (repls && strstr(*tmp, replstr) != NULL) { if (strnsubst(tmp++, replstr, inpline, (size_t)Sflag)) { - warnx("comamnd line cannot be assembled, too long"); + warnx("command line cannot be assembled, too long"); xexit(*argv, 1); } if (repls > 0) From nobody Mon Jun 5 16:20:44 2023 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 4QZf3w1qXzz4ZQKl; Mon, 5 Jun 2023 16:21:00 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) (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 4QZf3v2Q5yz4P3w; Mon, 5 Jun 2023 16:20:59 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.208.174 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; dmarc=none Received: by mail-lj1-f174.google.com with SMTP id 38308e7fff4ca-2b1b2ca09b9so39918561fa.1; Mon, 05 Jun 2023 09:20:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685982057; x=1688574057; 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=/69EUyEBLt1NSmB16dGQ4Btl2qdg3VFOlDvv6/eJjAA=; b=c7UYfJZy6GAe9i52o6oNV9lLWm4sFN9jwy3IZfZm28M2LMmPWFMIsp4WAKLIv2MucM M3gX4107KnoRi1xd1pZmN11T66O0tnoA9kfc2kLXyVK7sZsi+BbtszCBjjObUa7Dy8zn SSTe1TAp4qwpj0C5r+IqhnhOmXl4BAe+tCJLgpJWM//vr5RbM6j1zi+aDphKC5upKSM7 6/wa2EnFS4U70gRgaMmtM5d7qv4oJ1rbvdFKCL26hcIoALCTNPFN/npr5kyFb0Zp9fE3 QBhk3yHfB6zpwg/CIcF1vn0OB8OAYcaab9vPu0AzX/2vSJJQYMd0npMo7hZSgwz0HU+f Enfw== X-Gm-Message-State: AC+VfDzNwRzv7fv0bgPO/T1TnW47bJC+gMYRdS9Qc2UAifmagwaXyOFD AN+acwAeU1zJ/JVhhMUYGbkhQFgDfmmqt28LNyHVdBMf X-Google-Smtp-Source: ACHHUZ5MCMZJnFbzuSATGDJlwJPdr4NSKtApPSXtpQgR+CiAihGLBL4PVPQmcKH5nRFKa4Cp6+kkTsFL5l9QsopsX1A= X-Received: by 2002:a2e:94cd:0:b0:2b1:a343:266f with SMTP id r13-20020a2e94cd000000b002b1a343266fmr5462126ljh.12.1685982056053; Mon, 05 Jun 2023 09:20:56 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202305301229.34UCTOoL051426@gitrepo.freebsd.org> In-Reply-To: <202305301229.34UCTOoL051426@gitrepo.freebsd.org> From: Ed Maste Date: Mon, 5 Jun 2023 12:20:44 -0400 Message-ID: Subject: Re: git: 4bf98559d9d6 - main - pf: make contents of struct pfsync_state configurable To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-1.00 / 15.00]; NEURAL_HAM_SHORT(-0.96)[-0.958]; NEURAL_HAM_MEDIUM(-0.63)[-0.633]; NEURAL_SPAM_LONG(0.59)[0.589]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.174:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.174:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCPT_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4QZf3v2Q5yz4P3w X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N On Tue, 30 May 2023 at 08:29, Kristof Provost wrote: > > The branch main has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=4bf98559d9d6fa7c3571d26ed6f2b18823e3a30b > > commit 4bf98559d9d6fa7c3571d26ed6f2b18823e3a30b > Author: Kajetan Staszkiewicz > AuthorDate: 2023-05-29 13:47:23 +0000 > Commit: Kristof Provost > CommitDate: 2023-05-30 12:28:56 +0000 > > pf: make contents of struct pfsync_state configurable > > ... > contrib/tcpdump/print-pfsync.c | 98 +++++---- Is this change also submitted upstream as a pull request? From nobody Mon Jun 5 16:22:32 2023 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 4QZf5j0MrSz4ZQtT; Mon, 5 Jun 2023 16:22:33 +0000 (UTC) (envelope-from git@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 4QZf5h6jj5z4PGl; Mon, 5 Jun 2023 16:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685982152; 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; bh=r/VIe/sOmcy3SSrwwbaGzYOhfzWRvsZKVp4gamkF9kE=; b=Oc3fs6txO4L9PoPqhoYqtvWkMSCM4iIQsCSw8DygUQZYiap1mnMAZ+X1g+GukSWugkbo3V +KO7+Mvzobn/Hij9Qdxk5neFB7EFJP37j9CzQdwAIXqwcgHkFeSzIKT6b5SDXTeDkDrWQA m55MugSvvec2DmyzE6xXexgtle0LnrNEfO4DAvwXewRdRLmul2MdhOsKWszWfV6KP+Le/s 8RJTfj/sLr0SBmiebPBl/5eMEbY0qhtlDC0j1Ej3BTpSRq41MCr5hXU0H0jTLFbgtpmiyp tciVOtkS1djfXguJTQaS04umMXjDQoTPzx1K04BM6nXTyURil7/9p8cJIx7rdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685982152; 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; bh=r/VIe/sOmcy3SSrwwbaGzYOhfzWRvsZKVp4gamkF9kE=; b=YuBjHcxwkjKPeRcmP/KOQa+iz/UaTLcNrPnAaAiVs72FNlok720PvzeXj34f1L3f0yrB2d xUl8YkU0ho/XczxFEg1HwInWyKH6BjTxNTg8Xery3AGe8rhmCAZDvEBd/rYWJfu70uvKfz cR2auMa5Kvt2HrT7kka2d6/mzgS7Vt4d2LmCJ0mShsUzQEWrZiah0Qu58zaeU8P1nTipzx C/Yc13BdbV4Mg/Vs6u7LKxwlIzj3ZurwAT3ngVAuseaUFB9or15rC+rGHQiS+zriBpD17P ll0mtu0PV3fC95e3kgsR+pRgs9uQquZR/+tzhn33/kLmDszQg1tpXTlrpkU6pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685982152; a=rsa-sha256; cv=none; b=LACfT90vYu1wqP5AAQYGAzwPKmMMKG77LloTGCDygrgfJrz6SC/CQCmPUZD3LUVsynANGl 4CAiuzifSoInJjYVJ4bl46GBUFTDgZ/2u/VyAXh6lwF3xS6SWYxVX8f6z28J9srfiJPV4q Hzc57xkKpKlgvizvI8dH0b02SV8ejcA12sqkzTgQxEGqPaijqMLtEpAFoLrJt3aSHVLrt+ rWcMyH/FMf5i2v8GXwy8gBraRW1/ia26yUPFShf/pGTLr62nbLVeFj1xBA5bPJMslt5NlO D1Z7+5sgsUZIjIPAcXDPl8/xF2b0ym5GEix6+5lfYTOWPXEm62Zk0PvJsoRCKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZf5h5nLbzvJ1; Mon, 5 Jun 2023 16:22:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355GMWeB000110; Mon, 5 Jun 2023 16:22:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355GMW7J000109; Mon, 5 Jun 2023 16:22:32 GMT (envelope-from git) Date: Mon, 5 Jun 2023 16:22:32 GMT Message-Id: <202306051622.355GMW7J000109@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6062d9faf23f - main - vm_phys: Change the return type of vm_phys_unfree_page() to bool 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6062d9faf23f11e0655f3a222c204725e3111fe8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6062d9faf23f11e0655f3a222c204725e3111fe8 commit 6062d9faf23f11e0655f3a222c204725e3111fe8 Author: Mark Johnston AuthorDate: 2023-06-05 14:40:15 +0000 Commit: Mark Johnston CommitDate: 2023-06-05 16:22:11 +0000 vm_phys: Change the return type of vm_phys_unfree_page() to bool This is in keeping with the trend of removing uses of boolean_t, and the sole caller was implicitly converting it to a "bool". No functional change intended. Reviewed by: dougm, alc, imp, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40401 --- sys/vm/vm_page.c | 8 ++++---- sys/vm/vm_phys.c | 14 +++++++------- sys/vm/vm_phys.h | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4b967a94aa1f..5d822d34ed7c 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -327,7 +327,7 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) { struct vm_domain *vmd; vm_page_t m; - int ret; + bool found; m = vm_phys_paddr_to_vm_page(pa); if (m == NULL) @@ -335,15 +335,15 @@ vm_page_blacklist_add(vm_paddr_t pa, bool verbose) vmd = vm_pagequeue_domain(m); vm_domain_free_lock(vmd); - ret = vm_phys_unfree_page(m); + found = vm_phys_unfree_page(m); vm_domain_free_unlock(vmd); - if (ret != 0) { + if (found) { vm_domain_freecnt_inc(vmd, -1); TAILQ_INSERT_TAIL(&blacklist_head, m, listq); if (verbose) printf("Skipping page with pa 0x%jx\n", (uintmax_t)pa); } - return (ret); + return (found); } /* diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 42875d12ba81..8db6529b8c80 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -1291,12 +1291,12 @@ vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, /* * Search for the given physical page "m" in the free lists. If the search - * succeeds, remove "m" from the free lists and return TRUE. Otherwise, return - * FALSE, indicating that "m" is not in the free lists. + * succeeds, remove "m" from the free lists and return true. Otherwise, return + * false, indicating that "m" is not in the free lists. * * The free page queues must be locked. */ -boolean_t +bool vm_phys_unfree_page(vm_page_t m) { struct vm_freelist *fl; @@ -1319,12 +1319,12 @@ vm_phys_unfree_page(vm_page_t m) if (pa >= seg->start) m_set = &seg->first_page[atop(pa - seg->start)]; else - return (FALSE); + return (false); } if (m_set->order < order) - return (FALSE); + return (false); if (m_set->order == VM_NFREEORDER) - return (FALSE); + return (false); KASSERT(m_set->order < VM_NFREEORDER, ("vm_phys_unfree_page: page %p has unexpected order %d", m_set, m_set->order)); @@ -1350,7 +1350,7 @@ vm_phys_unfree_page(vm_page_t m) vm_freelist_add(fl, m_tmp, order, 0); } KASSERT(m_set == m, ("vm_phys_unfree_page: fatal inconsistency")); - return (TRUE); + return (true); } /* diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h index c1f6514e92e4..a294bbaad80a 100644 --- a/sys/vm/vm_phys.h +++ b/sys/vm/vm_phys.h @@ -79,7 +79,7 @@ void vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality); vm_page_t vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options); -boolean_t vm_phys_unfree_page(vm_page_t m); +bool vm_phys_unfree_page(vm_page_t m); int vm_phys_mem_affinity(int f, int t); void vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end); vm_paddr_t vm_phys_early_alloc(int domain, size_t alloc_size); From nobody Mon Jun 5 16:34:55 2023 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 4QZfN26hKzz4ZSs4; Mon, 5 Jun 2023 16:34:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4QZfN26C5Xz3CwK; Mon, 5 Jun 2023 16:34:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685982898; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W8VvFevAwbWTPCbTOW1HOAGIHxIRf6GK3XgZ76spd1c=; b=g6Duyk2GdQs6SR24MznhmpFsmqkeb6QfeEmlrGX3gNTG1NyOM1kJNZAUUX6KppJyfBbm9T o168ZKvIuiEXn14gFHZpxHvGwzU77w+xglFUXaFAdMPJQ6bERqrG31g81bczrudHTWLyDj N52sPPspbCaW2pBx2/HmX/AzgCWW0yJWXMMQXKADzVVgGYzPyYImJxIQQnekL1a9JsI2Ch mEju2T6ECgbJhCZ1GA1hiUbh26GZEwcqvFAUn//jqtKdUioDnBvaVVsLH914Ifhr9wtA2K jgYp2W9xsI8scthleY1zOhtlxnYLcIoGngxzIv09Q069knCl3FU860w6CGxf5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685982898; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W8VvFevAwbWTPCbTOW1HOAGIHxIRf6GK3XgZ76spd1c=; b=VUjasFeie/EQbePrHmxhOSCrZAmvCdf8rNdLb0HNmIGZmXNAZGDY3u5kL4D9SDrilgBBVp mwClOfH4prR2J55IcJUKziJRRx6hRQFwWNjSBlHaZS20jQOAAbhLTk9RzQ4wK53OjIMkys qWXu3idtXOjV7RQwc5nlxHSOhA8oYj7YjlUasL3EiOA4SnuIGQtXwtpzePC3E2TQgfEuCP vP7GHxDByAvUJ98zI+F1uN92KZM+1IuOdPGAXKr6/xKweAoN4RVWw45M7REFHfxT12xUK+ yQk5yvgpmePZmbBXhCgHManMk3/5hu4qzQg5bBWKaCs3cfwO1qwR9SAeNvEhiQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685982898; a=rsa-sha256; cv=none; b=nJfEj4viTX2hU8pAyC2sNb97HGtj6+WK/L1sdA9EEcWvM45Df691ObhrppWUt6VoWRXWt9 H+xVvT2jjRwQIeU/LcnfUtTW3e9kZCtAzPuEPm+aRccFhLJ+OMQeAUueFPQM7EZ9HrySpI gziFMkXsSW2WVUxrVwUDNyGYblhwBijjeIp/l3GRAXx+Ko+gfI5qDfCeFiEN+rb6BvbHj9 K8KAZOWNchFL9Gb2XArWv9I9f1vQS5jrtuHUzrk6UANx+CBnN01vBQ1Xc0do3jqvT38EHd ZHish5PU/ZhmObHfVE0kuqudCzW28AGodGdM/GFE6zbIhKn1xNY7wAWHzOUeXA== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QZfN24YTQzLgZ; Mon, 5 Jun 2023 16:34:58 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 68122E69E; Mon, 5 Jun 2023 18:34:56 +0200 (CEST) From: Kristof Provost To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4bf98559d9d6 - main - pf: make contents of struct pfsync_state configurable Date: Mon, 05 Jun 2023 18:34:55 +0200 X-Mailer: MailMate (1.14r5937) Message-ID: <8C35F23C-BEC9-4CFD-B277-CB855EFCD2AF@FreeBSD.org> In-Reply-To: References: <202305301229.34UCTOoL051426@gitrepo.freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On 5 Jun 2023, at 18:20, Ed Maste wrote: > On Tue, 30 May 2023 at 08:29, Kristof Provost wrote: >> >> The branch main has been updated by kp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D4bf98559d9d6fa7c3571d26= ed6f2b18823e3a30b >> >> commit 4bf98559d9d6fa7c3571d26ed6f2b18823e3a30b >> Author: Kajetan Staszkiewicz >> AuthorDate: 2023-05-29 13:47:23 +0000 >> Commit: Kristof Provost >> CommitDate: 2023-05-30 12:28:56 +0000 >> >> pf: make contents of struct pfsync_state configurable >> >> ... >> contrib/tcpdump/print-pfsync.c | 98 +++++---- > > Is this change also submitted upstream as a pull request? It=E2=80=99s not, no. I haven=E2=80=99t looked at what is and isn=E2=80=99t in upstream. My im= pression from jrm=E2=80=99s mails about updating is that there=E2=80=99s = a fair number of local changes around there already. For additional fun this change is very much FreeBSD-pf specific, so I=E2=80= =99m not sure how/if upstream wants to handle that. Best regards, Kristof From nobody Mon Jun 5 17:49:16 2023 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 4QZh1m6dTtz4Zhr0; Mon, 5 Jun 2023 17:49:16 +0000 (UTC) (envelope-from git@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 4QZh1m67ctz3h5b; Mon, 5 Jun 2023 17:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685987356; 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; bh=EiUYFI7+FYqIoARXXUOeS3vPEyY2wzMt8ypLqRmEgYw=; b=kO6LeIGgU8JAdSOrGK6f+INaaR2LnEjwGbMLypdzL0u4HizWRPstBLRcqb+gfsVpirlEzT gwJ7MxeRHpyQE8dnyGqk9JIoBT00lLWpXbfQQ8Svk16oytRdw5mV838RSYsf35q/LvR4LV 6hH1JEVZVkEvmQ+WmDPRh4IllJSMSkflPHI6WMo45LEZ3SDAkfDIc7PAVqVMKDeYIvJ7dv VSyoeIl2yINhaxrYwujXbcLRB/T/yYoZdJZW2hZMVA5nUT2uSIZ96/kBUyELfsY6kNn1CK ZczurWwCuELpJvY1mfdlPeiLUcmSCiHhpwHzCKl8vsvqJKEKPJawI1WDqnUniw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685987356; 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; bh=EiUYFI7+FYqIoARXXUOeS3vPEyY2wzMt8ypLqRmEgYw=; b=MaNrRBrctlXGqc5o20zAqlGSetMgijlALkFCrNf3DlhBXiBtr6WwEmhbs0IBinFUzMWgEh OQ2S9/sMSY6xq62FnGu2Cd+I0lGcfs8X2/MtcMQdLlkv18/A9SJC2OcuR3cghI7OT8UkxE IzVTddGCrRO+u5BLs5Bz8+BSS87exERMbokpjNMdGrJOtFMM4m8JAG09F8YU3QqV5No4yu TJQhEI5besV9BP2JKKqkJO//tvIo5ZQnpoCTEW8iUxkVfqbzia+lndlXTz/CzSIZfWJ3mB LaDsmen4eV4Jr9Xh3tgcyh+JfNjGIR6IEM6SKGldcJGKspd0jGMrVDXPy6OBvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685987356; a=rsa-sha256; cv=none; b=WGQmfc4E8bbFZenbHxenwc03XZRFQ1StzPenzEXYtPq6FIN9xf6hVWtghMs7A2YFqoLfKP /747yHA6mVliFkD/wG5qMPqTqcPjR8eZT7Cr3QUSyBtOSPksPPtjVofhZg+HsDvzRI7q2t zsnucH7t09kAbgjC2CgKMDsWigucjWXnag6oNAT1Ui9sDiL102Vyaq8nCg5QZmYKOtkwof TSHwSIVApPSm8Y4VgSg5AZ+ZxnXRfi9any+vB+j7Mk6Y/JEwLMNyY4Cm1ovSsPUB2wbYqe GiCuNqzLxg8A0I9XpF4rEtvZ2GELEeGjV6zGyyU4Hyyyp6omBJAETDU4h02nLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZh1m5Bqnzx28; Mon, 5 Jun 2023 17:49:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355HnG3j033491; Mon, 5 Jun 2023 17:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355HnGmg033490; Mon, 5 Jun 2023 17:49:16 GMT (envelope-from git) Date: Mon, 5 Jun 2023 17:49:16 GMT Message-Id: <202306051749.355HnGmg033490@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: e730066a64e6 - main - decryptcore: Request the OpenSSL 1.1 API 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e730066a64e60b3ba39b7143aa40b5ba1e9c3949 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=e730066a64e60b3ba39b7143aa40b5ba1e9c3949 commit e730066a64e60b3ba39b7143aa40b5ba1e9c3949 Author: Pierre Pronchery AuthorDate: 2023-06-01 19:07:23 +0000 Commit: Ed Maste CommitDate: 2023-06-05 17:48:05 +0000 decryptcore: Request the OpenSSL 1.1 API OPENSSL_API_COMPAT can be used to specify the OpenSSL API version in use for the purpose of hiding deprecated interfaces and enabling the appropriate deprecation notices. This change is a NFC while we're still using OpenSSL 1.1.1 but will avoid deprecation warnings upon the switch to OpenSSL 3.0. A future update may migrate to use the OpenSSL 3.0 APIs. PR: 271615 Reviewed by: emaste Sponsored by: The FreeBSD Foundation --- sbin/decryptcore/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/decryptcore/Makefile b/sbin/decryptcore/Makefile index 3a3a6a029f87..afaa0311ae50 100644 --- a/sbin/decryptcore/Makefile +++ b/sbin/decryptcore/Makefile @@ -2,6 +2,7 @@ PROG= decryptcore +CFLAGS+=-DOPENSSL_API_COMPAT=0x10100000L LIBADD= crypto pjdlog MAN= decryptcore.8 From nobody Mon Jun 5 18:51:23 2023 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 4QZjPS6y9zz4Ztx9; Mon, 5 Jun 2023 18:51:24 +0000 (UTC) (envelope-from git@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 4QZjPS03nbz3s6Y; Mon, 5 Jun 2023 18:51:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685991084; 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; bh=Xfcrzt4vTDMYyS5wU5xTemGkbRkxlmAkb9QKI+D/gOg=; b=ua1OeRsMJlZX/bIpukjJaAWDAWYbpurDiAnfmOFqUc7SFdM8YyEIWwmz10fFR/83TMVANX n8OuVcHQq+odwut0Aaf80HB15uq5NT6ya3egdGGtHY8pt8uIT+0wHtBiquP0/2xAbTQ1c4 DyLeUiWclzjS5Mt3I2LLbIoSzfm3BoLM0DYNl+xhY/VQ8/gujhS2fxOA8xxh7hUelRXyKh g0BHA/reP0srPdlyQajvIomo8WpurZPLzXyf2jqqa5psD8dEoBXDmykxcWbCH3uV4VzEtZ mTgll75wwkcMcR2Sg3RMYVvX/obNNXRbF7XUWIxk7GhLfFr7oAQKjWy6+2Uk6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685991084; 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; bh=Xfcrzt4vTDMYyS5wU5xTemGkbRkxlmAkb9QKI+D/gOg=; b=pThF2TkHBQDCjlQ0qAEbLxSFYBC3OkUulY1SluEnlHR0Canzg5V5enNgwLBOVxjDv9R4f2 8iaW2oHXImRM1od/41xU31ahD0Am23NugLL11kfnAUvrXavMkMsVRy5S9bZX1VKchzQ+IC 8di1OEoREJmfnGrkThwLxILmJ26iFN34zvOXyFz00V2l8tJC3CKgf10Z9rHZB5r5uTwT1J L3aUydcxm/uc0trMDhyiQD1GdLTINgO2T9MF/QccJjhVyAtBTS1E5yJKg1FbX77SR78VO4 F9ynMxW3o1LEDS4bOiDsDjR/lrTsLKCoo7gQ1FgDy0uHNszakCUmpe/Yn+UjfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685991084; a=rsa-sha256; cv=none; b=HQLS48b8lBw/LbbCOdUYldNzXPTKR54pySqrf7tXEHIrQAmkbfxOmRPmblMlD7iI2LeIkb 05watJGjPU30p1hetyHj3++V1tRQ7SC88MM01IsBeiX3F8qPh88yoZYKONjt9B5/wIbVa8 2Y72AdCKOBvejEmTIOjNXbhV+zZrr/Fxhb+3z0zT5sqfblYJwQFg1NNx2uzpEtxnBiNwyK CyMXi+yuJVl8DuuLWJUOogwyA7a3t5QlTuHkog9ve2SpDB7wuUpaeMd68DYo4kmnObO9x2 F9kmkbkAFdlZcD9I7hbnfjHY5kyCmrdx0V7cbUYADXJOxiq6VpqSsBJSyTqLaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZjPR6Gm4zyPg; Mon, 5 Jun 2023 18:51:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355IpNt1048730; Mon, 5 Jun 2023 18:51:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355IpNIV048729; Mon, 5 Jun 2023 18:51:23 GMT (envelope-from git) Date: Mon, 5 Jun 2023 18:51:23 GMT Message-Id: <202306051851.355IpNIV048729@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: fbc445addf91 - main - xargs: Consistently use strtonum() to parse arguments. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbc445addf9183d180bb8b488281617bb19d9242 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=fbc445addf9183d180bb8b488281617bb19d9242 commit fbc445addf9183d180bb8b488281617bb19d9242 Author: Dag-Erling Smørgrav AuthorDate: 2023-06-05 18:50:54 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-06-05 18:50:54 +0000 xargs: Consistently use strtonum() to parse arguments. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D40425 --- usr.bin/xargs/xargs.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index eb496d8e09fe..e832cbb35a31 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -124,7 +124,6 @@ main(int argc, char *argv[]) int ch, Jflag, nargs, nflag, nline; size_t linelen; struct rlimit rl; - char *endptr; const char *errstr; inpline = replstr = NULL; @@ -175,23 +174,23 @@ main(int argc, char *argv[]) replstr = optarg; break; case 'L': - Lflag = strtonum(optarg, 0, INT_MAX, &errstr); + Lflag = (int)strtonum(optarg, 0, INT_MAX, &errstr); if (errstr) - errx(1, "-L %s: %s", optarg, errstr); + errx(1, "-%c %s: %s", ch, optarg, errstr); break; case 'n': nflag = 1; - nargs = strtonum(optarg, 1, INT_MAX, &errstr); + nargs = (int)strtonum(optarg, 1, INT_MAX, &errstr); if (errstr) - errx(1, "-n %s: %s", optarg, errstr); + errx(1, "-%c %s: %s", ch, optarg, errstr); break; case 'o': oflag = 1; break; case 'P': - maxprocs = strtonum(optarg, 0, INT_MAX, &errstr); + maxprocs = (int)strtonum(optarg, 0, INT_MAX, &errstr); if (errstr) - errx(1, "-P %s: %s", optarg, errstr); + errx(1, "-%c %s: %s", ch, optarg, errstr); if (getrlimit(RLIMIT_NPROC, &rl) != 0) errx(1, "getrlimit failed"); if (maxprocs == 0 || maxprocs > rl.rlim_cur) @@ -201,22 +200,22 @@ main(int argc, char *argv[]) pflag = 1; break; case 'R': - Rflag = strtol(optarg, &endptr, 10); - if (*endptr != '\0') - errx(1, "replacements must be a number"); + Rflag = (int)strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr) + errx(1, "-%c %s: %s", ch, optarg, errstr); break; case 'r': /* GNU compatibility */ break; case 'S': - Sflag = strtoul(optarg, &endptr, 10); - if (*endptr != '\0') - errx(1, "replsize must be a number"); + Sflag = (int)strtonum(optarg, 0, INT_MAX, &errstr); + if (errstr) + errx(1, "-%c %s: %s", ch, optarg, errstr); break; case 's': - nline = strtonum(optarg, 0, INT_MAX, &errstr); + nline = (int)strtonum(optarg, 0, INT_MAX, &errstr); if (errstr) - errx(1, "-s %s: %s", optarg, errstr); + errx(1, "-%c %s: %s", ch, optarg, errstr); break; case 't': tflag = 1; From nobody Mon Jun 5 19:33:50 2023 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 4QZkLQ6gDqz4b2cn; Mon, 5 Jun 2023 19:33:50 +0000 (UTC) (envelope-from git@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 4QZkLQ63mZz3tcB; Mon, 5 Jun 2023 19:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685993630; 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; bh=HtzPgkfRGpWFLK8unZQ5Qfl4vbkLJv9YCJU/LiGnHHU=; b=egOgx6gMlAoHjNKS1t5YlRpOWYA38bN4fKzeCUs4oK4sPnpHdfMPeag9f3MY5jZEYN/XAc 8d4aCTZ4SSXN8oe/aYlaFn/Fmhp0wBqYzqTgHYlON9BIHC49fk6FiXHgstNSQQeVc1W8XR R4EdZv+UKtLbx+hI4V2rXKZthL/H7TCoKdL0EHvYltSclQY0bnYcOUWgcNBWVjcLwB44GR H4pSK+3c0LBHkJD/JyXyX0tHyNCCr1S2vQPi6cYF3OBtSyaMAnRT3z3YmtsOooSGQ00nVx vzbeimtmrbYiHW3bKj4CZRkk4XnxqT0cyExOiYb57BBoN2C1Ajn/UwxfdI+TWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685993630; 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; bh=HtzPgkfRGpWFLK8unZQ5Qfl4vbkLJv9YCJU/LiGnHHU=; b=AK0EcCylSHRvYIzIOETltViVmwXSy2x4Szdg6xJLBeSBLm3X6ulf8QTzSAvPzej39WHam2 m4FlGI6UbNZhqXi7i3WmfUt0F4pwipMod4Fcj1PNffxqahXRYXF4tM4zIRjPMpWu+pL7Oa v/TWQFv+rG9w+aF8XKFyR6Db7/aHOdnH7Gh61Hdpgj4EeM9u/6VuAet/qrgAtKTGyxqOu6 gQuhNtoSnBqppsrKhWTZRo3dPgsr2731GN3tvs9/ru0DcjPyTfjtWriHBi1o3tIg/4xBYr W+r1EJYS8G5KZ7T1GwpWGKxXxN+BH3zlEUN6CbEkBHnn3bSorBGPrmk3Y7LyhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685993630; a=rsa-sha256; cv=none; b=DGiXMk+ktj3kMndysHuRBPXzrf0OSnXS4Qu+ff/JjisnpUaxGwf4lpQY9Do1iEFuV3Oq3p WBLlQOt6gKlne8+Eb8C3UeMnKjb11OYdJ1O4Z4D3jmwPAS04WHptiac22Z7/KEJGBCAUFH AkqJX5xktWQaIeCLpDGBFhXwCLk3TvjkUQOnzVIvwrg9nYBRimBSsGTpRu8tgePgGkm59B K8lM4jMG12b7QzseOu4wM2FSaJ7hON32PejGd1yc7BDVy92gALa/xyJV7Cqj1oSDdWVHTB wQ3raQlmBldlD+6R3xNObIoOhqYA1m4ISIKLON7fOY3azYnjPduHiZSdgFVE+A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZkLQ57Flz10kw; Mon, 5 Jun 2023 19:33:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355JXokH034242; Mon, 5 Jun 2023 19:33:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355JXoxW034241; Mon, 5 Jun 2023 19:33:50 GMT (envelope-from git) Date: Mon, 5 Jun 2023 19:33:50 GMT Message-Id: <202306051933.355JXoxW034241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: a7bca6949252 - main - rtld_tls.h: style 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7bca6949252f32bb39440cb2914ba23e1c01551 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a7bca6949252f32bb39440cb2914ba23e1c01551 commit a7bca6949252f32bb39440cb2914ba23e1c01551 Author: Konstantin Belousov AuthorDate: 2023-06-05 01:15:31 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-05 19:33:17 +0000 rtld_tls.h: style Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld_tls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld_tls.h b/libexec/rtld-elf/rtld_tls.h index b7dedc3fdfee..84ee582152c7 100644 --- a/libexec/rtld-elf/rtld_tls.h +++ b/libexec/rtld-elf/rtld_tls.h @@ -58,7 +58,7 @@ * The value returned from this function is suitable for installing * directly into the thread pointer register. */ -void *_rtld_allocate_tls(void* oldtls, size_t tcbsize, size_t tcbalign) +void *_rtld_allocate_tls(void *oldtls, size_t tcbsize, size_t tcbalign) __exported; /* From nobody Mon Jun 5 19:33:51 2023 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 4QZkLS05yNz4b2sm; Mon, 5 Jun 2023 19:33:52 +0000 (UTC) (envelope-from git@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 4QZkLR6RHZz3tny; Mon, 5 Jun 2023 19:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685993631; 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; bh=TaaR1jpeiaIrEju0CezlLbMp3eSpl4yHCx8aBdVBQvo=; b=xsxNeKjK01kyAub83fs/CDeF1+F6pwZGO9gdrZMAMm4+7fw3CibQPcRgbM6zSs6mJNccQz htWEFJPR8WGZjzvsO3KYPzEKDrF218rJayQG6ujS6iz4AryzBUaZyaiRw4seSflcS+nPRC SyDU7eYu3jyUFDUlKaCyhKVOOryk9ttVLXcvvpRKUN+/VAlqrvpEYtwAEAJeRfB8Xi3TJ1 pqU2iYaT468rI5AaXd9LS9Jbd7LuACMfzFixc2/tU0Whi9neYhgrpCya1HoUtQUd9PxwbJ XfVGyI815zTSFzWMuWPYjoXWzi1dvP1vhQeCOJnIivVNq69M0/sQz6IcV6zULQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685993631; 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; bh=TaaR1jpeiaIrEju0CezlLbMp3eSpl4yHCx8aBdVBQvo=; b=e0K/OQGrQzjnFEfeaHjTKfDIoh0ZtpiY8Z0wIq2FZGmbeHv1Adgkqh739Z87UMyTRgCMyD OJwq1Xx+qosWxa3EkJAqhcgQ4FVWLLN7xtbJVtGZGkH6UBmqKwYy7w83CXyU/kikMrCe6p vj+0msnQ/aBW0/lrHe8CYrXLbmDelJIWp55xBQAcfdOVFtfazGIJokMQrTfV7tRzmlp6oH 7B/++o0FzNx3rsQSYZJnUXSiWBEU9DLeawKij7r/KR3VbuEAa6H5ex/R5k1FhZoQNu+Q0p +MtOhuZaF/foYECkXtnhnNW/j/RrsJ56QgAJ58Ij35fi3MQvyNJl+Fltddo+ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685993631; a=rsa-sha256; cv=none; b=M8QLGtYGR7FikzxnaRGElUSOuyiuVPth7jD7kBuBYfkoEpQhwWylqJ3r4YKrJAMpV+ca2x YvxVGK2R+kbyU0yKsVlcnxOrpoCzaIEZzw3InjY3kbJLCCxW7TK7BSelIKOoxCgaytKMDF Zd6MIm36EWt5mQRBI5JkUkgYgKOs7OhiQ6nAqcgsU0PjjORYCHdjS8KbO2/oxXgEwZoFSq Uj2jEWbv0cl8U45SNNLDSTf/NpTCJ+LiaSoC96AZT/Z+aoTJKjnFp94v/KH0ubnkIj6Xqu 6RIXRMoOtYsXQfXT9rju/Rrj0b98kHYy6+meXXFqzIQQTXmmK0b6AjfQVEHGuw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZkLR5W6Nz119p; Mon, 5 Jun 2023 19:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355JXpsB034261; Mon, 5 Jun 2023 19:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355JXps2034260; Mon, 5 Jun 2023 19:33:51 GMT (envelope-from git) Date: Mon, 5 Jun 2023 19:33:51 GMT Message-Id: <202306051933.355JXps2034260@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 283a4f409731 - main - rtld: rename tls_done to tls_static 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 283a4f409731ba3a4eb1be41e151c20e8a960c03 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=283a4f409731ba3a4eb1be41e151c20e8a960c03 commit 283a4f409731ba3a4eb1be41e151c20e8a960c03 Author: Konstantin Belousov AuthorDate: 2023-06-05 00:43:55 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-05 19:33:17 +0000 rtld: rename tls_done to tls_static The meaning of the flag is that static TLS allocation was done. Taken from NetBSD Joerg Sonnenberger change for src/libexec/ld.elf_so/tls.c rev. 1.18. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/aarch64/reloc.c | 2 +- libexec/rtld-elf/amd64/reloc.c | 4 ++-- libexec/rtld-elf/arm/reloc.c | 2 +- libexec/rtld-elf/i386/reloc.c | 2 +- libexec/rtld-elf/map_object.c | 2 +- libexec/rtld-elf/powerpc/reloc.c | 2 +- libexec/rtld-elf/powerpc64/reloc.c | 2 +- libexec/rtld-elf/riscv/reloc.c | 4 ++-- libexec/rtld-elf/rtld.c | 8 ++++---- libexec/rtld-elf/rtld.h | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index d83da4df0ec5..f9a1ae4c2b6c 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -470,7 +470,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error( diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index b92d89028d4e..2fdc10ad915f 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -258,7 +258,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * dynamically loaded modules. If we run out * of space, we generate an error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available " @@ -279,7 +279,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * dynamically loaded modules. If we run out * of space, we generate an error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available " diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index cfbddaeede75..b85c8b1f4845 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -279,7 +279,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rel *rel, SymCache *cache, if (def == NULL) return -1; - if (!defobj->tls_done && !allocate_tls_offset(obj)) + if (!defobj->tls_static && !allocate_tls_offset(obj)) return -1; tmp = (Elf_Addr)def->st_value + defobj->tlsoffset; diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index ae0a256e4033..bd8595f923df 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -242,7 +242,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * dynamically loaded modules. If we run out * of space, we generate an error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available " diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index ff4bd513ee59..8c04183f7bca 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -433,7 +433,7 @@ obj_free(Obj_Entry *obj) { Objlist_Entry *elm; - if (obj->tls_done) + if (obj->tls_static) free_tls_offset(obj); while (obj->needed != NULL) { Needed_Entry *needed = obj->needed; diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 27796cb18277..7fd6251c7dd5 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -252,7 +252,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld __unused, Obj_Entry *obj, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available for static " diff --git a/libexec/rtld-elf/powerpc64/reloc.c b/libexec/rtld-elf/powerpc64/reloc.c index 2ca361168e0d..732d6ddff7c9 100644 --- a/libexec/rtld-elf/powerpc64/reloc.c +++ b/libexec/rtld-elf/powerpc64/reloc.c @@ -247,7 +247,7 @@ reloc_nonplt_object(Obj_Entry *obj_rtld __unused, Obj_Entry *obj, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error("%s: No space available for static " diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c index 48d513b94ec6..b5dea298b74d 100644 --- a/libexec/rtld-elf/riscv/reloc.c +++ b/libexec/rtld-elf/riscv/reloc.c @@ -325,7 +325,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error( @@ -352,7 +352,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int flags, * modules. If we run out of space, we generate an * error. */ - if (!defobj->tls_done) { + if (!defobj->tls_static) { if (!allocate_tls_offset( __DECONST(Obj_Entry *, defobj))) { _rtld_error( diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 2b833e350e5a..9ed9a4aed4bb 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5474,11 +5474,11 @@ allocate_tls_offset(Obj_Entry *obj) { size_t off; - if (obj->tls_done) + if (obj->tls_static) return (true); if (obj->tlssize == 0) { - obj->tls_done = true; + obj->tls_static = true; return (true); } @@ -5509,7 +5509,7 @@ allocate_tls_offset(Obj_Entry *obj) tls_last_offset = off; tls_last_size = obj->tlssize; - obj->tls_done = true; + obj->tls_static = true; return (true); } @@ -5885,7 +5885,7 @@ distribute_static_tls(Objlist *list, RtldLockState *lockstate) return; STAILQ_FOREACH(elm, list, link) { obj = elm->obj; - if (obj->marker || !obj->tls_done || obj->static_tls_copied) + if (obj->marker || !obj->tls_static || obj->static_tls_copied) continue; distrib(obj->tlsoffset, obj->tlsinit, obj->tlsinitsize, obj->tlssize); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index bb5119bfb744..025bf4ff0670 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -245,7 +245,7 @@ typedef struct Struct_Obj_Entry { bool traced : 1; /* Already printed in ldd trace output */ bool jmpslots_done : 1; /* Already have relocated the jump slots */ bool init_done : 1; /* Already have added object to init list */ - bool tls_done : 1; /* Already allocated offset for static TLS */ + bool tls_static : 1; /* Already allocated offset for static TLS */ bool phdr_alloc : 1; /* Phdr is allocated and needs to be freed. */ bool z_origin : 1; /* Process rpath and soname tokens */ bool z_nodelete : 1; /* Do not unload the object and dependencies */ From nobody Mon Jun 5 19:33:52 2023 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 4QZkLT2sgmz4b2lc; Mon, 5 Jun 2023 19:33:53 +0000 (UTC) (envelope-from git@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 4QZkLT0Wvtz3ttG; Mon, 5 Jun 2023 19:33:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685993633; 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; bh=u18ZHq5JDUNec4jbUjtDulCMZygzKovC/Ch8DjbZ4KU=; b=v7gWFkbx7nJz8vCX/xQqAFsKjXoNXDgb7g6m3v9pBrueoE3iPZchllBzGZfbBLGTtD6kzy CjCevvAymR9Q6pyIjULDJKukrSG4xRdLVBXyafaMDZIhah+rBF/J/TflxS+Xs+dGsm5lhI EnSTFcKthFVX2wgITEATYXZvBiwoR6J+m4a5+Zx0LiHDjH7AKRfYu2BP1KOI0ZVr5F28Y1 QAx5ZqwCS9nRic/YOr11+fsbflq34fPTi2F40IbbktaIfsE5aQClr1LDKdrKafulhH40SW qnNimhNRVB9nVtw+XC5Gq1WbmX1GdnOZpditqvv18Cm4e9TMdDI8Xy63StIItQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685993633; 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; bh=u18ZHq5JDUNec4jbUjtDulCMZygzKovC/Ch8DjbZ4KU=; b=HQpPIxI4TGxgJaaD12E4soUD/3dNp8i6n+qOcus5pqB8mGzRJ5t7Dfq2s/ZL3sCx+isWef cSi7K1ASJ1qWd+Fxt8/jRaPfRN/HHroeFzZWXxh8xMXbbowQyetpITpJh4sV19Kq4yyO04 +uaT4CmIkPPxuPpLsMuLtkHblAAtThCNaGwgXicYJxHlDNH6a9qXu7XIxbZugG/K9Oh8GO tzLVtGcdCpoDXAowPoBOUYVcnsH0Ygn5Xy08MNvvtzpHQU7w/gnYGsewuZK7wmFcOppobm BwbAEaPWixNsNrtA7ebBUWNDhx8z1/nq+94fB8IU3HYNJXzSjYA0q+WpOqgc9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685993633; a=rsa-sha256; cv=none; b=T93MrKkFfX6y4cTncQXEBowFHYM3PcxMqRG71zz2QsMH3M2UPzS8VH8Fa74NTU1TfUsvF4 /XpTOjQBBjKA9ps66kG7650GERaKCyUMXjlgHkBk+FwO6vR92FzB88T+GmuCK00UEPm7CM 4Nor+IDbFNUO0s2NgVI8GI/uAelnKu7Spx+l2Hq6GF3GyZ6ktYcj2CNOTb8o3cOz6qfdV3 mmzyC1w81PcaUIH1p57TZAkB9bkzS2av/VGa5EK9EvTFFK2nt2h9vOY1vkZ2RBOTcQrkh3 aWGJyuoXx0sK0oP/hjcNMRE93Bk99rczhgAcWhBnPg5NxvbBsnLAFG/iZFsinw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZkLS6jMmz11FY; Mon, 5 Jun 2023 19:33:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355JXqDZ034280; Mon, 5 Jun 2023 19:33:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355JXqQ0034279; Mon, 5 Jun 2023 19:33:52 GMT (envelope-from git) Date: Mon, 5 Jun 2023 19:33:52 GMT Message-Id: <202306051933.355JXqQ0034279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 91880e07f605 - main - rtld: do not allow both dynamic DTV index and static TLS offset 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91880e07f605edb90339685bc934699a4344de3b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=91880e07f605edb90339685bc934699a4344de3b commit 91880e07f605edb90339685bc934699a4344de3b Author: Konstantin Belousov AuthorDate: 2023-06-05 00:54:46 +0000 Commit: Konstantin Belousov CommitDate: 2023-06-05 19:33:18 +0000 rtld: do not allow both dynamic DTV index and static TLS offset If we are allocating static offset for an object with dynamic index, return failure. In the opposite case, if dynamic index is requested for statically allocated TLS area, directly use the offset instead of setting the index. Taken from NetBSD Joerg Sonnenberger change for src/libexec/ld.elf_so/tls.c rev. 1.18. Sponsored by: The FreeBSD Foundation MFC after: 1 week --- libexec/rtld-elf/rtld.c | 14 ++++++++++++++ libexec/rtld-elf/rtld.h | 1 + 2 files changed, 15 insertions(+) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 9ed9a4aed4bb..72a128ccbb81 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -5463,6 +5463,17 @@ allocate_module_tls(int index) rtld_die(); } + if (obj->tls_static) { +#ifdef TLS_VARIANT_I + p = (char *)_tcb_get() + obj->tlsoffset; +#else + p = (char *)_tcb_get() - obj->tlsoffset; +#endif + return (p); + } + + obj->tls_dynamic = true; + p = malloc_aligned(obj->tlssize, obj->tlsalign, obj->tlspoffset); memcpy(p, obj->tlsinit, obj->tlsinitsize); memset(p + obj->tlsinitsize, 0, obj->tlssize - obj->tlsinitsize); @@ -5474,6 +5485,9 @@ allocate_tls_offset(Obj_Entry *obj) { size_t off; + if (obj->tls_dynamic) + return (false); + if (obj->tls_static) return (true); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 025bf4ff0670..b8b0d67bd05d 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -246,6 +246,7 @@ typedef struct Struct_Obj_Entry { bool jmpslots_done : 1; /* Already have relocated the jump slots */ bool init_done : 1; /* Already have added object to init list */ bool tls_static : 1; /* Already allocated offset for static TLS */ + bool tls_dynamic : 1; /* A non-static DTV entry has been allocated */ bool phdr_alloc : 1; /* Phdr is allocated and needs to be freed. */ bool z_origin : 1; /* Process rpath and soname tokens */ bool z_nodelete : 1; /* Do not unload the object and dependencies */ From nobody Mon Jun 5 20:18:33 2023 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 4QZlL84VpTz4b6Hm; Mon, 5 Jun 2023 20:18:40 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from glebi.us (glebi.us [162.251.186.162]) by mx1.freebsd.org (Postfix) with ESMTP id 4QZlL73sXnz400K; Mon, 5 Jun 2023 20:18:39 +0000 (UTC) (envelope-from glebius@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 162.251.186.162 is neither permitted nor denied by domain of glebius@freebsd.org) smtp.mailfrom=glebius@freebsd.org; dmarc=none Received: by glebi.us (Postfix, from userid 1000) id 2E66C441B8; Mon, 5 Jun 2023 13:18:33 -0700 (PDT) Date: Mon, 5 Jun 2023 13:18:33 -0700 From: Gleb Smirnoff To: Cy Schubert Cc: Eric van Gyzen , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fe590ffe40f4 - main - Import vixie cron 4.0 Message-ID: References: <202306011914.351JEPUd080685@gitrepo.freebsd.org> <63EC8D2A-EA0A-48CD-B86C-011D848A2389@vangyzen.net> <20230603175422.7d1c1fcb@slippy> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230603175422.7d1c1fcb@slippy> X-Spamd-Result: default: False [0.50 / 15.00]; VIOLATED_DIRECT_SPF(3.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCVD_NO_TLS_LAST(0.10)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:27348, ipnet:162.251.186.0/24, country:US]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[glebius]; RCVD_COUNT_TWO(0.00)[2]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4QZlL73sXnz400K X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On Sat, Jun 03, 2023 at 05:54:22PM -0700, Cy Schubert wrote: C> > > Given that now source of truth is in git, it could be a good idea C> > > to seed usr.bin/cron as a git subtree, as we do with other contributed C> > > software. C> > C> > Good idea. There were more good ideas on this topic in the Phab review, but I don’t have cycles to pursue any of them. C> C> This was suggested in the review (https://reviews.freebsd.org/D40260). I can do the seeding of subtree. However, I don't want to become maintainer of cron. I can prepare a git tree that has this subtree. Content wise it is going to be exactly the same as it is now. How can approve that? -- Gleb Smirnoff From nobody Mon Jun 5 20:41:08 2023 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 4QZlr82NS8z4b7xs; Mon, 5 Jun 2023 20:41:12 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QZlr80Rjkz43T5; Mon, 5 Jun 2023 20:41:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTP id 6E9lqi5WN6Nwh6H0oqQRtP; Mon, 05 Jun 2023 20:41:10 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id 6H0mq2QwIyAOe6H0nqX4Lp; Mon, 05 Jun 2023 20:41:10 +0000 X-Authority-Analysis: v=2.4 cv=e5oV9Il/ c=1 sm=1 tr=0 ts=647e4866 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=8nJEP1OIZ-IA:10 a=of4jigFt-DYA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=JgTIKX8bMD4ZB-ZYPecA:9 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 4AB731026; Mon, 5 Jun 2023 13:41:08 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 341A142B; Mon, 5 Jun 2023 13:41:08 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Gleb Smirnoff cc: Cy Schubert , Eric van Gyzen , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fe590ffe40f4 - main - Import vixie cron 4.0 In-reply-to: References: <202306011914.351JEPUd080685@gitrepo.freebsd.org> <63EC8D2A-EA0A-48CD-B86C-011D848A2389@vangyzen.net> <20230603175422.7d1c1fcb@slippy> Comments: In-reply-to Gleb Smirnoff message dated "Mon, 05 Jun 2023 13:18:33 -0700." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 05 Jun 2023 13:41:08 -0700 Message-Id: <20230605204108.341A142B@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDaJsXQOGpuWwytA8kO17cLb8vcAIzzaV8o1YMQ3TdqXxFUNgcgAQI7UWZF3rXdaDYYzWkQrgBMvrdiR0SDDLxp+crYVCgVZBsmmNIqBcOp//HaYvzNN x8OKjbYpWTQdrbXLgAH4dTf2Aj5uqgEPvYVWykzT4Ig7u+VHIj95/mXuThqd9Tvoi+QbtCGQxgUUQEBIb7sR6aiJdiDroGxpgevt+6VXm98PDcbfuGbW16Vd mv992iEVJveYoTNtZZc7D7oB7SPa376ddI25jorwRKrdRZ5rScHq9HEx4T65SnrEtCQ5wZPSM4IXnQccJdJCUtApkp7NfVAgIzxAz01jJMDffw/x48sN8N80 RxPu6snd X-Rspamd-Queue-Id: 4QZlr80Rjkz43T5 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message , Gleb Smirnoff writes: > On Sat, Jun 03, 2023 at 05:54:22PM -0700, Cy Schubert wrote: > C> > > Given that now source of truth is in git, it could be a good idea > C> > > to seed usr.bin/cron as a git subtree, as we do with other contributed > C> > > software. > C> > > C> > Good idea. There were more good ideas on this topic in the Phab review, > but I don’t have cycles to pursue any of them. > C> > C> This was suggested in the review (https://reviews.freebsd.org/D40260). > > I can do the seeding of subtree. However, I don't want to become maintainer > of cron. > > I can prepare a git tree that has this subtree. Content wise it is going to b > e > exactly the same as it is now. > > How can approve that? IMO it probably doesn't need approval. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Mon Jun 5 21:01:20 2023 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 4QZmHN4Zy6z4ZQ6c; Mon, 5 Jun 2023 21:01:20 +0000 (UTC) (envelope-from git@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 4QZmHN48vxz45gx; Mon, 5 Jun 2023 21:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685998880; 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; bh=gnX3aZYr4ZZTMZhBOm2Hyu0AK8FpgXu80cT7bs6PqEg=; b=dbodMmF0fQID7n/J6E57rPVpMA5i66Fb1fDQgH8kGq1C2PJMkhVRPLb2GRlK0Oy6G+q8hH wWdXjfuc+Ya2yTguiUdae/a8iAWNQmKCZojNCwYytUC7wyzsCEH/HMyfd/XurFwQz5jGPi CDSbgLBlvSxXoO9s3PVpYv9y7KSjogmwfZ6hdjAOkfiiitaQJJzrHbgKLSiwjpcS3SZ1hG ergTx5SCh2fDZz9+l157mUpfHLbMH95hrZqM8MMUrrB3xoFRiY16d8HH+923lxfs0KAQx5 UoM9LMWDnC2saaQPzjU4X9Ga9PLTlvGePRWci43l3hWw3wG5vpWPVPNOqrPvjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685998880; 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; bh=gnX3aZYr4ZZTMZhBOm2Hyu0AK8FpgXu80cT7bs6PqEg=; b=DCTgE0xM7ks1BUqHK9KBUbmHCabgOeM2Fo7CcVjrem0xUvC4YnUoOMgE9PU/QJOy7O9SAx Cw2MueAIyjMqbh9OlksX/VGd49paYg1QoZGU0XX+/XDvUVU1tED4rTOqXPhss2gbDI80s4 hobA7aNOXBdvTibrBa98l7Ovx4yt+yKFDhdAmt59sAE3a/rMxXLeH9VG53x1wsR5HYs8xK rxwhifJOtxRlz3typsvwKnGE0kdkUyZTxSXoO53wPyQs3KvT+hvrklMxtJEUhmBRj1NGNT o14lQH8FiN5HlA6k+JQYa0lKghz4KE+RAGLFEltwkSbm6qvC9p4CekGfKLYdUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685998880; a=rsa-sha256; cv=none; b=NVAa41u/5Nmx3xmWPtkKVl/LscL85W6Fe3JVi/RIOXvJRQX+L+SoB7WQlglNafSry3Tg2U FrLNKsCXT7OmGF23al03wIXinTlsA+XYvm1VRM7LRMGvVdBXFqJi1IhcFCBnR2iVR3eRG4 kPNDnxed6Qh9/IvBItHKKZ/U/BSBRtKI8L0laovaMTOOjec0inOksosJN+xElzOA+b1vtJ q3A/E6HZZ6rb3AUFIrBVqfjoSYIyfh2EAc0/FOTz7MRXLPjScb8waI0OzNnByq+SfHqCWo VAoasfWV15dbQZ+Pm52EtJg+amWH9lOmU1hv5Ybf5WKjaeqnkbnL/ChxV4yKzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZmHN3DVsz12nt; Mon, 5 Jun 2023 21:01:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 355L1Kx2078549; Mon, 5 Jun 2023 21:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 355L1K9c078548; Mon, 5 Jun 2023 21:01:20 GMT (envelope-from git) Date: Mon, 5 Jun 2023 21:01:20 GMT Message-Id: <202306052101.355L1K9c078548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d66540e829ec - main - tcp: improve sending of TTL/hoplimit and DSCP 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d66540e829ec22b9654cf4b9119bed9326f89fad Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d66540e829ec22b9654cf4b9119bed9326f89fad commit d66540e829ec22b9654cf4b9119bed9326f89fad Author: Michael Tuexen AuthorDate: 2023-06-05 16:43:06 +0000 Commit: Michael Tuexen CommitDate: 2023-06-05 16:43:06 +0000 tcp: improve sending of TTL/hoplimit and DSCP Ensure that a user specified value of TTL/hoplimit and DSCP is used when sending packets. Reviewed by: cc, rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40423 --- sys/netinet/tcp_stacks/rack.c | 27 ++------------------------- sys/netinet/tcp_subr.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index affd135bb453..c9b5b937cc46 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -18826,7 +18826,7 @@ rack_fast_rsm_output(struct tcpcb *tp, struct tcp_rack *rack, struct rack_sendma } #ifdef INET6 if (rack->r_is_v6) { - error = ip6_output(m, NULL, + error = ip6_output(m, inp->in6p_outputopts, &inp->inp_route6, ip_sendflag, NULL, NULL, inp); } @@ -19338,7 +19338,7 @@ again: lgb = NULL; #ifdef INET6 if (rack->r_is_v6) { - error = ip6_output(m, NULL, + error = ip6_output(m, inp->in6p_outputopts, &inp->inp_route6, 0, NULL, NULL, inp); } @@ -21792,11 +21792,7 @@ send: TCP_PROBE5(send, NULL, tp, ip6, tp, th); /* TODO: IPv6 IP6TOS_ECT bit on */ error = ip6_output(m, -#if defined(IPSEC) || defined(IPSEC_SUPPORT) inp->in6p_outputopts, -#else - NULL, -#endif &inp->inp_route6, ((rsm || sack_rxmit) ? IP_NO_SND_TAG_RL : 0), NULL, NULL, inp); @@ -23448,10 +23444,6 @@ static int rack_set_sockopt(struct tcpcb *tp, struct sockopt *sopt) { struct inpcb *inp = tptoinpcb(tp); -#ifdef INET6 - struct ip6_hdr *ip6; - int32_t mask, tclass; -#endif #ifdef INET struct ip *ip; #endif @@ -23465,9 +23457,6 @@ rack_set_sockopt(struct tcpcb *tp, struct sockopt *sopt) INP_WUNLOCK(inp); return (EINVAL); } -#ifdef INET6 - ip6 = (struct ip6_hdr *)rack->r_ctl.fsb.tcp_ip_hdr; -#endif #ifdef INET ip = (struct ip *)rack->r_ctl.fsb.tcp_ip_hdr; #endif @@ -23480,18 +23469,6 @@ rack_set_sockopt(struct tcpcb *tp, struct sockopt *sopt) case IPV6_USE_MIN_MTU: tcp6_use_min_mtu(tp); break; - case IPV6_TCLASS: - /* - * The DSCP codepoint has changed, update the fsb - * by overwriting any previous traffic class. - */ - if (inp->in6p_outputopts) { - mask = 0xfc; - tclass = inp->in6p_outputopts->ip6po_tclass; - ip6->ip6_flow &= htonl((~mask) << 20); - ip6->ip6_flow |= htonl((tclass & mask) << 20); - } - break; } INP_WUNLOCK(inp); return (0); diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index fe065fd08737..47eb2d80efd6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -2049,9 +2049,15 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, ulen = tlen - sizeof(struct ip); uh->uh_ulen = htons(ulen); } - ip->ip_tos = ect; ip->ip_len = htons(tlen); - ip->ip_ttl = V_ip_defttl; + if (inp != NULL) { + ip->ip_tos = inp->inp_ip_tos & ~IPTOS_ECN_MASK; + ip->ip_ttl = inp->inp_ip_ttl; + } else { + ip->ip_tos = 0; + ip->ip_ttl = V_ip_defttl; + } + ip->ip_tos |= ect; if (port) { ip->ip_p = IPPROTO_UDP; } else { @@ -2195,7 +2201,8 @@ tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, #ifdef INET6 if (isipv6) { TCP_PROBE5(send, NULL, tp, ip6, tp, nth); - output_ret = ip6_output(m, NULL, NULL, 0, NULL, NULL, inp); + output_ret = ip6_output(m, inp ? inp->in6p_outputopts : NULL, + NULL, 0, NULL, NULL, inp); } #endif /* INET6 */ #if defined(INET) && defined(INET6) From nobody Tue Jun 6 04:06:43 2023 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 4QZxkC5skkz4bgYM; Tue, 6 Jun 2023 04:06:43 +0000 (UTC) (envelope-from git@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 4QZxkC3h86z3Lfx; Tue, 6 Jun 2023 04:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686024403; 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; bh=p3LqbGDpxUs6rxX64INDjKS0VNlPXIfU3PATg/Wi0+k=; b=ZjSrkk2tf6QrEOxXiCENeA5tVljELWzDgYzb2Q6aPXDKTn4lksdRvHXokXLOjev/KJj2u/ RmMX9IItQEzP3oh6brghVU5Q2oV/y0kQWh9i0vbB0Dl8PRawT8/6FVyenji4WMeTc0hhf6 /W2RmAklVS+9Jda+BQlj2rvOeVrTWFINf5+VXm/JtIUtB82YYkYRBlwtIciOYXm2gzEh9Q hYfRhW7QJa1H3c5kEWSbkFc8/mguM3rLfFi5Ivkimc1Y8/yPbUTHUJk0xCUE4QJSsAigR2 P5AxJbx165dPRUjJUTSSG3JBjBiH0JvMYYzJbrWgSFNqa74ud2p1+GedCCE2ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686024403; 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; bh=p3LqbGDpxUs6rxX64INDjKS0VNlPXIfU3PATg/Wi0+k=; b=Qqiw4bHtGrg1Ap3c5gj250swU9SQmLhv6sznFTtxc7c1wnvko7TKJ1RBF0sFdkUpIei9aX lZib1guzPwOPIRG23z9ctrCsQHGpOh4rO7pEKNJMuH1i3d5TQXQKJbs9ArLgRQBA+Oh6gS kKDcWkSrJVxQH10zsciQ39HMAHdOQ/DrR0HGYTmtv14aXFHZ80SmqHRvglYAnV7EAxPWAe aOAaDev/S0mcFI2OTVubgaq4xQicH6QfvusrcSroMhpmJTnJsjX5V0TRgkpaWMdTFRFUIH LAkoBWA5I/oQQ6iS8bZp0YW5fcnupGQW2MHutwRr4moOhRP5aegfU9gsuoyUKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686024403; a=rsa-sha256; cv=none; b=jRwpEiPSPhHaX+Mwyt9VQhWhkY86kmL4mCb4kjrLHFeaeoMZS4sznR0zh0eiE6DJ6tSXHB BOPIpPaS0tb3bbpcogjvFmyf7FbHRQa3VxF7VXegSIcTPKBL4EskUtl3AJ8L5l3E2MhYoQ c0ogcd3n6oGGk7K7346fo6zP5N3Kt4/IJSixm/9/uCX4pXpFfIqBeiVEzpmhmGCni917zX vPdAvU+dB2Z4J9BT0elAivRNledhpyLtn+pfWDac4tO1RG2P02yokM9HUfmL4bdJWZKq6c xyZym2nFJjyPlhv7Xxj4zJxJdP/5TfRfAcXG/C0MfvQoV4JaASPgQZpoGBYo1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QZxkC2lcNzFsl; Tue, 6 Jun 2023 04:06:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35646hne078042; Tue, 6 Jun 2023 04:06:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35646hbA078041; Tue, 6 Jun 2023 04:06:43 GMT (envelope-from git) Date: Tue, 6 Jun 2023 04:06:43 GMT Message-Id: <202306060406.35646hbA078041@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 1bbdfb0b4386 - main - gve: Add PNP info to PCI attachment of gve(4) driver. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1bbdfb0b438689a839e29094fcb582a104cbabd9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=1bbdfb0b438689a839e29094fcb582a104cbabd9 commit 1bbdfb0b438689a839e29094fcb582a104cbabd9 Author: Xin LI AuthorDate: 2023-06-06 00:58:43 +0000 Commit: Xin LI CommitDate: 2023-06-06 04:05:55 +0000 gve: Add PNP info to PCI attachment of gve(4) driver. Reviewed-by: imp Differential Revision: https://reviews.freebsd.org/D40429 --- sys/dev/gve/gve_main.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index ae45a0cfc24a..383fd326d33a 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -38,6 +38,16 @@ #define GVE_DEFAULT_RX_COPYBREAK 256 +/* Devices supported by this driver. */ +static struct gve_dev { + uint16_t vendor_id; + uint16_t device_id; + const char *name; +} gve_devs[] = { + { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" } +}; +#define GVE_DEVS_COUNT nitems(gve_devs) + struct sx gve_global_lock; static int @@ -701,10 +711,18 @@ gve_service_task(void *arg, int pending) static int gve_probe(device_t dev) { - if (pci_get_vendor(dev) == PCI_VENDOR_ID_GOOGLE && - pci_get_device(dev) == PCI_DEV_ID_GVNIC) { - device_set_desc(dev, "gVNIC"); - return (BUS_PROBE_DEFAULT); + uint16_t deviceid, vendorid; + int i; + + vendorid = pci_get_vendor(dev); + deviceid = pci_get_device(dev); + + for (i = 0; i < GVE_DEVS_COUNT; i++) { + if (vendorid == gve_devs[i].vendor_id && + deviceid == gve_devs[i].device_id) { + device_set_desc(dev, gve_devs[i].name); + return (BUS_PROBE_DEFAULT); + } } return (ENXIO); } @@ -851,3 +869,5 @@ DRIVER_MODULE(gve, pci, gve_driver, gve_devclass, 0, 0); #else DRIVER_MODULE(gve, pci, gve_driver, 0, 0); #endif +MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs, + GVE_DEVS_COUNT); From nobody Tue Jun 6 04:15:37 2023 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 4QZxwj72pZz4bhfH for ; Tue, 6 Jun 2023 04:15:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (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 4QZxwj4lwyz3N52 for ; Tue, 6 Jun 2023 04:15:49 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-3f6e68cc738so48580575e9.1 for ; Mon, 05 Jun 2023 21:15:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686024948; x=1688616948; 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=Q4GUGGH+zCp3wzi6W1jvMzxkwxoCrIf85Aeq3hIW7ew=; b=kvl87nE0bZ8bCMr0O8q99FISUTfe1TrHyGyBcHNyVATtq+8XRQa0vp7wzZGVVTcuAo 1dfjCCPgpOnAgOF0oPqVzWdDbFog1OC/fxO++giFH/e25UZdug26alfdyokXPTOjO+By qTlBKYywPg6MPy2lk6Q/kl4JVkD2FTi2pfnagAb9MxUPzDVF/UndYgi0RereZkQGCcUT oDTTD0QCYm5o1gxv78jHAlYi1Sqri50HpLElnSmXe0uPfHm9wEMGYh/oy5lQDfry/VKK dkOqX36wnZbsZRxb6sZ0BuLrWY4+jvS660hbcAoT9ZLQfJPxXrOBLZHgxC+guSkP7tO2 iVBg== X-Gm-Message-State: AC+VfDzAjy/wvYEpbLulWvFF7eEBcjmyxod8lcKUs7Hkjrn3iLaQsUWg caWPDSAc64sqscOIEY9wSx7GVQ== X-Google-Smtp-Source: ACHHUZ4v0RN1v5uyNQ6DEAdh0xaDsf/5pwkZR2fXBT/PX7o1BwR3AfB3tm6k6LBlyzHtFtGPWOE9CQ== X-Received: by 2002:a7b:c407:0:b0:3f6:f56:9ad with SMTP id k7-20020a7bc407000000b003f60f5609admr918105wmi.13.1686024948113; Mon, 05 Jun 2023 21:15:48 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id n2-20020a05600c294200b003f727764b10sm12306610wmd.4.2023.06.05.21.15.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2023 21:15:47 -0700 (PDT) Content-Type: text/plain; charset=us-ascii 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: git: 1bbdfb0b4386 - main - gve: Add PNP info to PCI attachment of gve(4) driver. From: Jessica Clarke In-Reply-To: <202306060406.35646hbA078041@gitrepo.freebsd.org> Date: Tue, 6 Jun 2023 05:15:37 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6A5F859A-033A-43E1-81CB-B364662DE2F3@freebsd.org> References: <202306060406.35646hbA078041@gitrepo.freebsd.org> To: Xin LI X-Mailer: Apple Mail (2.3731.500.231) X-Rspamd-Queue-Id: 4QZxwj4lwyz3N52 X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 6 Jun 2023, at 05:06, Xin LI wrote: >=20 > The branch main has been updated by delphij: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D1bbdfb0b438689a839e29094fcb582a1= 04cbabd9 >=20 > commit 1bbdfb0b438689a839e29094fcb582a104cbabd9 > Author: Xin LI > AuthorDate: 2023-06-06 00:58:43 +0000 > Commit: Xin LI > CommitDate: 2023-06-06 04:05:55 +0000 >=20 > gve: Add PNP info to PCI attachment of gve(4) driver. >=20 > Reviewed-by: imp > Differential Revision: https://reviews.freebsd.org/D40429 > --- > sys/dev/gve/gve_main.c | 28 ++++++++++++++++++++++++---- > 1 file changed, 24 insertions(+), 4 deletions(-) >=20 > diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c > index ae45a0cfc24a..383fd326d33a 100644 > --- a/sys/dev/gve/gve_main.c > +++ b/sys/dev/gve/gve_main.c > @@ -38,6 +38,16 @@ >=20 > #define GVE_DEFAULT_RX_COPYBREAK 256 >=20 > +/* Devices supported by this driver. */ > +static struct gve_dev { > + uint16_t vendor_id; > + uint16_t device_id; > + const char *name; > +} gve_devs[] =3D { > + { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" } > +}; > +#define GVE_DEVS_COUNT nitems(gve_devs) IMO this obfuscates rather than helps given the loop iterates over gve_devs (and the macro references it). > + > struct sx gve_global_lock; >=20 > static int > @@ -701,10 +711,18 @@ gve_service_task(void *arg, int pending) > static int > gve_probe(device_t dev) > { > - if (pci_get_vendor(dev) =3D=3D PCI_VENDOR_ID_GOOGLE && > - pci_get_device(dev) =3D=3D PCI_DEV_ID_GVNIC) { > - device_set_desc(dev, "gVNIC"); > - return (BUS_PROBE_DEFAULT); > + uint16_t deviceid, vendorid; > + int i; > + > + vendorid =3D pci_get_vendor(dev); > + deviceid =3D pci_get_device(dev); > + > + for (i =3D 0; i < GVE_DEVS_COUNT; i++) { > + if (vendorid =3D=3D gve_devs[i].vendor_id && > + deviceid =3D=3D gve_devs[i].device_id) { > + device_set_desc(dev, gve_devs[i].name); > + return (BUS_PROBE_DEFAULT); > + } > } > return (ENXIO); > } > @@ -851,3 +869,5 @@ DRIVER_MODULE(gve, pci, gve_driver, gve_devclass, = 0, 0); > #else > DRIVER_MODULE(gve, pci, gve_driver, 0, 0); > #endif > +MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs, This is missing ;D:# so it will break as soon as you have a second entry in the table. Jess > + GVE_DEVS_COUNT); From nobody Tue Jun 6 04:31:56 2023 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 4QZyHY6bVyz4bld1 for ; Tue, 6 Jun 2023 04:32:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (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 4QZyHY4pQsz3QG2 for ; Tue, 6 Jun 2023 04:32:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9745baf7c13so688097166b.1 for ; Mon, 05 Jun 2023 21:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20221208.gappssmtp.com; s=20221208; t=1686025928; x=1688617928; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=II1vapOVkldguiLbfYwly/YEq8lJBMvVWYgW8C8Mwh4=; b=GnZQyp9Jbi5AgYltIdLMu5T/dZsyUmTz68heP8dMJJZ1SXm0g/K6NDyEcj43yf6yp6 A6fYMt5t1hv18OTMelgPFRarZ5nk5xnGQ4Zw4g7eSNv/sICgvSZ0xWMuxKXLSvy480Yj RM72Rgfs/Fh23fk3IHH3Xr76QGuSy9xMSWYvsP02Hv7LyOCNAgoplZhOQ2e07WxPvYI1 d0GR35Vek7ZNkrpSTNsxbS0IuI7mUPRucBPpkuqUhSAjacvdmwtmtvRiKbEzg3yd0kEP +CgPTiaXKzL4+MT8Hqe2CwM0W5EbxKnbAEyGzySnVdoJvHJSNuf8flGNje7w3Jx63V8P oinA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686025928; x=1688617928; 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=II1vapOVkldguiLbfYwly/YEq8lJBMvVWYgW8C8Mwh4=; b=Jl9Qfk99whPQpR3/P0ddYe0KfMBff5aBWdZNAM8oH5LitUwu8YgnTTyHsBEEHOQM2b EsoGoTlCJ1WcwIJlvIg5toH/m98nbTJsQVLPz7BUL6IdFxHaMtj9DXHZnUoB4YsRlS4h VLeald27DViPHYWwa60sJzDjNeaizxE3FBSg2j9N0e902hyiO8NyXSwB2opQE9z1ICwQ jJfwxFQYbUCmSzsGmtDKamqKd3U1kSEz+RJqIJmE69xN/MnbPYRWKC67LQF2m/T1hY/b 7JQ4+gbDAiComO4fCd4uUrKztR4p1MJmEYkzwtmRfZhWMQMtFxSrkp8H+p+aWDZAeT5d iPlw== X-Gm-Message-State: AC+VfDy4HuCvhLh5dr6D4EuXxQbgrk8ce3fN1qWiY3uJpQWStgw3JDg9 YfvmHl0aT74ebs8LaH3GyXUt//1el9Zu1ebi6EtIB65OYIGZ0wit X-Google-Smtp-Source: ACHHUZ6UQdlF59Sov8dtWvX1hz0r2oIIG0+vnYyrMMhzmk30E93uzMmTASC2Ngw9b/33oK0RSyWZ0NXBOxCL6pdFygg= X-Received: by 2002:a17:906:dc8e:b0:970:482:9fcd with SMTP id cs14-20020a170906dc8e00b0097004829fcdmr1143223ejc.24.1686025927900; Mon, 05 Jun 2023 21:32:07 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202306060406.35646hbA078041@gitrepo.freebsd.org> <6A5F859A-033A-43E1-81CB-B364662DE2F3@freebsd.org> In-Reply-To: <6A5F859A-033A-43E1-81CB-B364662DE2F3@freebsd.org> From: Warner Losh Date: Mon, 5 Jun 2023 22:31:56 -0600 Message-ID: Subject: Re: git: 1bbdfb0b4386 - main - gve: Add PNP info to PCI attachment of gve(4) driver. To: Jessica Clarke Cc: Xin LI , src-committers , "" , "" Content-Type: multipart/alternative; boundary="00000000000083cf7805fd6e8084" X-Rspamd-Queue-Id: 4QZyHY4pQsz3QG2 X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --00000000000083cf7805fd6e8084 Content-Type: text/plain; charset="UTF-8" On Mon, Jun 5, 2023, 10:15 PM Jessica Clarke wrote: > On 6 Jun 2023, at 05:06, Xin LI wrote: > > > > The branch main has been updated by delphij: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=1bbdfb0b438689a839e29094fcb582a104cbabd9 > > > > commit 1bbdfb0b438689a839e29094fcb582a104cbabd9 > > Author: Xin LI > > AuthorDate: 2023-06-06 00:58:43 +0000 > > Commit: Xin LI > > CommitDate: 2023-06-06 04:05:55 +0000 > > > > gve: Add PNP info to PCI attachment of gve(4) driver. > > > > Reviewed-by: imp > > Differential Revision: https://reviews.freebsd.org/D40429 > > --- > > sys/dev/gve/gve_main.c | 28 ++++++++++++++++++++++++---- > > 1 file changed, 24 insertions(+), 4 deletions(-) > > > > diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c > > index ae45a0cfc24a..383fd326d33a 100644 > > --- a/sys/dev/gve/gve_main.c > > +++ b/sys/dev/gve/gve_main.c > > @@ -38,6 +38,16 @@ > > > > #define GVE_DEFAULT_RX_COPYBREAK 256 > > > > +/* Devices supported by this driver. */ > > +static struct gve_dev { > > + uint16_t vendor_id; > > + uint16_t device_id; > > + const char *name; > > +} gve_devs[] = { > > + { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" } > > +}; > > +#define GVE_DEVS_COUNT nitems(gve_devs) > > IMO this obfuscates rather than helps given the loop iterates over > gve_devs (and the macro references it). > > > + > > struct sx gve_global_lock; > > > > static int > > @@ -701,10 +711,18 @@ gve_service_task(void *arg, int pending) > > static int > > gve_probe(device_t dev) > > { > > - if (pci_get_vendor(dev) == PCI_VENDOR_ID_GOOGLE && > > - pci_get_device(dev) == PCI_DEV_ID_GVNIC) { > > - device_set_desc(dev, "gVNIC"); > > - return (BUS_PROBE_DEFAULT); > > + uint16_t deviceid, vendorid; > > + int i; > > + > > + vendorid = pci_get_vendor(dev); > > + deviceid = pci_get_device(dev); > > + > > + for (i = 0; i < GVE_DEVS_COUNT; i++) { > > + if (vendorid == gve_devs[i].vendor_id && > > + deviceid == gve_devs[i].device_id) { > > + device_set_desc(dev, gve_devs[i].name); > > + return (BUS_PROBE_DEFAULT); > > + } > > } > > return (ENXIO); > > } > > @@ -851,3 +869,5 @@ DRIVER_MODULE(gve, pci, gve_driver, gve_devclass, 0, > 0); > > #else > > DRIVER_MODULE(gve, pci, gve_driver, 0, 0); > > #endif > > +MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs, > > This is missing ;D:# so it will break as soon as you have a second > entry in the table. > While the first bit is true, I though we encoded the per entry size so trailing garbage didn't matter.. d# will be more useful in the future maybe. Warner Jess > > > + GVE_DEVS_COUNT); > --00000000000083cf7805fd6e8084 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



On Mon, Jun 5, 2023, 10:15 PM Jessica Clarke <jrtc27@freebsd.org> wrote:
On 6 Jun 2023, at 05:06, Xin LI <delphij= @FreeBSD.org> wrote:
>
> The branch main has been updated by delphij:
>
> URL: https://cgit.FreeBSD.org/src/commit/?id=3D1bbdfb0b438689a839e29094fcb582= a104cbabd9
>
> commit 1bbdfb0b438689a839e29094fcb582a104cbabd9
> Author:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org>
> AuthorDate: 2023-06-06 00:58:43 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Xin LI <delphij@FreeBSD.org>
> CommitDate: 2023-06-06 04:05:55 +0000
>
>=C2=A0 =C2=A0 gve: Add PNP info to PCI attachment of gve(4) driver.
>
>=C2=A0 =C2=A0 Reviewed-by:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 imp=
>=C2=A0 =C2=A0 Differential Revision:=C2=A0 https://= reviews.freebsd.org/D40429
> ---
> sys/dev/gve/gve_main.c | 28 ++++++++++++++++++++++++----
> 1 file changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c
> index ae45a0cfc24a..383fd326d33a 100644
> --- a/sys/dev/gve/gve_main.c
> +++ b/sys/dev/gve/gve_main.c
> @@ -38,6 +38,16 @@
>
> #define GVE_DEFAULT_RX_COPYBREAK 256
>
> +/* Devices supported by this driver. */
> +static struct gve_dev {
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 uint16_t vendor_id;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 uint16_t device_id;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 const char *name;
> +} gve_devs[] =3D {
> + { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" }
> +};
> +#define GVE_DEVS_COUNT nitems(gve_devs)

IMO this obfuscates rather than helps given the loop iterates over
gve_devs (and the macro references it).

> +
> struct sx gve_global_lock;
>
> static int
> @@ -701,10 +711,18 @@ gve_service_task(void *arg, int pending)
> static int
> gve_probe(device_t dev)
> {
> - if (pci_get_vendor(dev) =3D=3D PCI_VENDOR_ID_GOOGLE &&
> -=C2=A0 =C2=A0 pci_get_device(dev) =3D=3D PCI_DEV_ID_GVNIC) {
> - device_set_desc(dev, "gVNIC");
> - return (BUS_PROBE_DEFAULT);
> + uint16_t deviceid, vendorid;
> + int i;
> +
> + vendorid =3D pci_get_vendor(dev);
> + deviceid =3D pci_get_device(dev);
> +
> + for (i =3D 0; i < GVE_DEVS_COUNT; i++) {
> + if (vendorid =3D=3D gve_devs[i].vendor_id &&
> +=C2=A0 =C2=A0 deviceid =3D=3D gve_devs[i].device_id) {
> + device_set_desc(dev, gve_devs[i].name);
> + return (BUS_PROBE_DEFAULT);
> + }
> }
> return (ENXIO);
> }
> @@ -851,3 +869,5 @@ DRIVER_MODULE(gve, pci, gve_driver, gve_devclass, = 0, 0);
> #else
> DRIVER_MODULE(gve, pci, gve_driver, 0, 0);
> #endif
> +MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs= ,

This is missing ;D:# so it will break as soon as you have a second
entry in the table.

While the first bit is true, I though we encoded the per= entry size so trailing garbage didn't matter.. d# will be more useful = in the future maybe.

War= ner

Jess

> +=C2=A0 =C2=A0 GVE_DEVS_COUNT);
--00000000000083cf7805fd6e8084-- From nobody Tue Jun 6 05:04:28 2023 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 4QZz152TxKz4bs3S for ; Tue, 6 Jun 2023 05:04:41 +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 "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QZz146ZbJz3jyV for ; Tue, 6 Jun 2023 05:04:40 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f735259fa0so27865845e9.1 for ; Mon, 05 Jun 2023 22:04:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686027879; x=1688619879; 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=zxWFVzi1HiS1qYaYSzBLzclZNUijbqqFFbZ6le2a4wE=; b=bmsRF/7Tizwh3uULvRdpiJ99Oka2AGz/i0kJOxTae/BMaWqa2GfMAXYCRhiBe0L3Pl qrQYAxH+4Xzswhxye6iAWzbNG1Au4YVCVF8yjsG7ZagPPAHTra79vOrYYgbM4VMQ3Ikh ZVttDm1S3qHpqqZ/A8oORhomDYrjWjucYhmniqi2D7Jkte/Qh53L/YA2DK8Un7G36mxn m9d0iZ9IoTfc9fMDradljdUaJI3Xa2Klq+462AkR3Lm7mXlhqPd22efV48NC5+1bL3F/ gTG7qJMNszV6q/Y4ioOdg9KG7rNsdbw9fqKNg5UE890amcGnSl9hYxWfkxQLX0PslVUi O2HQ== X-Gm-Message-State: AC+VfDyO1L/mPwtpBj5xPM4UwNjCzdobpx+VSLHzhdeOzuOYmYX2vKuL 8FyFGqxMsBOoEYfOytjz1euu3w== X-Google-Smtp-Source: ACHHUZ43FVFXtqc7XVve7chBsn1/m6Z6030Hw3/CD/KAwrtxcFJascwG0IfWreSgPLpL2tg4DCO+6w== X-Received: by 2002:a1c:ed0a:0:b0:3f4:2ae5:b35d with SMTP id l10-20020a1ced0a000000b003f42ae5b35dmr1171893wmh.40.1686027879552; Mon, 05 Jun 2023 22:04:39 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id l17-20020a1ced11000000b003f4266965fbsm16288330wmh.5.2023.06.05.22.04.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Jun 2023 22:04:39 -0700 (PDT) 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: git: 1bbdfb0b4386 - main - gve: Add PNP info to PCI attachment of gve(4) driver. From: Jessica Clarke In-Reply-To: Date: Tue, 6 Jun 2023 06:04:28 +0100 Cc: Xin LI , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202306060406.35646hbA078041@gitrepo.freebsd.org> <6A5F859A-033A-43E1-81CB-B364662DE2F3@freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3731.500.231) X-Rspamd-Queue-Id: 4QZz146ZbJz3jyV X-Spamd-Bar: ---- 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-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 6 Jun 2023, at 05:31, Warner Losh wrote: >=20 >=20 >=20 > On Mon, Jun 5, 2023, 10:15 PM Jessica Clarke = wrote: > On 6 Jun 2023, at 05:06, Xin LI wrote: > >=20 > > The branch main has been updated by delphij: > >=20 > > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D1bbdfb0b438689a839e29094fcb582a1= 04cbabd9 > >=20 > > commit 1bbdfb0b438689a839e29094fcb582a104cbabd9 > > Author: Xin LI > > AuthorDate: 2023-06-06 00:58:43 +0000 > > Commit: Xin LI > > CommitDate: 2023-06-06 04:05:55 +0000 > >=20 > > gve: Add PNP info to PCI attachment of gve(4) driver. > >=20 > > Reviewed-by: imp > > Differential Revision: https://reviews.freebsd.org/D40429 > > --- > > sys/dev/gve/gve_main.c | 28 ++++++++++++++++++++++++---- > > 1 file changed, 24 insertions(+), 4 deletions(-) > >=20 > > diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c > > index ae45a0cfc24a..383fd326d33a 100644 > > --- a/sys/dev/gve/gve_main.c > > +++ b/sys/dev/gve/gve_main.c > > @@ -38,6 +38,16 @@ > >=20 > > #define GVE_DEFAULT_RX_COPYBREAK 256 > >=20 > > +/* Devices supported by this driver. */ > > +static struct gve_dev { > > + uint16_t vendor_id; > > + uint16_t device_id; > > + const char *name; > > +} gve_devs[] =3D { > > + { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" } > > +}; > > +#define GVE_DEVS_COUNT nitems(gve_devs) >=20 > IMO this obfuscates rather than helps given the loop iterates over > gve_devs (and the macro references it). >=20 > > + > > struct sx gve_global_lock; > >=20 > > static int > > @@ -701,10 +711,18 @@ gve_service_task(void *arg, int pending) > > static int > > gve_probe(device_t dev) > > { > > - if (pci_get_vendor(dev) =3D=3D PCI_VENDOR_ID_GOOGLE && > > - pci_get_device(dev) =3D=3D PCI_DEV_ID_GVNIC) { > > - device_set_desc(dev, "gVNIC"); > > - return (BUS_PROBE_DEFAULT); > > + uint16_t deviceid, vendorid; > > + int i; > > + > > + vendorid =3D pci_get_vendor(dev); > > + deviceid =3D pci_get_device(dev); > > + > > + for (i =3D 0; i < GVE_DEVS_COUNT; i++) { > > + if (vendorid =3D=3D gve_devs[i].vendor_id && > > + deviceid =3D=3D gve_devs[i].device_id) { > > + device_set_desc(dev, gve_devs[i].name); > > + return (BUS_PROBE_DEFAULT); > > + } > > } > > return (ENXIO); > > } > > @@ -851,3 +869,5 @@ DRIVER_MODULE(gve, pci, gve_driver, = gve_devclass, 0, 0); > > #else > > DRIVER_MODULE(gve, pci, gve_driver, 0, 0); > > #endif > > +MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs, >=20 > This is missing ;D:# so it will break as soon as you have a second > entry in the table. >=20 > While the first bit is true, I though we encoded the per entry size so = trailing garbage didn't matter.. d# will be more useful in the future = maybe. Hm indeed you=E2=80=99re right. Might as well include it still though. Jess > Warner >=20 > Jess >=20 > > + GVE_DEVS_COUNT); From nobody Tue Jun 6 05:20:33 2023 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 4QZzMT0NFXz4ZQyK; Tue, 6 Jun 2023 05:20:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4QZzMS7140z3lqt; Tue, 6 Jun 2023 05:20:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686028837; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mdqVt3cZgrp4G8kfpVnIaaQImDIIeEO7udGlUVrL5/g=; b=HeW9tUBY5fkpiuYjgRNbo6mWQcnLdK3qTQnaYVPlIiHIhOX0ClPWXOmKpHSpaKpPzOVhlt IUoXWFyWwLvJ91AgSb2SttA75mmDfo4XB6yUMaNbfzjlWvB5o6Fn2HPSxsthjcW7divHTQ /SX04M41OdBzuew0p11u1U1Bq6OLHiRDTpOX4NdOZtB1yyDzeNLn8JO/NNFUP/hnoHaalb yLbsDQKeAXLws/ZB2ME2bXmqEFwgLp3KnkMcPhLwsCjsVEK6jpqacGZIaVj7jyC8zB+d3P plKQwA8urAeHKKmAil18N+UERDPrpcA6d8BFcjU7iCMmg/qysS5ABCM6woI+tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686028837; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mdqVt3cZgrp4G8kfpVnIaaQImDIIeEO7udGlUVrL5/g=; b=m35Sqoqa/CMGU2PB/e2Xlv0i5T3bbL422ZokCUCbdBdmKwc0ix2Mjig9IHBHB6oQd+DuJA QzbQlXFaUjcjSRJdX9tZpQhwKQ31LKsc74KegCOs5QVIhBpdYAVDM0mxAnIVyllI+GPf2E nSbDQwIDgVi9xC3btQ14kNdcoL7p+nLQc8Y7TFCaKE/qyXcOO3DNybrxmIAC3qAs1PLAHO Q2n28DQB+pT1bTGk61cTMM4v8Fpuy1LdCbJwGwzshO3JyH401MeLk5AI9IpSZjSs7COMI5 v33VMfEkQRa1Mxd+eMQ2/j3xh4lj5eahtzLubx+bT6q9mQNT689/I/Hz7pcGtQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686028837; a=rsa-sha256; cv=none; b=hvSabrXW5ZIPilOUwwS6YCEmFlcaG3XVSS6VVbuRyPJRpiRJqJ/ik7Oxj4hcifztxsFjdf hL/zRmhs7slcAdvaWiS23Sa2Pd9tRybKAFjOA515Aa3VrIELdWbOioGncwFZH7PVW84H2/ 0w+eDjncMiVrtKODfwbg/dT+LuEvBk0Fp4QJFwW9CEgEnzq/3qT5FqKt9fyfHtSonIzUQM ORv2e1QmG6L/AbFKwK9z2EqXXzCUhTrIK5rWOiWUyfzbCWODUTB3uV4/lsmuW8A9ygPcyQ Ufu1qLmWoVM/k0HrGfwCOuyNUDlvHP4SYTss7aho5wG64C+3g0N4PQxgCqxj0w== Received: from odin.corp.delphij.net (c-141-193-140-155.rev.sailinternet.net [141.193.140.155]) (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 did not present a certificate) (Authenticated sender: delphij/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QZzMS1hkkzbCY; Tue, 6 Jun 2023 05:20:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Message-ID: <55c01465-2c16-bc6b-d1fb-4b9f670d4503@FreeBSD.org> Date: Mon, 5 Jun 2023 22:20:33 -0700 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Thunderbird Subject: Re: git: 1bbdfb0b4386 - main - gve: Add PNP info to PCI attachment of gve(4) driver. Content-Language: en-US To: Jessica Clarke , Warner Losh Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202306060406.35646hbA078041@gitrepo.freebsd.org> <6A5F859A-033A-43E1-81CB-B364662DE2F3@freebsd.org> From: Xin Li Organization: The FreeBSD Project In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 2023-06-05 10:04 PM, Jessica Clarke wrote: > On 6 Jun 2023, at 05:31, Warner Losh wrote: >> >> >> >> On Mon, Jun 5, 2023, 10:15 PM Jessica Clarke wrote: >> On 6 Jun 2023, at 05:06, Xin LI wrote: >>> >>> The branch main has been updated by delphij: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=1bbdfb0b438689a839e29094fcb582a104cbabd9 >>> >>> commit 1bbdfb0b438689a839e29094fcb582a104cbabd9 >>> Author: Xin LI >>> AuthorDate: 2023-06-06 00:58:43 +0000 >>> Commit: Xin LI >>> CommitDate: 2023-06-06 04:05:55 +0000 >>> >>> gve: Add PNP info to PCI attachment of gve(4) driver. >>> >>> Reviewed-by: imp >>> Differential Revision: https://reviews.freebsd.org/D40429 >>> --- >>> sys/dev/gve/gve_main.c | 28 ++++++++++++++++++++++++---- >>> 1 file changed, 24 insertions(+), 4 deletions(-) >>> >>> diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c >>> index ae45a0cfc24a..383fd326d33a 100644 >>> --- a/sys/dev/gve/gve_main.c >>> +++ b/sys/dev/gve/gve_main.c >>> @@ -38,6 +38,16 @@ >>> >>> #define GVE_DEFAULT_RX_COPYBREAK 256 >>> >>> +/* Devices supported by this driver. */ >>> +static struct gve_dev { >>> + uint16_t vendor_id; >>> + uint16_t device_id; >>> + const char *name; >>> +} gve_devs[] = { >>> + { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" } >>> +}; >>> +#define GVE_DEVS_COUNT nitems(gve_devs) >> >> IMO this obfuscates rather than helps given the loop iterates over >> gve_devs (and the macro references it). >> >>> + >>> struct sx gve_global_lock; >>> >>> static int >>> @@ -701,10 +711,18 @@ gve_service_task(void *arg, int pending) >>> static int >>> gve_probe(device_t dev) >>> { >>> - if (pci_get_vendor(dev) == PCI_VENDOR_ID_GOOGLE && >>> - pci_get_device(dev) == PCI_DEV_ID_GVNIC) { >>> - device_set_desc(dev, "gVNIC"); >>> - return (BUS_PROBE_DEFAULT); >>> + uint16_t deviceid, vendorid; >>> + int i; >>> + >>> + vendorid = pci_get_vendor(dev); >>> + deviceid = pci_get_device(dev); >>> + >>> + for (i = 0; i < GVE_DEVS_COUNT; i++) { >>> + if (vendorid == gve_devs[i].vendor_id && >>> + deviceid == gve_devs[i].device_id) { >>> + device_set_desc(dev, gve_devs[i].name); >>> + return (BUS_PROBE_DEFAULT); >>> + } >>> } >>> return (ENXIO); >>> } >>> @@ -851,3 +869,5 @@ DRIVER_MODULE(gve, pci, gve_driver, gve_devclass, 0, 0); >>> #else >>> DRIVER_MODULE(gve, pci, gve_driver, 0, 0); >>> #endif >>> +MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs, >> >> This is missing ;D:# so it will break as soon as you have a second >> entry in the table. >> >> While the first bit is true, I though we encoded the per entry size so trailing garbage didn't matter.. d# will be more useful in the future maybe. > > Hm indeed you’re right. Might as well include it still though. I've created https://reviews.freebsd.org/D40430 in attempt to address both issues. After the change, the 'gVNIC' would be in linker.hints (but it's not clear to me if the data is really useful for tools today). I can split this into two changes if you like. Cheers, From nobody Tue Jun 6 08:52:27 2023 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 4Qb43v54RCz4ZjKg; Tue, 6 Jun 2023 08:52:27 +0000 (UTC) (envelope-from git@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 4Qb43v4bx4z47Ds; Tue, 6 Jun 2023 08:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686041547; 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; bh=QQQT7VRmt8b+4wNUx2hM0B5hSr6DEdjRegj2Gz/kv4Q=; b=FGoTCTqKXOA/gAPg28osnvQeCUmpykN3yf85tQGwKCwwfjofUE0OSjlVAJ6bARsdyfcKui mKpG7eEVkRGVtANEb77W16e1Hljx5/Gp+gfXnYBzi70/Bjcf6WK8WlvkQWHwpgc62zpAxS PiwwG+cprn74din4+AtOgG052q0JowTdTthyNHxioUhnuOgIxn/T5fBISUmpup3PTJnbGi T7GKn5eSwrTwLD4HmHj7M9hXAUl/ajcCahMzLUWZZ8OCZt5DXNwtIbQ2Y+pRkGeAzavaPK dmxBPAqRz/tP/TN7vx02d3VPlj+Yf5ZLrq60mOIzE6IXnaNwh1G4MrLvLuIJgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686041547; 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; bh=QQQT7VRmt8b+4wNUx2hM0B5hSr6DEdjRegj2Gz/kv4Q=; b=mkNbPSSFK3h4J6MGTqZ93cvh/i9yaJnpQYJjfK404Y57QJv0tLlZvXyR3t9G2eJZ4/nNa+ MFemuL517vLjE/iwqRxDFhwcOTkGP2vBW9pXbJ0cBUTc5sey0nB/3xfA7UX7gTilA4ZrCW Byg1rLqGnvv8qKpb4WuUEysrgbs6cQfJZgSOEpyvnETsJ9CZaRb7uG8RFTzi+Dg+Wz2hH0 /9vzfaXB20IQ3Pu8xhAFRRFx9GfSGsJkoSzAwST+/pjbm1jb+1xYPsmoZZfX1ZZLbOKZ8P 4XZpbufVfrHntRatlfP1mvm6yjRtgt86dWtOabfozTVrF9JW7aUPHx9uXQm9NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686041547; a=rsa-sha256; cv=none; b=WkhOcFdVEP1mGmSHkm+G5aOxatgFCAgv6vncHVffvakHc2NpOmqT+FXQ7FUuYR5ewGAS5c 3Cl/PnIzKyj+/7FdaumqPOGePyhQgq4v52UVYBISt1UN0rBcCaHLIc0SK3yQuTLIz/WeK4 9ELAam0PtwKHHzMbKfEx2Q4e0lOpY2ODRQ1fbGkXEjCd+o0ZHRRxDxd2oruYm40hjs3SmK 4ntrUx7yASPWWE1IJzRn93nkTIfc89xqvrFU4zDR+ZGJ7WUMb73BMaqT7KPl1peUuMskg7 5/POwfWqEzn5hNclMUNC95aXIBHQYTILSh1at9PMK+p14FamzED6thwWfq0BKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qb43v3gpPzNy8; Tue, 6 Jun 2023 08:52:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3568qRaS051939; Tue, 6 Jun 2023 08:52:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3568qRZT051938; Tue, 6 Jun 2023 08:52:27 GMT (envelope-from git) Date: Tue, 6 Jun 2023 08:52:27 GMT Message-Id: <202306060852.3568qRZT051938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a9bfd080d09a - main - if_epair: do not transmit packets that exceed the interface MTU 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9bfd080d09a915055af51103defb5c38b94a236 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a9bfd080d09a915055af51103defb5c38b94a236 commit a9bfd080d09a915055af51103defb5c38b94a236 Author: Kristof Provost AuthorDate: 2023-06-02 14:37:09 +0000 Commit: Kristof Provost CommitDate: 2023-06-06 08:00:48 +0000 if_epair: do not transmit packets that exceed the interface MTU While if_epair has no issues doing this we should drop those packets anyway, because it improves the fidelity of the automated tests. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40397 --- sys/net/if_epair.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c index aee5a76a046b..56bfdfbd610f 100644 --- a/sys/net/if_epair.c +++ b/sys/net/if_epair.c @@ -336,6 +336,17 @@ epair_transmit(struct ifnet *ifp, struct mbuf *m) return (0); M_ASSERTPKTHDR(m); + /* + * We could just transmit this, but it makes testing easier if we're a + * little bit more like real hardware. + * Allow just that little bit extra for ethernet (and vlan) headers. + */ + if (m->m_pkthdr.len > (ifp->if_mtu + sizeof(struct ether_vlan_header))) { + m_freem(m); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); + return (E2BIG); + } + /* * We are not going to use the interface en/dequeue mechanism * on the TX side. We are called from ether_output_frame() From nobody Tue Jun 6 08:52:28 2023 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 4Qb43w63vyz4ZjcH; Tue, 6 Jun 2023 08:52:28 +0000 (UTC) (envelope-from git@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 4Qb43w573qz47Yq; Tue, 6 Jun 2023 08:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686041548; 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; bh=Vz4f9BCGseoZ/kE4lewrRfQgFpzxNoZSa2ew9OWHMAk=; b=UC2+e8MPdHgmLXIIXW+uARFyGWutik4K7bcf2XraJ0Pd3x1RfTgWI30kdht7RQNPs6Vc/w iC7RwIWCu5KnSGaln1gMBV73xmlNeXljwkXfHqVA2p7zNEQwaRcRxxOwiheB243U5PXYgA LuJwGtpM/rBluWQV1G/1arA8aahzAJRwBqW1CiZlEQwAQKhwIweJusQLv9FBPENcCj804r cV4Mlt1EPV5z/KJvvopqKab/djQmFmGYwiYe9oZqYF9zirURgha8wkamn5f6gMAcYOFQzl nOmsQ/6vH4mPcGpwe+0ckzLdgIreSy0rRu1cFzF6Ij1YLQgYC55vRkJWFTdq1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686041548; 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; bh=Vz4f9BCGseoZ/kE4lewrRfQgFpzxNoZSa2ew9OWHMAk=; b=MGoCPNaG1SNeTzgUMUJR135nY20Q0FsFE1hp/AURH8CYoYiyW5RAe80LGo3rT6ALBVDpak KchGBlFJsJ2CcB1ZmK//6yR5LLbgN58Sv25V1CucFN36znVtzmIsU3MV8b5CnqE2SVtqbe mW3b0STYeXnq5TtD6Vs16WPkikDC9kZWnhrgJHzD9VlNp4Yt6t9fLcEpE4sgDBk42T5zPT y+ihXqGh3j4CJcM95TdEuBIx5t3Ch86GbAaobbJHJH2pbcHwHFgC5GjjdB091CPuJzI9h3 PYH8vEhqOJF7Ci+chO0fZvcg8N1OWN8dD1/H8xihCI2OWo15g2aYU7RRlFSwjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686041548; a=rsa-sha256; cv=none; b=C43qN8aPLP+QMzwEsrqEUebceSWCAZThuZezhBbiFko7yFD367IJID/lPv9ITIW/aMgFcr O56KbqfRPMzMBdyAdi6qRzCLdEK1CMsxjmZUpO7hTMnRA1B/ZVpA/t2YNJJqJ4Sj3LqmHc K1o1+h/UOxhTlvDmxeHpFvdPJfjqKDE6DzK8VQBEKnrs4o6CTPntq0ncQ2KP4yQdoZzF2L WXwK3HD6/SOAOMbgZ1ElxFDQCxdwO5KwBhe/PlIQEYCSh+Hm9xJ8kcJP5ex9UQU6O0kyL3 nxZSqueWp7zLIU0bv8aTj6AkQUp1wUHLxdaBTvofQvMpXOodUpe062tr4uuHJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qb43w44xJzP3m; Tue, 6 Jun 2023 08:52:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3568qSEm052406; Tue, 6 Jun 2023 08:52:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3568qS8k052394; Tue, 6 Jun 2023 08:52:28 GMT (envelope-from git) Date: Tue, 6 Jun 2023 08:52:28 GMT Message-Id: <202306060852.3568qS8k052394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 185c1cddd7ef - main - netinet: re-read IP length after PFIL hook 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 185c1cddd7ef34db82bc3a25b3c92556416a4e55 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=185c1cddd7ef34db82bc3a25b3c92556416a4e55 commit 185c1cddd7ef34db82bc3a25b3c92556416a4e55 Author: Kristof Provost AuthorDate: 2023-06-02 14:38:30 +0000 Commit: Kristof Provost CommitDate: 2023-06-06 08:01:03 +0000 netinet: re-read IP length after PFIL hook The pfil hook may modify the packet, so before we check its length (to decide if it needs to be fragmented or not) we should re-read that length. This is most likely to happen when pf is reassembling packets. In that scenario we'd receive the last fragment, which is likely to be a short packet, pf would reassemble it (likely exceeding the interface MTU) and then we'd transmit it without fragmenting, because we're comparing the MTU to the length of the last fragment, not the fully reassembled packet. See also: https://redmine.pfsense.org/issues/14396 Reviewed by: cy MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40395 --- sys/netinet/ip_output.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index ceae756affa3..1976ab9803af 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -699,6 +699,7 @@ sendit: case 0: /* Continue normally */ ip = mtod(m, struct ip *); + ip_len = ntohs(ip->ip_len); break; case -1: /* Need to try again */ From nobody Tue Jun 6 08:52:29 2023 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 4Qb43x6vQ7z4ZjSs; Tue, 6 Jun 2023 08:52:29 +0000 (UTC) (envelope-from git@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 4Qb43x6BZjz47P1; Tue, 6 Jun 2023 08:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686041549; 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; bh=hrOc2Ov+cHaAnWGFYFZcOh0vlWeFP9BB1NTZDukTh1M=; b=Q+Xleu9/0urQ7CtUzN1J7+iYQ3W8yQ9uWTb6Lp+qyUWUyVTPB2c6zA3wO4RRfHde9zb7/d h5xH0Tz6ttR4klHEUo3JNgs5fCEbEj/AmWUpsXUreyRHOCfAvQSInUCQ9n3/VGzLqH/fWq 8tObWnB5417m4KKaD7cv85jgaFQw8BN5pCycTqgkZvpK4TcU7B2AyqCSbXOocVLv5Kwz8L nPA5593n8kv6CRJjYaxiomvkbymFsDshIZy0JgYsQTh7ES7T/5W6xVtvAHbk8WBgM5pBNb NAdzUCo6B5Zr1y+TnnOob9W21TG4fEJ5RbcZ7gaioi7EPlzNEkXo0PS1n0PnGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686041549; 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; bh=hrOc2Ov+cHaAnWGFYFZcOh0vlWeFP9BB1NTZDukTh1M=; b=c5qKyLUCVwmJcydBDKREUu/j6UmorIiTBuXbgDHOqHocHzKPy8pcs69/fg9l8P/bd/rjAJ 3ckJ69Dwedss6eizWOnpKak2uv0qJWrHenrt9T2+jPdaL7Vnbas7luyaw+4p0sSDMtxJ/6 /OlTixrixyu4QpKDu8KN8L23kqKOPeSAWVWo/hyk/53hNkS9FDKDndpe12SHd0EMFZtcLq vOmhlhffEld3ArQx4G3xZ6Z1e8IUmW8KYgdSsNvKl5teRXJSrHMNSFGKky35WO9b5Rf3R2 kCkWRclOI2C0irrIdZQTTRs9gle4UyDqjyBMGPd+7NrS5gXWhnd1n0+f2fsIJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686041549; a=rsa-sha256; cv=none; b=CSvsA4vUD2xy3q/+0wOkaTFthS5AvSmRfVeV1y7oKbsgdXzwN55zMI5KyKAfYDvp7ks8tc 7AHEunkZ99Zqm16r4QDx8wNhGqOvA7RWGUcFnjAkMeFMphL1LLcRjI3AEomKuN0OJh6rW0 rtdT9/+t7zF51lA/h6Y9ghPU7Wlt7NeLD5jMZ2RvK7CxDm0YDGFKtQ5QoaQZxUK3ykdMD2 0NLgvcsvbEWp3AAzoQJzL0DXw7z6a8JqQEcEXSg8/Qmk6350+9t70va7Alj1qy9tQKQCeE mhrBRE2xn4GyCmp8g+L1k4qFVrFDqnvFatSSjfMfKoNFVdWSi6SEJCxUAjVBeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qb43x53sxzNTr; Tue, 6 Jun 2023 08:52:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3568qTC2054006; Tue, 6 Jun 2023 08:52:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3568qTRC053993; Tue, 6 Jun 2023 08:52:29 GMT (envelope-from git) Date: Tue, 6 Jun 2023 08:52:29 GMT Message-Id: <202306060852.3568qTRC053993@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 657aec455f7c - main - pf tests: test reassembly in the slow path 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 657aec455f7cd960c8fa79a089f88f450c568d2d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=657aec455f7cd960c8fa79a089f88f450c568d2d commit 657aec455f7cd960c8fa79a089f88f450c568d2d Author: Kristof Provost AuthorDate: 2023-06-02 14:42:08 +0000 Commit: Kristof Provost CommitDate: 2023-06-06 08:03:50 +0000 pf tests: test reassembly in the slow path Ensure that 'fragment reassemble' works as expected, even in the IP stack's slow forwarding path. (So not via ip_tryforward()) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D40396 --- tests/sys/netpfil/pf/fragmentation_pass.sh | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/tests/sys/netpfil/pf/fragmentation_pass.sh b/tests/sys/netpfil/pf/fragmentation_pass.sh index 560642a189e8..d257de730d2d 100644 --- a/tests/sys/netpfil/pf/fragmentation_pass.sh +++ b/tests/sys/netpfil/pf/fragmentation_pass.sh @@ -425,6 +425,49 @@ no_df_cleanup() pft_cleanup } +atf_test_case "reassemble_slowpath" "cleanup" +reassemble_slowpath_head() +{ + atf_set descr 'Test reassembly on the slow path' + atf_set require.user root +} + +reassemble_slowpath_body() +{ + if ! sysctl -q kern.features.ipsec >/dev/null ; then + atf_skip "This test requires ipsec" + fi + + setup_router_server_ipv4 + + # Now define an ipsec policy so we end up taking the slow path. + # We don't actually need the traffic to go through ipsec, we just don't + # want to go through ip_tryforward(). + echo "flush; + spdflush; + spdadd 203.0.113.1/32 203.0.113.2/32 any -P out ipsec esp/transport//require; + add 203.0.113.1 203.0.113.2 esp 0x1001 -E aes-gcm-16 \"12345678901234567890\";" \ + | jexec router setkey -c + + # Sanity check. + ping_server_check_reply exit:0 --ping-type=icmp + + # Enable packet reassembly with clearing of the no-df flag. + pft_set_rules router \ + "scrub in on ${epair_tester}b fragment no reassemble" \ + "scrub on ${epair_server}a fragment reassemble" \ + "pass" + + # Ensure that the packet makes it through the slow path + atf_check -s exit:0 -o ignore \ + ping -c 1 -s 2000 198.51.100.2 +} + +reassemble_slowpath_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "too_many_fragments" @@ -435,4 +478,5 @@ atf_init_test_cases() atf_add_test_case "overlimit" atf_add_test_case "reassemble" atf_add_test_case "no_df" + atf_add_test_case "reassemble_slowpath" } From nobody Tue Jun 6 10:11:09 2023 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 4Qb5pj3Shqz4ZrY4; Tue, 6 Jun 2023 10:11:09 +0000 (UTC) (envelope-from git@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 4Qb5pj3J3tz4JCR; Tue, 6 Jun 2023 10:11:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686046269; 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; bh=uF96G5F3tEOmqowUVosg+jvn7tGj09idHllE/WPXPn0=; b=EI92CYZZ906az0L5TRxIdt5ta99+qiL7QRdfiY38mowzE3WwOWHCNno1eR043QIutLoQs7 uWbHHg2YGgB0f6xoItvhy2KM5AohShrgm+bTgu0tIpA6wVpdykyfLtK6EmgJIit6HQ5rcD kAJICEeAFlEh/HOlGOqNS6Ri03oEM3KobJi/hEAgj3WMWm4M2EKUBksASICPrtaMAfShGO EERTlqOfcFVP44QgImGZxKbE0DbYCJx0H9L/PyaBUvxkHS//16uI34rz7NO+snGywF5MxN //I8FeFtQabO+sHcips4nP3OVuerrJKKFhIk/0s9e1jhSgRfLu+FvgYFkdssSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686046269; 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; bh=uF96G5F3tEOmqowUVosg+jvn7tGj09idHllE/WPXPn0=; b=k6oZsGXyt5ZN19shEx/7mnaREa10OA008Vu4lx0MCDKYgd0DnAgGlswTgYcf3LgDI64E5l jAP3f1oXP8gbgQ3fZuY1dijoWiD5f2fXA15KrRbTEX7CJVupjUy33ETPqsv7XGX7w4bcPA alYtC3dzoC/aLnUWFyXwkkTNg741DASbzq2Wc49I6DqEkI0is0/XNUoIWZSYD2fq6ekFz6 HM0WbLcP8BPRC0RCxjyyD2LdaKvSGGP/vTjf+xmg3Hu5Q/XMQmjDSnZXJXP7wAlSgvGuVa 8yFMKjWBHRHyLZghyBvYIfqaviwMW5KnXax28qY+Q443YTNfK6052/BAMJto6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686046269; a=rsa-sha256; cv=none; b=WnL4+q9aPuQv+9MIiRgU9Suyn+VTvTp2TU6djGk1etTJWJx3TGqgJpk9EuUYWXxQNdjWLt VijtWmQd41+y1Ym+AIRictATXkDIe2aSDm4+t3QT/5IbqxLdjYmik2QKXmY3Yt9YCGQuV8 La0dosuuCkOy0fQ4Vc/OTYEfaTvHRfgr+dqqkLTwG3KwDGY8jtSpvy6RkXEKIB1ZXoa+8M f2Sk+HkQzVXLztC0CNHNI0PRylGTmmvV9lRYKEJqWHzWx9iH4qx3Si1DsFIC4UAV9ziaox 4DNVczezvvd06FUtRxy2UmZ9GeKfs/f/PwGqMWfGmeCPynUvpCJtuDRkp8YP9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qb5pj2MWSzQtN; Tue, 6 Jun 2023 10:11:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 356AB93n081907; Tue, 6 Jun 2023 10:11:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 356AB9YF081906; Tue, 6 Jun 2023 10:11:09 GMT (envelope-from git) Date: Tue, 6 Jun 2023 10:11:09 GMT Message-Id: <202306061011.356AB9YF081906@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 62f9bcf2b427 - main - Switch to contigmalloc in the Hyper-V code 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 62f9bcf2b4271d58ccf0bd8a81c540bb99a53ef7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=62f9bcf2b4271d58ccf0bd8a81c540bb99a53ef7 commit 62f9bcf2b4271d58ccf0bd8a81c540bb99a53ef7 Author: Andrew Turner AuthorDate: 2023-05-22 18:52:54 +0000 Commit: Andrew Turner CommitDate: 2023-06-06 09:50:59 +0000 Switch to contigmalloc in the Hyper-V code In the Hyper-V drivers we need to allocate buffers shared between the host and guest. This memory has been allocated with bus_dma, however it doesn't use this correctly, e.g. it is missing calls to bus_dmamap_sync. Along with this on arm64 we need this memory to be mapped with the correct memory type that bus_dma may not use. Switch to contigmalloc to allocate this memory as this will correctly allocate cacheable memory. Reviewed by: Souradeep Chakrabarti Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40227 --- sys/dev/hyperv/include/hyperv_busdma.h | 4 -- sys/dev/hyperv/netvsc/hn_nvs.c | 11 ++++-- sys/dev/hyperv/netvsc/hn_rndis.c | 1 - sys/dev/hyperv/netvsc/if_hn.c | 28 +++++++------- sys/dev/hyperv/netvsc/if_hnvar.h | 3 -- sys/dev/hyperv/pcib/vmbus_pcib.c | 1 - sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c | 17 ++++---- sys/dev/hyperv/vmbus/hyperv_busdma.c | 47 ---------------------- sys/dev/hyperv/vmbus/hyperv_common_reg.h | 2 + sys/dev/hyperv/vmbus/vmbus.c | 60 +++++++++++++---------------- sys/dev/hyperv/vmbus/vmbus_chan.c | 29 +++++++------- sys/dev/hyperv/vmbus/vmbus_chanvar.h | 4 +- sys/dev/hyperv/vmbus/vmbus_var.h | 6 --- sys/dev/hyperv/vmbus/vmbus_xact.c | 14 ++++--- 14 files changed, 86 insertions(+), 141 deletions(-) diff --git a/sys/dev/hyperv/include/hyperv_busdma.h b/sys/dev/hyperv/include/hyperv_busdma.h index ff01b3e27a95..804e5c26a669 100644 --- a/sys/dev/hyperv/include/hyperv_busdma.h +++ b/sys/dev/hyperv/include/hyperv_busdma.h @@ -41,9 +41,5 @@ struct hyperv_dma { void hyperv_dma_map_paddr(void *arg, bus_dma_segment_t *segs, int nseg, int error); -void *hyperv_dmamem_alloc(bus_dma_tag_t parent_dtag, - bus_size_t alignment, bus_addr_t boundary, bus_size_t size, - struct hyperv_dma *dma, int flags); -void hyperv_dmamem_free(struct hyperv_dma *dma, void *ptr); #endif /* !_HYPERV_BUSDMA_H_ */ diff --git a/sys/dev/hyperv/netvsc/hn_nvs.c b/sys/dev/hyperv/netvsc/hn_nvs.c index 4dbc28996617..e1769a806c89 100644 --- a/sys/dev/hyperv/netvsc/hn_nvs.c +++ b/sys/dev/hyperv/netvsc/hn_nvs.c @@ -43,6 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include #include #include @@ -52,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -166,7 +169,8 @@ hn_nvs_conn_rxbuf(struct hn_softc *sc) * just share this RXBUF. */ error = vmbus_chan_gpadl_connect(sc->hn_prichan, - sc->hn_rxbuf_dma.hv_paddr, rxbuf_size, &sc->hn_rxbuf_gpadl); + pmap_kextract((vm_offset_t)sc->hn_rxbuf), rxbuf_size, + &sc->hn_rxbuf_gpadl); if (error) { if_printf(sc->hn_ifp, "rxbuf gpadl conn failed: %d\n", error); @@ -235,7 +239,8 @@ hn_nvs_conn_chim(struct hn_softc *sc) * Sub-channels just share this chimney sending buffer. */ error = vmbus_chan_gpadl_connect(sc->hn_prichan, - sc->hn_chim_dma.hv_paddr, HN_CHIM_SIZE, &sc->hn_chim_gpadl); + pmap_kextract((vm_offset_t)sc->hn_chim), HN_CHIM_SIZE, + &sc->hn_chim_gpadl); if (error) { if_printf(sc->hn_ifp, "chim gpadl conn failed: %d\n", error); goto cleanup; diff --git a/sys/dev/hyperv/netvsc/hn_rndis.c b/sys/dev/hyperv/netvsc/hn_rndis.c index 58167312c9f3..cafe73ff519c 100644 --- a/sys/dev/hyperv/netvsc/hn_rndis.c +++ b/sys/dev/hyperv/netvsc/hn_rndis.c @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 5d7002b8f65f..aeb6ec22a703 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -85,6 +85,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include #include @@ -4984,9 +4988,8 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) * - A large enough buffer is allocated, certain version of NVSes * may further limit the usable space. */ - sc->hn_rxbuf = hyperv_dmamem_alloc(bus_get_dma_tag(dev), - PAGE_SIZE, 0, HN_RXBUF_SIZE, &sc->hn_rxbuf_dma, - BUS_DMA_WAITOK | BUS_DMA_ZERO); + sc->hn_rxbuf = contigmalloc(HN_RXBUF_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); if (sc->hn_rxbuf == NULL) { device_printf(sc->hn_dev, "allocate rxbuf failed\n"); return (ENOMEM); @@ -5016,9 +5019,8 @@ hn_create_rx_data(struct hn_softc *sc, int ring_cnt) for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { struct hn_rx_ring *rxr = &sc->hn_rx_ring[i]; - rxr->hn_br = hyperv_dmamem_alloc(bus_get_dma_tag(dev), - PAGE_SIZE, 0, HN_TXBR_SIZE + HN_RXBR_SIZE, - &rxr->hn_br_dma, BUS_DMA_WAITOK); + rxr->hn_br = contigmalloc(HN_TXBR_SIZE + HN_RXBR_SIZE, M_DEVBUF, + M_WAITOK | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); if (rxr->hn_br == NULL) { device_printf(dev, "allocate bufring failed\n"); return (ENOMEM); @@ -5171,7 +5173,7 @@ hn_destroy_rx_data(struct hn_softc *sc) if (sc->hn_rxbuf != NULL) { if ((sc->hn_flags & HN_FLAG_RXBUF_REF) == 0) - hyperv_dmamem_free(&sc->hn_rxbuf_dma, sc->hn_rxbuf); + contigfree(sc->hn_rxbuf, HN_RXBUF_SIZE, M_DEVBUF); else device_printf(sc->hn_dev, "RXBUF is referenced\n"); sc->hn_rxbuf = NULL; @@ -5186,7 +5188,8 @@ hn_destroy_rx_data(struct hn_softc *sc) if (rxr->hn_br == NULL) continue; if ((rxr->hn_rx_flags & HN_RX_FLAG_BR_REF) == 0) { - hyperv_dmamem_free(&rxr->hn_br_dma, rxr->hn_br); + contigfree(rxr->hn_br, HN_TXBR_SIZE + HN_RXBR_SIZE, + M_DEVBUF); } else { device_printf(sc->hn_dev, "%dth channel bufring is referenced", i); @@ -5491,9 +5494,8 @@ hn_create_tx_data(struct hn_softc *sc, int ring_cnt) * * NOTE: It is shared by all channels. */ - sc->hn_chim = hyperv_dmamem_alloc(bus_get_dma_tag(sc->hn_dev), - PAGE_SIZE, 0, HN_CHIM_SIZE, &sc->hn_chim_dma, - BUS_DMA_WAITOK | BUS_DMA_ZERO); + sc->hn_chim = contigmalloc(HN_CHIM_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); if (sc->hn_chim == NULL) { device_printf(sc->hn_dev, "allocate txbuf failed\n"); return (ENOMEM); @@ -5689,7 +5691,7 @@ hn_destroy_tx_data(struct hn_softc *sc) if (sc->hn_chim != NULL) { if ((sc->hn_flags & HN_FLAG_CHIM_REF) == 0) { - hyperv_dmamem_free(&sc->hn_chim_dma, sc->hn_chim); + contigfree(sc->hn_chim, HN_CHIM_SIZE, M_DEVBUF); } else { device_printf(sc->hn_dev, "chimney sending buffer is referenced"); @@ -6263,7 +6265,7 @@ hn_chan_attach(struct hn_softc *sc, struct vmbus_channel *chan) * Open this channel */ cbr.cbr = rxr->hn_br; - cbr.cbr_paddr = rxr->hn_br_dma.hv_paddr; + cbr.cbr_paddr = pmap_kextract((vm_offset_t)rxr->hn_br); cbr.cbr_txsz = HN_TXBR_SIZE; cbr.cbr_rxsz = HN_RXBR_SIZE; error = vmbus_chan_open_br(chan, &cbr, NULL, 0, hn_chan_callback, rxr); diff --git a/sys/dev/hyperv/netvsc/if_hnvar.h b/sys/dev/hyperv/netvsc/if_hnvar.h index b85513308267..cc1f53b91876 100644 --- a/sys/dev/hyperv/netvsc/if_hnvar.h +++ b/sys/dev/hyperv/netvsc/if_hnvar.h @@ -102,7 +102,6 @@ struct hn_rx_ring { struct sysctl_oid *hn_rx_sysctl_tree; void *hn_br; /* TX/RX bufring */ - struct hyperv_dma hn_br_dma; struct vmbus_channel *hn_chan; } __aligned(CACHE_LINE_SIZE); @@ -242,10 +241,8 @@ struct hn_softc { void *hn_rxbuf; uint32_t hn_rxbuf_gpadl; - struct hyperv_dma hn_rxbuf_dma; uint32_t hn_chim_gpadl; - struct hyperv_dma hn_chim_dma; uint32_t hn_rndis_rid; uint32_t hn_ndis_ver; diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index d68ad6821ad8..a684e79fbd14 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #endif #include -#include #include #include #include diff --git a/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c b/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c index c158f72eb9e7..9b9c240d3843 100644 --- a/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c +++ b/sys/dev/hyperv/vmbus/amd64/hyperv_machdep.c @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -41,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -51,7 +54,6 @@ __FBSDID("$FreeBSD$"); struct hyperv_reftsc_ctx { struct hyperv_reftsc *tsc_ref; - struct hyperv_dma tsc_ref_dma; }; static uint32_t hyperv_tsc_vdso_timehands( @@ -117,7 +119,7 @@ hyperv_tsc_mmap(struct cdev *dev __unused, vm_ooffset_t offset, if (offset != 0) return (EOPNOTSUPP); - *paddr = hyperv_ref_tsc.tsc_ref_dma.hv_paddr; + *paddr = pmap_kextract((vm_offset_t)hyperv_ref_tsc.tsc_ref); return (0); } @@ -208,18 +210,17 @@ hyperv_tsc_tcinit(void *dummy __unused) return; } - hyperv_ref_tsc.tsc_ref = hyperv_dmamem_alloc(NULL, PAGE_SIZE, 0, - sizeof(struct hyperv_reftsc), &hyperv_ref_tsc.tsc_ref_dma, - BUS_DMA_WAITOK | BUS_DMA_ZERO); + hyperv_ref_tsc.tsc_ref = contigmalloc(PAGE_SIZE, M_DEVBUF, + M_WAITOK | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); if (hyperv_ref_tsc.tsc_ref == NULL) { printf("hyperv: reftsc page allocation failed\n"); return; } orig = rdmsr(MSR_HV_REFERENCE_TSC); - val = MSR_HV_REFTSC_ENABLE | (orig & MSR_HV_REFTSC_RSVD_MASK) | - ((hyperv_ref_tsc.tsc_ref_dma.hv_paddr >> PAGE_SHIFT) << - MSR_HV_REFTSC_PGSHIFT); + val = (pmap_kextract((vm_offset_t)hyperv_ref_tsc.tsc_ref) >> + PAGE_SHIFT) << MSR_HV_REFTSC_PGSHIFT; + val |= MSR_HV_REFTSC_ENABLE | (orig & MSR_HV_REFTSC_RSVD_MASK); wrmsr(MSR_HV_REFERENCE_TSC, val); /* Register "enlightened" timecounter. */ diff --git a/sys/dev/hyperv/vmbus/hyperv_busdma.c b/sys/dev/hyperv/vmbus/hyperv_busdma.c index 9550540014c4..81817d476d29 100644 --- a/sys/dev/hyperv/vmbus/hyperv_busdma.c +++ b/sys/dev/hyperv/vmbus/hyperv_busdma.c @@ -49,50 +49,3 @@ hyperv_dma_map_paddr(void *arg, bus_dma_segment_t *segs, int nseg, int error) *paddr = segs->ds_addr; } -void * -hyperv_dmamem_alloc(bus_dma_tag_t parent_dtag, bus_size_t alignment, - bus_addr_t boundary, bus_size_t size, struct hyperv_dma *dma, int flags) -{ - void *ret; - int error; - - error = bus_dma_tag_create(parent_dtag, /* parent */ - alignment, /* alignment */ - boundary, /* boundary */ - BUS_SPACE_MAXADDR, /* lowaddr */ - BUS_SPACE_MAXADDR, /* highaddr */ - NULL, NULL, /* filter, filterarg */ - size, /* maxsize */ - 1, /* nsegments */ - size, /* maxsegsize */ - 0, /* flags */ - NULL, /* lockfunc */ - NULL, /* lockfuncarg */ - &dma->hv_dtag); - if (error) - return NULL; - - error = bus_dmamem_alloc(dma->hv_dtag, &ret, - (flags & HYPERV_DMA_MASK) | BUS_DMA_COHERENT, &dma->hv_dmap); - if (error) { - bus_dma_tag_destroy(dma->hv_dtag); - return NULL; - } - - error = bus_dmamap_load(dma->hv_dtag, dma->hv_dmap, ret, size, - hyperv_dma_map_paddr, &dma->hv_paddr, BUS_DMA_NOWAIT); - if (error) { - bus_dmamem_free(dma->hv_dtag, ret, dma->hv_dmap); - bus_dma_tag_destroy(dma->hv_dtag); - return NULL; - } - return ret; -} - -void -hyperv_dmamem_free(struct hyperv_dma *dma, void *ptr) -{ - bus_dmamap_unload(dma->hv_dtag, dma->hv_dmap); - bus_dmamem_free(dma->hv_dtag, ptr, dma->hv_dmap); - bus_dma_tag_destroy(dma->hv_dtag); -} diff --git a/sys/dev/hyperv/vmbus/hyperv_common_reg.h b/sys/dev/hyperv/vmbus/hyperv_common_reg.h index 2a6437390ca6..e303d263a7fe 100644 --- a/sys/dev/hyperv/vmbus/hyperv_common_reg.h +++ b/sys/dev/hyperv/vmbus/hyperv_common_reg.h @@ -61,10 +61,12 @@ #define MSR_HV_SIEFP_ENABLE 0x0001ULL #define MSR_HV_SIEFP_RSVD_MASK 0x0ffeULL #define MSR_HV_SIEFP_PGSHIFT 12 +#define MSR_HV_SIEFP_PGMASK (~0ULL << MSR_HV_SIEFP_PGSHIFT) #define MSR_HV_SIMP_ENABLE 0x0001ULL #define MSR_HV_SIMP_RSVD_MASK 0x0ffeULL #define MSR_HV_SIMP_PGSHIFT 12 +#define MSR_HV_SIMP_PGMASK (~0ULL << MSR_HV_SIMP_PGSHIFT) #define MSR_HV_SINT_VECTOR_MASK 0x00ffULL #define MSR_HV_SINT_RSVD1_MASK 0xff00ULL diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index c349f862d378..ae4c466d98d9 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -425,9 +426,9 @@ vmbus_connect(struct vmbus_softc *sc, uint32_t version) req = vmbus_msghc_dataptr(mh); req->chm_hdr.chm_type = VMBUS_CHANMSG_TYPE_CONNECT; req->chm_ver = version; - req->chm_evtflags = sc->vmbus_evtflags_dma.hv_paddr; - req->chm_mnf1 = sc->vmbus_mnf1_dma.hv_paddr; - req->chm_mnf2 = sc->vmbus_mnf2_dma.hv_paddr; + req->chm_evtflags = pmap_kextract((vm_offset_t)sc->vmbus_evtflags); + req->chm_mnf1 = pmap_kextract((vm_offset_t)sc->vmbus_mnf1); + req->chm_mnf2 = pmap_kextract((vm_offset_t)sc->vmbus_mnf2); error = vmbus_msghc_exec(sc, mh); if (error) { @@ -744,17 +745,17 @@ vmbus_synic_setup(void *xsc) * Setup the SynIC message. */ orig = RDMSR(MSR_HV_SIMP); - val = MSR_HV_SIMP_ENABLE | (orig & MSR_HV_SIMP_RSVD_MASK) | - ((VMBUS_PCPU_GET(sc, message_dma.hv_paddr, cpu) >> PAGE_SHIFT) - << MSR_HV_SIMP_PGSHIFT); + val = pmap_kextract((vm_offset_t)VMBUS_PCPU_GET(sc, message, cpu)) & + MSR_HV_SIMP_PGMASK; + val |= MSR_HV_SIMP_ENABLE | (orig & MSR_HV_SIMP_RSVD_MASK); WRMSR(MSR_HV_SIMP, val); /* * Setup the SynIC event flags. */ orig = RDMSR(MSR_HV_SIEFP); - val = MSR_HV_SIEFP_ENABLE | (orig & MSR_HV_SIEFP_RSVD_MASK) | - ((VMBUS_PCPU_GET(sc, event_flags_dma.hv_paddr, cpu) >> PAGE_SHIFT) - << MSR_HV_SIEFP_PGSHIFT); + val = pmap_kextract((vm_offset_t)VMBUS_PCPU_GET(sc, event_flags, cpu)) & + MSR_HV_SIMP_PGMASK; + val |= MSR_HV_SIEFP_ENABLE | (orig & MSR_HV_SIEFP_RSVD_MASK); WRMSR(MSR_HV_SIEFP, val); /* @@ -817,48 +818,43 @@ vmbus_synic_teardown(void *arg) static int vmbus_dma_alloc(struct vmbus_softc *sc) { - bus_dma_tag_t parent_dtag; uint8_t *evtflags; int cpu; - parent_dtag = bus_get_dma_tag(sc->vmbus_dev); CPU_FOREACH(cpu) { void *ptr; /* * Per-cpu messages and event flags. */ - ptr = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, - PAGE_SIZE, VMBUS_PCPU_PTR(sc, message_dma, cpu), - BUS_DMA_WAITOK | BUS_DMA_ZERO); + ptr = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); if (ptr == NULL) return ENOMEM; VMBUS_PCPU_GET(sc, message, cpu) = ptr; - ptr = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, - PAGE_SIZE, VMBUS_PCPU_PTR(sc, event_flags_dma, cpu), - BUS_DMA_WAITOK | BUS_DMA_ZERO); + ptr = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); if (ptr == NULL) return ENOMEM; VMBUS_PCPU_GET(sc, event_flags, cpu) = ptr; } - evtflags = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, - PAGE_SIZE, &sc->vmbus_evtflags_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO); + evtflags = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); if (evtflags == NULL) return ENOMEM; sc->vmbus_rx_evtflags = (u_long *)evtflags; sc->vmbus_tx_evtflags = (u_long *)(evtflags + (PAGE_SIZE / 2)); sc->vmbus_evtflags = evtflags; - sc->vmbus_mnf1 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, - PAGE_SIZE, &sc->vmbus_mnf1_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO); + sc->vmbus_mnf1 = contigmalloc(PAGE_SIZE, M_DEVBUF, M_WAITOK | M_ZERO, + 0ul, ~0ul, PAGE_SIZE, 0); if (sc->vmbus_mnf1 == NULL) return ENOMEM; - sc->vmbus_mnf2 = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, - sizeof(struct vmbus_mnf), &sc->vmbus_mnf2_dma, - BUS_DMA_WAITOK | BUS_DMA_ZERO); + sc->vmbus_mnf2 = contigmalloc(sizeof(struct vmbus_mnf), M_DEVBUF, + M_WAITOK | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); if (sc->vmbus_mnf2 == NULL) return ENOMEM; @@ -871,31 +867,29 @@ vmbus_dma_free(struct vmbus_softc *sc) int cpu; if (sc->vmbus_evtflags != NULL) { - hyperv_dmamem_free(&sc->vmbus_evtflags_dma, sc->vmbus_evtflags); + contigfree(sc->vmbus_evtflags, PAGE_SIZE, M_DEVBUF); sc->vmbus_evtflags = NULL; sc->vmbus_rx_evtflags = NULL; sc->vmbus_tx_evtflags = NULL; } if (sc->vmbus_mnf1 != NULL) { - hyperv_dmamem_free(&sc->vmbus_mnf1_dma, sc->vmbus_mnf1); + contigfree(sc->vmbus_mnf1, PAGE_SIZE, M_DEVBUF); sc->vmbus_mnf1 = NULL; } if (sc->vmbus_mnf2 != NULL) { - hyperv_dmamem_free(&sc->vmbus_mnf2_dma, sc->vmbus_mnf2); + contigfree(sc->vmbus_mnf2, sizeof(struct vmbus_mnf), M_DEVBUF); sc->vmbus_mnf2 = NULL; } CPU_FOREACH(cpu) { if (VMBUS_PCPU_GET(sc, message, cpu) != NULL) { - hyperv_dmamem_free( - VMBUS_PCPU_PTR(sc, message_dma, cpu), - VMBUS_PCPU_GET(sc, message, cpu)); + contigfree(VMBUS_PCPU_GET(sc, message, cpu), PAGE_SIZE, + M_DEVBUF); VMBUS_PCPU_GET(sc, message, cpu) = NULL; } if (VMBUS_PCPU_GET(sc, event_flags, cpu) != NULL) { - hyperv_dmamem_free( - VMBUS_PCPU_PTR(sc, event_flags_dma, cpu), - VMBUS_PCPU_GET(sc, event_flags, cpu)); + contigfree(VMBUS_PCPU_GET(sc, event_flags, cpu), + PAGE_SIZE, M_DEVBUF); VMBUS_PCPU_GET(sc, event_flags, cpu) = NULL; } } diff --git a/sys/dev/hyperv/vmbus/vmbus_chan.c b/sys/dev/hyperv/vmbus/vmbus_chan.c index 032e06c47c95..ff7bbc7c0dc3 100644 --- a/sys/dev/hyperv/vmbus/vmbus_chan.c +++ b/sys/dev/hyperv/vmbus/vmbus_chan.c @@ -43,7 +43,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include +#include + #include #include #include @@ -137,7 +140,8 @@ vmbus_chan_signal(const struct vmbus_channel *chan) if (chan->ch_txflags & VMBUS_CHAN_TXF_HASMNF) atomic_set_int(chan->ch_montrig, chan->ch_montrig_mask); else - hypercall_signal_event(chan->ch_monprm_dma.hv_paddr); + hypercall_signal_event(pmap_kextract( + (vm_offset_t)chan->ch_monprm)); } static __inline void @@ -340,16 +344,16 @@ vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, * Allocate the TX+RX bufrings. */ KASSERT(chan->ch_bufring == NULL, ("bufrings are allocated")); - chan->ch_bufring = hyperv_dmamem_alloc(bus_get_dma_tag(chan->ch_dev), - PAGE_SIZE, 0, txbr_size + rxbr_size, &chan->ch_bufring_dma, - BUS_DMA_WAITOK); + chan->ch_bufring_size = txbr_size + rxbr_size; + chan->ch_bufring = contigmalloc(chan->ch_bufring_size, M_DEVBUF, + M_WAITOK | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); if (chan->ch_bufring == NULL) { vmbus_chan_printf(chan, "bufring allocation failed\n"); return (ENOMEM); } cbr.cbr = chan->ch_bufring; - cbr.cbr_paddr = chan->ch_bufring_dma.hv_paddr; + cbr.cbr_paddr = pmap_kextract((vm_offset_t)chan->ch_bufring); cbr.cbr_txsz = txbr_size; cbr.cbr_rxsz = rxbr_size; @@ -367,8 +371,8 @@ vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, "leak %d bytes memory\n", chan->ch_id, txbr_size + rxbr_size); } else { - hyperv_dmamem_free(&chan->ch_bufring_dma, - chan->ch_bufring); + contigfree(chan->ch_bufring, chan->ch_bufring_size, + M_DEVBUF); } chan->ch_bufring = NULL; } @@ -938,7 +942,7 @@ disconnect: * Destroy the TX+RX bufrings. */ if (chan->ch_bufring != NULL) { - hyperv_dmamem_free(&chan->ch_bufring_dma, chan->ch_bufring); + contigfree(chan->ch_bufring, chan->ch_bufring_size, M_DEVBUF); chan->ch_bufring = NULL; } return (error); @@ -1630,9 +1634,8 @@ vmbus_chan_alloc(struct vmbus_softc *sc) chan = malloc(sizeof(*chan), M_DEVBUF, M_WAITOK | M_ZERO); - chan->ch_monprm = hyperv_dmamem_alloc(bus_get_dma_tag(sc->vmbus_dev), - HYPERCALL_PARAM_ALIGN, 0, sizeof(struct hyperv_mon_param), - &chan->ch_monprm_dma, BUS_DMA_WAITOK | BUS_DMA_ZERO); + chan->ch_monprm = contigmalloc(sizeof(struct hyperv_mon_param), + M_DEVBUF, M_WAITOK | M_ZERO, 0ul, ~0ul, HYPERCALL_PARAM_ALIGN, 0); if (chan->ch_monprm == NULL) { device_printf(sc->vmbus_dev, "monprm alloc failed\n"); free(chan, M_DEVBUF); @@ -1671,7 +1674,7 @@ vmbus_chan_free(struct vmbus_channel *chan) KASSERT(chan->ch_poll_intvl == 0, ("chan%u: polling is activated", chan->ch_id)); - hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); + contigfree(chan->ch_monprm, sizeof(struct hyperv_mon_param), M_DEVBUF); mtx_destroy(&chan->ch_subchan_lock); sx_destroy(&chan->ch_orphan_lock); vmbus_rxbr_deinit(&chan->ch_rxbr); diff --git a/sys/dev/hyperv/vmbus/vmbus_chanvar.h b/sys/dev/hyperv/vmbus/vmbus_chanvar.h index b20b0119bc04..ba445ad2f82e 100644 --- a/sys/dev/hyperv/vmbus/vmbus_chanvar.h +++ b/sys/dev/hyperv/vmbus/vmbus_chanvar.h @@ -39,7 +39,6 @@ #include #include -#include #include #include @@ -99,7 +98,6 @@ struct vmbus_channel { */ struct hyperv_mon_param *ch_monprm; - struct hyperv_dma ch_monprm_dma; uint32_t ch_id; /* channel id */ device_t ch_dev; @@ -127,7 +125,7 @@ struct vmbus_channel { struct vmbus_channel *ch_prichan; /* owner primary chan */ void *ch_bufring; /* TX+RX bufrings */ - struct hyperv_dma ch_bufring_dma; + size_t ch_bufring_size; uint32_t ch_bufring_gpadl; struct task ch_attach_task; /* run in ch_mgmt_tq */ diff --git a/sys/dev/hyperv/vmbus/vmbus_var.h b/sys/dev/hyperv/vmbus/vmbus_var.h index c89d26d7aaf5..c50eeaca956d 100644 --- a/sys/dev/hyperv/vmbus/vmbus_var.h +++ b/sys/dev/hyperv/vmbus/vmbus_var.h @@ -34,7 +34,6 @@ #include #include -#include #include #include @@ -74,8 +73,6 @@ struct vmbus_pcpu_data { struct vmbus_evtflags *event_flags; /* event flags from host */ /* Rarely used fields */ - struct hyperv_dma message_dma; /* busdma glue */ - struct hyperv_dma event_flags_dma;/* busdma glue */ struct taskqueue *event_tq; /* event taskq */ struct taskqueue *message_tq; /* message taskq */ struct task message_task; /* message task */ @@ -105,11 +102,8 @@ struct vmbus_softc { /* Shared memory for vmbus_{rx,tx}_evtflags */ void *vmbus_evtflags; - struct hyperv_dma vmbus_evtflags_dma; void *vmbus_mnf1; /* monitored by VM, unused */ - struct hyperv_dma vmbus_mnf1_dma; - struct hyperv_dma vmbus_mnf2_dma; bool vmbus_scandone; struct task vmbus_scandone_task; diff --git a/sys/dev/hyperv/vmbus/vmbus_xact.c b/sys/dev/hyperv/vmbus/vmbus_xact.c index 90bdba7e1058..df6d8b45f9b1 100644 --- a/sys/dev/hyperv/vmbus/vmbus_xact.c +++ b/sys/dev/hyperv/vmbus/vmbus_xact.c @@ -34,7 +34,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include +#include + #include struct vmbus_xact { @@ -42,7 +45,6 @@ struct vmbus_xact { void *x_priv; void *x_req; - struct hyperv_dma x_req_dma; const void *x_resp; size_t x_resp_len; @@ -88,8 +90,8 @@ vmbus_xact_alloc(struct vmbus_xact_ctx *ctx, bus_dma_tag_t parent_dtag) xact->x_ctx = ctx; /* XXX assume that page aligned is enough */ - xact->x_req = hyperv_dmamem_alloc(parent_dtag, PAGE_SIZE, 0, - ctx->xc_req_size, &xact->x_req_dma, BUS_DMA_WAITOK); + xact->x_req = contigmalloc(ctx->xc_req_size, M_DEVBUF, + M_WAITOK | M_ZERO, 0ul, ~0ul, PAGE_SIZE, 0); if (xact->x_req == NULL) { free(xact, M_DEVBUF); return (NULL); @@ -105,7 +107,7 @@ static void vmbus_xact_free(struct vmbus_xact *xact) { - hyperv_dmamem_free(&xact->x_req_dma, xact->x_req); + contigfree(xact->x_req, xact->x_ctx->xc_req_size, M_DEVBUF); free(xact->x_resp0, M_DEVBUF); if (xact->x_priv != NULL) free(xact->x_priv, M_DEVBUF); @@ -243,7 +245,7 @@ bus_addr_t vmbus_xact_req_paddr(const struct vmbus_xact *xact) { - return (xact->x_req_dma.hv_paddr); + return (pmap_kextract((vm_offset_t)xact->x_req)); } void * From nobody Tue Jun 6 10:19:11 2023 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 4Qb60H5MQTz4Zrsc; Tue, 6 Jun 2023 10:19:27 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4Qb60H4d3zz4K0q; Tue, 6 Jun 2023 10:19:27 +0000 (UTC) (envelope-from markm@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686046767; 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=6zcCTVRN5K8bpbsy1RnDB/geLJ9YC5tVb+jGgdUAjm0=; b=n9jJFfIH7vc94vYB53HvwmjhOe9IrOoVfgfIkb3nqVxGSGZHo507SivYRjf6O3DNq248PL MySZCjcKDXBsVlijOJEQUTm5xomF9z0rZ/3Eax90cG+76MZ6P1VWZndD8mGzgsq5JD9DL0 Y04+DHbSa+7dbtRHxfS2TxKvzSdMholXgwA4AEfeFkEQhWmVEwaA0XQHeEFsRYNV4UNfK0 zPELAlFC8ibL7KZuUwr8LgwGEigOhav1v+1nHbmhHv9ZCugw65p0DA9Eg5gcjb6Y7X0+9x zcbdVxRRZGSAaIaGqX0b2Lx3CQKnrEW19jWhQm9MhWWN3IHUATnQ7MLHazV7Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686046767; 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=6zcCTVRN5K8bpbsy1RnDB/geLJ9YC5tVb+jGgdUAjm0=; b=we/v5DfAjWNKiDPvV6rXnZTHuW5EueYy4MOyDIy9VcYqdcOdbX39yl+b9TdHcRSH6XSXth QJQcjvR8esosSMyBC7U7KZCT+rz2wHTurR6pE9mnpdb5RNV3sbCXrs3qq9TwR46Hv2hddu gAFHO/Zbv7XMOQIEGFOXG7JJccOBU63fMqw4eJYehIOx/T19Xq/Ttj39Mau+KiaJPC+02q SyRq6cJEihJBzZMIQRFQAZp0DHZQX42nJNPBRVf8lnN8+lguBEcb2bLU3yLjq/ueG6Llee ZToWMkOZe2NzDFPm62ML2tusn9cUiATU6fHdFYpO3ZkKKBinE0BtFJlBZRZ+4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686046767; a=rsa-sha256; cv=none; b=p812SU/thDYOHSAm/FAGRp+/Fd5IQJTX8yCLXvypM5akZ9nTy3tyehRzkseT1u8mOZ59Ta QAOBFPzSRj4QMz+vdTDbfKLNfwcoI1+gAtcEXx5LS8abMVk2bLTxx65QANrSP032eEtk+D oaKOPMJhTivBX97km5UypakOa9Q8uPwgnyX0YVOqwwr85Iz8Y8e5YTEQdc34SLBeP10eyj 0Go54ONj/UAT83uzbqlS2ykOirp/DzvgN6vvRqREbQwxgQkAcL6ygBHqCRxOoZ/DR8IUok OSB9cGB7cIu67YkJyvbGqokYmJsOu5iJP61tYDdK0tjrcv2QXLTJCmNN8YYUvQ== Received: from smtpclient.apple (unknown [IPv6:2a02:8011:300b:42:3df6:911e:8c5f:d52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: markm) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Qb60G75Qvzh04; Tue, 6 Jun 2023 10:19:26 +0000 (UTC) (envelope-from markm@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F"; protocol="application/pgp-signature"; micalg=pgp-sha512 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\)) Subject: Re: git: 9d5a47e13c17 - main - ossl: Provide a fallback definition of __uint128_t when needed From: Mark Murray In-Reply-To: <202306041639.354Gdu2O043884@gitrepo.freebsd.org> Date: Tue, 6 Jun 2023 11:19:11 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: <0D94F493-2C78-4604-A6B4-422741929862@FreeBSD.org> References: <202306041639.354Gdu2O043884@gitrepo.freebsd.org> To: Mark Johnston X-Mailer: Apple Mail (2.3731.600.7) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F Content-Type: multipart/alternative; boundary="Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37" --Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi I see some duplication here; in sys/dev/random/uint128.h I solved the = same problem, except I needed some very basic functionality as well. = Maybe we combine these two somehow? M -- Mark R V Murray > On 4 Jun 2023, at 17:39, Mark Johnston wrote: >=20 > The branch main has been updated by markj: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9d5a47e13c175adf7486956847c3d060= fe059f2c >=20 > commit 9d5a47e13c175adf7486956847c3d060fe059f2c > Author: Mark Johnston > AuthorDate: 2023-06-02 22:18:05 +0000 > Commit: Mark Johnston > CommitDate: 2023-06-04 16:39:44 +0000 >=20 > ossl: Provide a fallback definition of __uint128_t when needed >=20 > This is required on i386. The patch has no functional change, = since > AES-GCM isn't implemented for that platform. >=20 > Fixes: 9a3444d91c70 ("ossl: Add a VAES-based AES-GCM = implementation for amd64") > Reported by: Jenkins > --- > sys/crypto/openssl/ossl_aes_gcm.h | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/sys/crypto/openssl/ossl_aes_gcm.h = b/sys/crypto/openssl/ossl_aes_gcm.h > index 9ce8ee193483..cd0c1e324354 100644 > --- a/sys/crypto/openssl/ossl_aes_gcm.h > +++ b/sys/crypto/openssl/ossl_aes_gcm.h > @@ -49,6 +49,10 @@ struct ossl_aes_gcm_ops { > size_t len); > }; >=20 > +#ifndef __SIZEOF_INT128__ > +typedef struct { uint64_t v[2]; } __uint128_t; > +#endif > + > struct ossl_gcm_context { > struct { > union { >=20 -- Mark R V Murray --Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi

I see some duplication here; = in sys/dev/random/uint128.h I solved the same problem, except I needed = some very basic functionality as well. Maybe we combine these two = somehow?

M
-- 
Mark R V = Murray



On 4 Jun 2023, at 17:39, = Mark Johnston <markj@FreeBSD.org> wrote:

The branch main has been = updated by markj:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9d5a47e13c175adf7486956847c3d060= fe059f2c

commit = 9d5a47e13c175adf7486956847c3d060fe059f2c
Author: =     Mark Johnston = <markj@FreeBSD.org>
AuthorDate: 2023-06-02 22:18:05 = +0000
Commit:     Mark Johnston = <markj@FreeBSD.org>
CommitDate: 2023-06-04 16:39:44 = +0000

   ossl: Provide a fallback definition of = __uint128_t when needed

   This is required on = i386.  The patch has no functional change, since
=    AES-GCM isn't implemented for that platform.

=    Fixes:  9a3444d91c70 ("ossl: Add a VAES-based = AES-GCM implementation for amd64")
   Reported by: =    Jenkins
---
sys/crypto/openssl/ossl_aes_gcm.h | = 4 ++++
1 file changed, 4 insertions(+)

diff --git = a/sys/crypto/openssl/ossl_aes_gcm.h = b/sys/crypto/openssl/ossl_aes_gcm.h
index 9ce8ee193483..cd0c1e324354 = 100644
--- a/sys/crypto/openssl/ossl_aes_gcm.h
+++ = b/sys/crypto/openssl/ossl_aes_gcm.h
@@ -49,6 +49,10 @@ struct = ossl_aes_gcm_ops {
   size_t = len);
};

+#ifndef __SIZEOF_INT128__
+typedef struct { = uint64_t v[2]; } __uint128_t;
+#endif
+
struct = ossl_gcm_context {
struct {
union = {




-- 
Mark R V Murray

= --Apple-Mail=_D2FA5B17-A905-46C3-A53A-3D16FA44BD37-- --Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 Comment: GPGTools - http://gpgtools.org iQEzBAEBCgAdFiEEyzPHvybPbOpU9MCxQlsJDh9CUqAFAmR/CB8ACgkQQlsJDh9C UqBl7gf/Z4/jvJuJ5NKDTmYCotcZU5iwP8+bTkj4FmOnC75+UZZtIz7JbtzTIH6u qzGWtqe3Mej3xC5rRa0Kyqrr3x9IiPqsbf3eo77z+d4xhP0v9E5INp4WLBJDTouH AkKtNW766wWO+WQQCwQu8rwWXJgBatV/x9th4M2HVz5OpfM6nLY/Bs0QSHibLmRF ca/eew3boMRtUSFCcCczAUJraTWvmaUrcOj3BKx+Zm0k2o0+bi9xm7haHl3p0On2 SAkL0noz2uXlArNixaD9NTDJZruFnQVPJL5rKyFxtL1UsDeTW6ybVUdGfMIQ4UwV gXab/9b6rwTDKHj1v62ojH8Fw4+jTw== =2XBq -----END PGP SIGNATURE----- --Apple-Mail=_07A87620-5DF6-48E5-A683-167AF465984F-- From nobody Tue Jun 6 12:57:49 2023 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 4Qb9W15wgvz4bVP6; Tue, 6 Jun 2023 12:57:49 +0000 (UTC) (envelope-from git@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 4Qb9W15lhLz3MDB; Tue, 6 Jun 2023 12:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686056269; 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; bh=4R8yulU3DBhD6qAWpUar0LcBAjDBG1TWdfqNCgpjPF0=; b=guj5vsa9FahwgJnin+U3YSjHBPEJH/nIX9KNZbAjgA8XMD9mWguaJJ4EuWj0cr22+d2zi/ v1B9bSojFlPKx6n3m3R2o3GiO8oC6G6PeLBshRIyOgCr1ZSxgDkZhFi64GINYPeRZ1q9bD r1LTjf/1tjv2k6hAaTyJIBsqmHm1QzBNzVAGou3cYWU4UZmfg8CfS8gvhljFeIRnPGveAn dtgoaiqDiDSxgJuanNatHCDHSa7dYwh9HprcSq6FkegMLuLnEuHzD3G5XiLl/dg1sJofRf NFGob5Z28S06F5Cy+YVOdz+RfpwM6gfmqGsZlrHvFCr6PGrcf1bfXpqLT77PlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686056269; 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; bh=4R8yulU3DBhD6qAWpUar0LcBAjDBG1TWdfqNCgpjPF0=; b=idk+2nwUXm7XIeKRyib4zVtHdDYwXDwZoVMJnKEQzjjmxLTloHOFYBWFSdlpkO1H1e7ASy yMxqnRqopAeHRFgj5DSOGIMg8juO2yhWekdcqotE4rLrNIQtSHAhmYws6mc8NIMuTlpVuv GVAi8L6wOGSQ4NwsReWUJ50gKLFWeVVZFVRXoU87+7AMSI6zKHFuf8kiTYjZEicJvASiUf +/7QckU1CEWsCC5u7pS3rvZIZurj8jVYsUyigtHEaNayGOieNa+8FTHkxqYB6aHZT3mcdf SwU2m6u19EPfDapHnk22d1hc810TVFXCDMoa9OOWcHDGin/Dz0C9B/wKYoD1DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686056269; a=rsa-sha256; cv=none; b=ZjliHNFsaUJrgyxJ0arjS6y6lRpHyfRK0HgUnoS7Fo6cjcf7ZFeqQa69mn/mMWeWDDwO7v +vz0uXsnpSzR/5r/ri4ZyN7R+xdHsZk8irNUb+WEoSDFL1Ned8/aXo4nYEdGZEtudXLGj8 owQCGNcaskAH9wbMLXT8IXYMnaVWCLCPaeFJGndhT2ZhZJ4Uij8FW2FFUX2duO1m1doeIs 7URLkz4JAwNk5ND435IkHhEwxF7Vteb0LiXyMvGqsvoxcx0HfoHgEO96pynsH0Z+m+RAVB EEK2RjDaw/yVuX44WXdK5OLzIDtgh4PBRfcymIyyCnGxyQ/XdMB8ad2CLbrZvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qb9W14qBDzWGl; Tue, 6 Jun 2023 12:57:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 356CvnqO051150; Tue, 6 Jun 2023 12:57:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 356CvnAx051149; Tue, 6 Jun 2023 12:57:49 GMT (envelope-from git) Date: Tue, 6 Jun 2023 12:57:49 GMT Message-Id: <202306061257.356CvnAx051149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: e6bfd18d21b2 - main - ntp: import ntp-4.2.8p17 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5 commit e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5 Merge: 62f9bcf2b427 ab1f1aa83333 Author: Cy Schubert AuthorDate: 2023-06-06 12:43:04 +0000 Commit: Cy Schubert CommitDate: 2023-06-06 12:44:51 +0000 ntp: import ntp-4.2.8p17 Fixes two small bugs including one regression. MFC after: 3 days Merge commit 'ab1f1aa8333369a83ff284848fc3fc2e52d5f29f' contrib/ntp/ChangeLog | 14 + contrib/ntp/CommitLog | 464 +++++++++++++++++++++ contrib/ntp/NEWS | 25 ++ contrib/ntp/configure | 20 +- contrib/ntp/include/ntp.h | 2 +- contrib/ntp/include/ntp_md5.h | 4 + contrib/ntp/include/ntp_stdlib.h | 39 +- contrib/ntp/libntp/a_md5encrypt.c | 23 +- contrib/ntp/libntp/authkeys.c | 27 +- contrib/ntp/libntp/authreadkeys.c | 12 +- contrib/ntp/libntp/msyslog.c | 5 +- contrib/ntp/libparse/clk_hopf6021.c | 5 +- contrib/ntp/libparse/clk_wharton.c | 5 +- contrib/ntp/ntpd/invoke-ntp.conf.texi | 2 +- contrib/ntp/ntpd/invoke-ntp.keys.texi | 2 +- contrib/ntp/ntpd/invoke-ntpd.texi | 4 +- contrib/ntp/ntpd/ntp.conf.5man | 4 +- contrib/ntp/ntpd/ntp.conf.5mdoc | 4 +- contrib/ntp/ntpd/ntp.conf.html | 2 +- contrib/ntp/ntpd/ntp.conf.man.in | 4 +- contrib/ntp/ntpd/ntp.conf.mdoc.in | 4 +- contrib/ntp/ntpd/ntp.keys.5man | 4 +- contrib/ntp/ntpd/ntp.keys.5mdoc | 4 +- contrib/ntp/ntpd/ntp.keys.html | 2 +- contrib/ntp/ntpd/ntp.keys.man.in | 4 +- contrib/ntp/ntpd/ntp.keys.mdoc.in | 4 +- contrib/ntp/ntpd/ntp_config.c | 18 + contrib/ntp/ntpd/ntp_control.c | 1 - contrib/ntp/ntpd/ntp_loopfilter.c | 3 - contrib/ntp/ntpd/ntp_proto.c | 5 +- contrib/ntp/ntpd/ntpd-opts.c | 14 +- contrib/ntp/ntpd/ntpd-opts.h | 6 +- contrib/ntp/ntpd/ntpd.1ntpdman | 4 +- contrib/ntp/ntpd/ntpd.1ntpdmdoc | 4 +- contrib/ntp/ntpd/ntpd.c | 6 +- contrib/ntp/ntpd/ntpd.html | 4 +- contrib/ntp/ntpd/ntpd.man.in | 4 +- contrib/ntp/ntpd/ntpd.mdoc.in | 4 +- contrib/ntp/ntpdc/invoke-ntpdc.texi | 4 +- contrib/ntp/ntpdc/ntpdc-opts.c | 14 +- contrib/ntp/ntpdc/ntpdc-opts.h | 6 +- contrib/ntp/ntpdc/ntpdc.1ntpdcman | 4 +- contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc | 4 +- contrib/ntp/ntpdc/ntpdc.html | 4 +- contrib/ntp/ntpdc/ntpdc.man.in | 4 +- contrib/ntp/ntpdc/ntpdc.mdoc.in | 4 +- contrib/ntp/ntpq/invoke-ntpq.texi | 4 +- contrib/ntp/ntpq/ntpq-opts.c | 14 +- contrib/ntp/ntpq/ntpq-opts.h | 6 +- contrib/ntp/ntpq/ntpq.1ntpqman | 4 +- contrib/ntp/ntpq/ntpq.1ntpqmdoc | 4 +- contrib/ntp/ntpq/ntpq.html | 4 +- contrib/ntp/ntpq/ntpq.man.in | 4 +- contrib/ntp/ntpq/ntpq.mdoc.in | 4 +- contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi | 2 +- contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c | 14 +- contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h | 6 +- contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman | 4 +- contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc | 4 +- contrib/ntp/ntpsnmpd/ntpsnmpd.html | 2 +- contrib/ntp/ntpsnmpd/ntpsnmpd.man.in | 4 +- contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in | 4 +- contrib/ntp/packageinfo.sh | 2 +- .../calc_tickadj/calc_tickadj.1calc_tickadjman | 4 +- .../calc_tickadj/calc_tickadj.1calc_tickadjmdoc | 4 +- contrib/ntp/scripts/calc_tickadj/calc_tickadj.html | 2 +- .../ntp/scripts/calc_tickadj/calc_tickadj.man.in | 4 +- .../ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in | 4 +- .../scripts/calc_tickadj/invoke-calc_tickadj.texi | 2 +- contrib/ntp/scripts/invoke-plot_summary.texi | 4 +- contrib/ntp/scripts/invoke-summary.texi | 4 +- contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi | 4 +- contrib/ntp/scripts/ntp-wait/ntp-wait-opts | 4 +- contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman | 4 +- .../ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc | 4 +- contrib/ntp/scripts/ntp-wait/ntp-wait.html | 4 +- contrib/ntp/scripts/ntp-wait/ntp-wait.man.in | 4 +- contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in | 4 +- contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi | 4 +- contrib/ntp/scripts/ntpsweep/ntpsweep-opts | 4 +- contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman | 4 +- .../ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc | 4 +- contrib/ntp/scripts/ntpsweep/ntpsweep.html | 4 +- contrib/ntp/scripts/ntpsweep/ntpsweep.man.in | 4 +- contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in | 4 +- contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi | 4 +- contrib/ntp/scripts/ntptrace/ntptrace-opts | 4 +- contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman | 4 +- .../ntp/scripts/ntptrace/ntptrace.1ntptracemdoc | 4 +- contrib/ntp/scripts/ntptrace/ntptrace.html | 4 +- contrib/ntp/scripts/ntptrace/ntptrace.man.in | 4 +- contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in | 4 +- contrib/ntp/scripts/plot_summary-opts | 4 +- contrib/ntp/scripts/plot_summary.1plot_summaryman | 4 +- contrib/ntp/scripts/plot_summary.1plot_summarymdoc | 4 +- contrib/ntp/scripts/plot_summary.html | 4 +- contrib/ntp/scripts/plot_summary.man.in | 4 +- contrib/ntp/scripts/plot_summary.mdoc.in | 4 +- contrib/ntp/scripts/summary-opts | 4 +- contrib/ntp/scripts/summary.1summaryman | 4 +- contrib/ntp/scripts/summary.1summarymdoc | 4 +- contrib/ntp/scripts/summary.html | 4 +- contrib/ntp/scripts/summary.man.in | 4 +- contrib/ntp/scripts/summary.mdoc.in | 4 +- .../scripts/update-leap/invoke-update-leap.texi | 2 +- contrib/ntp/scripts/update-leap/update-leap-opts | 4 +- .../update-leap/update-leap.1update-leapman | 4 +- .../update-leap/update-leap.1update-leapmdoc | 4 +- contrib/ntp/scripts/update-leap/update-leap.html | 2 +- contrib/ntp/scripts/update-leap/update-leap.man.in | 4 +- .../ntp/scripts/update-leap/update-leap.mdoc.in | 4 +- contrib/ntp/sntp/configure | 20 +- contrib/ntp/sntp/crypto.c | 5 - contrib/ntp/sntp/crypto.h | 1 - contrib/ntp/sntp/include/version.def | 2 +- contrib/ntp/sntp/include/version.texi | 6 +- contrib/ntp/sntp/invoke-sntp.texi | 4 +- contrib/ntp/sntp/m4/version.m4 | 2 +- contrib/ntp/sntp/scm-rev | 2 +- contrib/ntp/sntp/sntp-opts.c | 14 +- contrib/ntp/sntp/sntp-opts.h | 6 +- contrib/ntp/sntp/sntp.1sntpman | 4 +- contrib/ntp/sntp/sntp.1sntpmdoc | 4 +- contrib/ntp/sntp/sntp.html | 4 +- contrib/ntp/sntp/sntp.man.in | 4 +- contrib/ntp/sntp/sntp.mdoc.in | 4 +- contrib/ntp/tests/libntp/data/mills,david-03.jpg | Bin 0 -> 40964 bytes contrib/ntp/tests/libntp/data/ntp.keys | 34 ++ contrib/ntp/tests/libntp/digests.c | 415 ++++++++++++++++++ contrib/ntp/tests/libntp/run-digests.c | 80 ++++ contrib/ntp/util/invoke-ntp-keygen.texi | 4 +- contrib/ntp/util/ntp-keygen-opts.c | 14 +- contrib/ntp/util/ntp-keygen-opts.h | 6 +- contrib/ntp/util/ntp-keygen.1ntp-keygenman | 4 +- contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc | 4 +- contrib/ntp/util/ntp-keygen.html | 4 +- contrib/ntp/util/ntp-keygen.man.in | 4 +- contrib/ntp/util/ntp-keygen.mdoc.in | 4 +- usr.sbin/ntp/config.h | 6 +- 139 files changed, 1400 insertions(+), 337 deletions(-) diff --cc contrib/ntp/tests/libntp/data/mills,david-03.jpg index 000000000000,c164eea2cf33..c164eea2cf33 mode 000000,100644..100644 Binary files differ diff --cc contrib/ntp/tests/libntp/data/ntp.keys index 000000000000,6c8c743fd7d2..6c8c743fd7d2 mode 000000,100644..100644 --- a/contrib/ntp/tests/libntp/data/ntp.keys +++ b/contrib/ntp/tests/libntp/data/ntp.keys diff --cc contrib/ntp/tests/libntp/digests.c index 000000000000,03e9ef1b838e..03e9ef1b838e mode 000000,100644..100644 --- a/contrib/ntp/tests/libntp/digests.c +++ b/contrib/ntp/tests/libntp/digests.c diff --cc contrib/ntp/tests/libntp/run-digests.c index 000000000000,ae574d0e239e..ae574d0e239e mode 000000,100644..100644 --- a/contrib/ntp/tests/libntp/run-digests.c +++ b/contrib/ntp/tests/libntp/run-digests.c diff --cc usr.sbin/ntp/config.h index a2d3025cd9cf,000000000000..d5a4c080c5ef mode 100644,000000..100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@@ -1,1829 -1,0 +1,1829 @@@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ +/* $FreeBSD$ */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Is adjtime() accurate? */ +/* #undef ADJTIME_IS_ACCURATE */ + +/* Support NTP Autokey protocol? */ +/* #define AUTOKEY 1 */ + +/* why not HAVE_P_S? */ +/* #undef CALL_PTHREAD_SETCONCURRENCY */ + +/* ACTS modem service */ +#define CLOCK_ACTS 1 + +/* Arbiter 1088A/B GPS receiver */ +#define CLOCK_ARBITER 1 + +/* ARCRON support? */ +#define CLOCK_ARCRON_MSF 1 + +/* Austron 2200A/2201A GPS receiver? */ +#define CLOCK_AS2201 1 + +/* PPS interface? */ +#define CLOCK_ATOM 1 + +/* Datum/Bancomm bc635/VME interface? */ +/* #undef CLOCK_BANC */ + +/* Chronolog K-series WWVB receiver? */ +#define CLOCK_CHRONOLOG 1 + +/* CHU modem/decoder */ +#define CLOCK_CHU 1 + +/* Diems Computime Radio Clock? */ +/* #undef CLOCK_COMPUTIME */ + +/* Datum Programmable Time System? */ +#define CLOCK_DATUM 1 + +/* ELV/DCF7000 clock? */ +/* #undef CLOCK_DCF7000 */ + +/* Dumb generic hh:mm:ss local clock? */ +#define CLOCK_DUMBCLOCK 1 + +/* Forum Graphic GPS datating station driver? */ +#define CLOCK_FG 1 + +/* GPSD JSON receiver */ +#define CLOCK_GPSDJSON 1 + +/* TrueTime GPS receiver/VME interface? */ +/* #undef CLOCK_GPSVME */ + +/* Heath GC-1000 WWV/WWVH receiver? */ +#define CLOCK_HEATH 1 + +/* HOPF 6021 clock? */ +/* #undef CLOCK_HOPF6021 */ + +/* HOPF PCI clock device? */ +#define CLOCK_HOPF_PCI 1 + +/* HOPF serial clock device? */ +#define CLOCK_HOPF_SERIAL 1 + +/* HP 58503A GPS receiver? */ +#define CLOCK_HPGPS 1 + +/* IRIG audio decoder? */ +#define CLOCK_IRIG 1 + +/* JJY receiver? */ +#define CLOCK_JJY 1 + +/* Rockwell Jupiter GPS clock? */ +#define CLOCK_JUPITER 1 + +/* Leitch CSD 5300 Master Clock System Driver? */ +#define CLOCK_LEITCH 1 + +/* local clock reference? */ +#define CLOCK_LOCAL 1 + +/* Meinberg clocks */ +#define CLOCK_MEINBERG 1 + +/* Magnavox MX4200 GPS receiver */ +/* #undef CLOCK_MX4200 */ + +/* NeoClock4X */ +#define CLOCK_NEOCLOCK4X 1 + +/* NMEA GPS receiver */ +#define CLOCK_NMEA 1 + +/* Motorola UT Oncore GPS */ +#define CLOCK_ONCORE 1 + +/* Palisade clock */ +#define CLOCK_PALISADE 1 + +/* PARSE driver interface */ +#define CLOCK_PARSE 1 + +/* Conrad parallel port radio clock */ +#define CLOCK_PCF 1 + +/* PCL 720 clock support */ +/* #undef CLOCK_PPS720 */ + +/* PST/Traconex 1020 WWV/WWVH receiver */ +#define CLOCK_PST 1 + +/* DCF77 raw time code */ +#define CLOCK_RAWDCF 1 + +/* RCC 8000 clock */ +/* #undef CLOCK_RCC8000 */ + +/* RIPE NCC Trimble clock */ +/* #undef CLOCK_RIPENCC */ + +/* Schmid DCF77 clock */ +/* #undef CLOCK_SCHMID */ + +/* SEL240X protocol */ +/* #undef CLOCK_SEL240X */ + +/* clock thru shared memory */ +#define CLOCK_SHM 1 + +/* Spectracom 8170/Netclock/2 WWVB receiver */ +#define CLOCK_SPECTRACOM 1 + +/* KSI/Odetics TPRO/S GPS receiver/IRIG interface */ +/* #undef CLOCK_TPRO */ + +/* Trimble GPS receiver/TAIP protocol */ +/* #undef CLOCK_TRIMTAIP */ + +/* Trimble GPS receiver/TSIP protocol */ +/* #undef CLOCK_TRIMTSIP */ + +/* Kinemetrics/TrueTime receivers */ +#define CLOCK_TRUETIME 1 + +/* Spectracom TSYNC timing board */ +/* #undef CLOCK_TSYNCPCI */ + +/* TrueTime 560 IRIG-B decoder? */ +/* #undef CLOCK_TT560 */ + +/* Ultralink M320 WWVB receiver? */ +#define CLOCK_ULINK 1 + +/* VARITEXT clock */ +/* #undef CLOCK_VARITEXT */ + +/* WHARTON 400A Series clock */ +/* #undef CLOCK_WHARTON_400A */ + +/* WWV audio driver */ +#define CLOCK_WWV 1 + +/* Zyfer GPStarplus */ +#define CLOCK_ZYFER 1 + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +/* #undef CRAY_STACKSEG_END */ + +/* Define to 1 if using `alloca.c'. */ +/* #undef C_ALLOCA */ + +/* Enable debugging code? */ +/* #undef DEBUG */ + +/* Enable processing time debugging? */ +/* #undef DEBUG_TIMING */ + +/* Declaration style */ +/* #undef DECL_ADJTIME_0 */ + +/* Declaration style */ +/* #undef DECL_BCOPY_0 */ + +/* Declaration style */ +/* #undef DECL_BZERO_0 */ + +/* Declaration style */ +/* #undef DECL_CFSETISPEED_0 */ + +/* Declare errno? */ +/* #undef DECL_ERRNO */ + +/* Declaration style */ +/* #undef DECL_HSTRERROR_0 */ + +/* Declare h_errno? */ +#define DECL_H_ERRNO 1 + +/* Declaration style */ +/* #undef DECL_INET_NTOA_0 */ + +/* Declaration style */ +/* #undef DECL_IOCTL_0 */ + +/* Declaration style */ +/* #undef DECL_IPC_0 */ + +/* Declaration style */ +/* #undef DECL_MEMMOVE_0 */ + +/* Declaration style */ +/* #undef DECL_MKSTEMP_0 */ + +/* Declaration style */ +/* #undef DECL_MKTEMP_0 */ + +/* Declaration style */ +/* #undef DECL_NLIST_0 */ + +/* Declaration style */ +/* #undef DECL_PLOCK_0 */ + +/* Declaration style */ +/* #undef DECL_RENAME_0 */ + +/* Declaration style */ +/* #undef DECL_SELECT_0 */ + +/* Declaration style */ +/* #undef DECL_SETITIMER_0 */ + +/* Declaration style */ +/* #undef DECL_SETPRIORITY_0 */ + +/* Declaration style */ +/* #undef DECL_SETPRIORITY_1 */ + +/* Declaration style */ +/* #undef DECL_SIGVEC_0 */ + +/* Declaration style */ +/* #undef DECL_STDIO_0 */ + +/* Declaration style */ +/* #undef DECL_STIME_0 */ + +/* Declaration style */ +/* #undef DECL_STIME_1 */ + +/* Declaration style */ +/* #undef DECL_STRERROR_0 */ + +/* Declaration style */ +/* #undef DECL_STRTOL_0 */ + +/* Declare syscall()? */ +/* #undef DECL_SYSCALL */ + +/* Declaration style */ +/* #undef DECL_SYSLOG_0 */ + +/* Declaration style */ +/* #undef DECL_TIMEOFDAY_0 */ + +/* Declaration style */ +/* #undef DECL_TIME_0 */ + +/* Declaration style */ +/* #undef DECL_TOLOWER_0 */ + +/* Declaration style */ +/* #undef DECL_TOUPPER_0 */ + +/* What is the fallback value for HZ? */ +#define DEFAULT_HZ 100 + +/* Default number of megabytes for RLIMIT_MEMLOCK */ +#define DFLT_RLIMIT_MEMLOCK -1 + +/* Default number of 4k pages for RLIMIT_STACK */ +#define DFLT_RLIMIT_STACK 50 + +/* Directory separator character, usually / or \\ */ +#define DIR_SEP '/' + +/* use old autokey session key behavior? */ +/* #undef DISABLE_BUG1243_FIX */ + +/* synch TODR hourly? */ +/* #undef DOSYNCTODR */ + +/* The number of minutes in a DST adjustment */ +#define DSTMINUTES 60 + +/* support dynamic interleave? */ +#define DYNAMIC_INTERLEAVE 0 + +/* number of args to el_init() */ +#define EL_INIT_ARGS 4 + +/* Provide the explicit 127.0.0.0/8 martian filter? */ +#define ENABLE_BUG3020_FIX 1 + +/* Enable CMAC support? */ +#define ENABLE_CMAC 1 + +/* nls support in libopts */ +/* #undef ENABLE_NLS */ + +/* force ntpdate to step the clock if !defined(STEP_SLEW) ? */ +/* #undef FORCE_NTPDATE_STEP */ + +/* What is getsockname()'s socklen type? */ +#define GETSOCKNAME_SOCKLEN_TYPE socklen_t + +/* Do we have a routing socket (rt_msghdr or rtattr)? */ +#define HAS_ROUTING_SOCKET 1 + +/* via __adjtimex */ +/* #undef HAVE_ADJTIMEX */ + +/* Define to 1 if you have `alloca', as a function or macro. */ +#define HAVE_ALLOCA 1 + +/* Define to 1 if you have and it should be used (not on Ultrix). + */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `arc4random_buf' function. */ +#define HAVE_ARC4RANDOM_BUF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_NAMESER_H 1 + +/* Define to 1 if you have the `atomic_thread_fence' function. */ +/* #undef HAVE_ATOMIC_THREAD_FENCE */ + +/* Do we have audio support? */ +#define HAVE_AUDIO /**/ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BSTRING_H */ + +/* Define to 1 if you have the `canonicalize_file_name' function. */ +/* #undef HAVE_CANONICALIZE_FILE_NAME */ + +/* Define to 1 if you have the `chmod' function. */ +#define HAVE_CHMOD 1 + +/* Do we have the CIOGETEV ioctl (SunOS, Linux)? */ +/* #undef HAVE_CIOGETEV */ + +/* Define to 1 if you have the `clock_getres' function. */ +#define HAVE_CLOCK_GETRES 1 + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the `clock_settime' function. */ +#define HAVE_CLOCK_SETTIME 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_CTHREADS_H */ + +/* Define to 1 if you have the `daemon' function. */ +#define HAVE_DAEMON 1 + +/* Define to 1 if you have the declaration of `siglongjmp', and to 0 if you + don't. */ +#define HAVE_DECL_SIGLONGJMP 1 + +/* Define to 1 if you have the declaration of `sigsetjmp', and to 0 if you + don't. */ +#define HAVE_DECL_SIGSETJMP 1 + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#define HAVE_DECL_STRERROR_R 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Use Rendezvous/DNS-SD registration */ +/* #undef HAVE_DNSREGISTRATION */ + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Can we drop root privileges? */ +#define HAVE_DROPROOT + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if you have the `EVP_MD_do_all_sorted' function. */ +#define HAVE_EVP_MD_DO_ALL_SORTED 1 + +/* Define to 1 if you have the `fchmod' function. */ +#define HAVE_FCHMOD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `finite' function. */ +/* #undef HAVE_FINITE */ + +/* Define to 1 if you have the `fnmatch' function. */ +#define HAVE_FNMATCH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FNMATCH_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `fstat' function. */ +#define HAVE_FSTAT 1 + +/* Define to 1 if you have the `getbootfile' function. */ +#define HAVE_GETBOOTFILE 1 + +/* Define to 1 if you have the `getclock' function. */ +/* #undef HAVE_GETCLOCK */ + +/* Define to 1 if you have the `getdtablesize' function. */ +#define HAVE_GETDTABLESIZE 1 + +/* Define to 1 if you have the `getifaddrs' function. */ +#define HAVE_GETIFADDRS 1 + +/* Define to 1 if you have the `getpassphrase' function. */ +/* #undef HAVE_GETPASSPHRASE */ + +/* Define to 1 if you have the `getrusage' function. */ +#define HAVE_GETRUSAGE 1 + +/* Define to 1 if you have the `getuid' function. */ +#define HAVE_GETUID 1 + +/* if you have GNU Pth */ +/* #undef HAVE_GNU_PTH */ + +/* Define to 1 if you have the header file. */ +#define HAVE_HISTEDIT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_HISTORY_H */ + +/* Obvious */ +#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_IEEEFP_H 1 + +/* have iflist_sysctl? */ +#define HAVE_IFLIST_SYSCTL 1 + +/* Define to 1 if you have the `if_nametoindex' function. */ +#define HAVE_IF_NAMETOINDEX 1 + +/* inline keyword or macro available */ +#define HAVE_INLINE 1 + +/* Define to 1 if the system has the type `int16_t'. */ +#define HAVE_INT16_T 1 + +/* Define to 1 if the system has the type `int32'. */ +/* #undef HAVE_INT32 */ + +/* int32 type in DNS headers, not others. */ +/* #undef HAVE_INT32_ONLY_WITH_DNS */ + +/* Define to 1 if the system has the type `int32_t'. */ +#define HAVE_INT32_T 1 + +/* Define to 1 if the system has the type `int8_t'. */ +#define HAVE_INT8_T 1 + +/* Define to 1 if the system has the type `intmax_t'. */ +/* #undef HAVE_INTMAX_T */ + +/* Define to 1 if the system has the type `intptr_t'. */ +#define HAVE_INTPTR_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isfinite' function. */ +#define HAVE_ISFINITE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_KVM_H 1 + +/* Define to 1 if you have the `kvm_open' function. */ +/* #undef HAVE_KVM_OPEN */ + +/* Define to 1 if you have the `gen' library (-lgen). */ +/* #undef HAVE_LIBGEN */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBGEN_H 1 + +/* Define to 1 if you have the `intl' library (-lintl). */ +/* #undef HAVE_LIBINTL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBSCF_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* using Linux pthread? */ +/* #undef HAVE_LINUXTHREADS */ + +/* Do we have Linux capabilities? */ +/* #undef HAVE_LINUX_CAPABILITIES */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IF_ADDR_H */ + +/* if you have LinuxThreads */ +/* #undef HAVE_LINUX_THREADS */ + +/* Define to 1 if you have the `localeconv' function. */ +/* #undef HAVE_LOCALECONV */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LOCALE_H */ + +/* Define to 1 if the system has the type `long double'. */ +/* #undef HAVE_LONG_DOUBLE */ + +/* Define to 1 if the system has the type `long long'. */ +#define HAVE_LONG_LONG 1 + +/* Define to 1 if the system has the type `long long int'. */ +/* #undef HAVE_LONG_LONG_INT */ + +/* if you have SunOS LWP package */ +/* #undef HAVE_LWP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LWP_LWP_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_INLINE_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACHINE_SOUNDCARD_H */ + +/* define if you have Mach Cthreads */ +/* #undef HAVE_MACH_CTHREADS */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_CTHREADS_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MATH_H 1 + +/* Define to 1 if you have the `MD5Init' function. */ +#define HAVE_MD5INIT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MD5_H 1 + +/* Define to 1 if you have the `memlk' function. */ +/* #undef HAVE_MEMLK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have the `mktime' function. */ +#define HAVE_MKTIME 1 + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the `nanosleep' function. */ +#define HAVE_NANOSLEEP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINET_IN_SYSTEM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_SYSTM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_VAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IP_H 1 + +/* NetInfo support? */ +/* #undef HAVE_NETINFO */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NETINFO_NI_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NET_IF6_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_IF_VAR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NET_ROUTE_H 1 + +/* Define to 1 if you have the `nice' function. */ +#define HAVE_NICE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NLIST_H 1 + +/* via __adjtimex */ +#define HAVE_NTP_ADJTIME 1 + +/* via __ntp_gettime */ +#define HAVE_NTP_GETTIME 1 + +/* Do we want support for Samba's signing daemon? */ +#define HAVE_NTP_SIGND 1 + +/* if you have NT Event Log */ +/* #undef HAVE_NT_EVENT_LOG */ + +/* if you have NT Service Manager */ +/* #undef HAVE_NT_SERVICE_MANAGER */ + +/* if you have NT Threads */ +/* #undef HAVE_NT_THREADS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_CMAC_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_OPENSSL_HMAC_H 1 + +/* Define to 1 if the system has the type `pid_t'. */ +#define HAVE_PID_T 1 + +/* Define to 1 if you have the `plock' function. */ +/* #undef HAVE_PLOCK */ + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Do we have the PPS API per the Draft RFC? */ +#define HAVE_PPSAPI 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PRIV_H */ + +/* Define if you have POSIX threads libraries and header files. */ +/* #undef HAVE_PTHREAD */ + +/* define to pthreads API spec revision */ +#define HAVE_PTHREADS 10 + +/* Define to 1 if you have the `pthread_attr_getstacksize' function. */ +#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 + +/* Define to 1 if you have the `pthread_attr_setstacksize' function. */ +#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1 + +/* define if you have pthread_detach function */ +#define HAVE_PTHREAD_DETACH 1 + +/* Define to 1 if you have the `pthread_getconcurrency' function. */ +#define HAVE_PTHREAD_GETCONCURRENCY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the `pthread_kill' function. */ +#define HAVE_PTHREAD_KILL 1 + +/* Define to 1 if you have the `pthread_kill_other_threads_np' function. */ +/* #undef HAVE_PTHREAD_KILL_OTHER_THREADS_NP */ + +/* define if you have pthread_rwlock_destroy function */ +#define HAVE_PTHREAD_RWLOCK_DESTROY 1 + +/* Define to 1 if you have the `pthread_setconcurrency' function. */ +#define HAVE_PTHREAD_SETCONCURRENCY 1 + +/* Define to 1 if you have the `pthread_yield' function. */ +#define HAVE_PTHREAD_YIELD 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_PTH_H */ + +/* Define to 1 if the system has the type `ptrdiff_t'. */ +#define HAVE_PTRDIFF_T 1 + +/* Define to 1 if you have the `pututline' function. */ +/* #undef HAVE_PUTUTLINE */ + +/* Define to 1 if you have the `pututxline' function. */ +#define HAVE_PUTUTXLINE 1 + +/* Define to 1 if you have the `RAND_bytes' function. */ +#define HAVE_RAND_BYTES 1 + +/* Define to 1 if you have the `RAND_poll' function. */ +#define HAVE_RAND_POLL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_READLINE_H */ + +/* Define if your readline library has \`add_history' */ +#define HAVE_READLINE_HISTORY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_READLINE_HISTORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_READLINE_READLINE_H 1 + +/* Define to 1 if you have the `readlink' function. */ +#define HAVE_READLINK 1 + +/* Define to 1 if you have the `recvmsg' function. */ +#define HAVE_RECVMSG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RESOLV_H 1 + +/* Define to 1 if you have the `res_init' function. */ +#define HAVE_RES_INIT 1 + +/* Do we have Linux routing socket? */ +/* #undef HAVE_RTNETLINK */ + +/* Define to 1 if you have the `rtprio' function. */ +#define HAVE_RTPRIO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RUNETYPE_H 1 + +/* Obvious */ +#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SCHED_H 1 + +/* Define to 1 if you have the `sched_setscheduler' function. */ +#define HAVE_SCHED_SETSCHEDULER 1 + +/* Define to 1 if you have the `sched_yield' function. */ +#define HAVE_SCHED_YIELD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SEMAPHORE_H 1 + +/* Define to 1 if you have the `sem_timedwait' function. */ +#define HAVE_SEM_TIMEDWAIT 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SETJMP_H 1 + +/* Define to 1 if you have the `setlinebuf' function. */ +#define HAVE_SETLINEBUF 1 + +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 *** 1030 LINES SKIPPED *** From nobody Tue Jun 6 13:30:04 2023 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 4QbBDF19LPz4bb98; Tue, 6 Jun 2023 13:30:05 +0000 (UTC) (envelope-from git@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 4QbBDF0hrjz3kQ3; Tue, 6 Jun 2023 13:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686058205; 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; bh=T8kvCBRr6G4Tn00FNzEN5p9/PfXIkNjS131RZeqI0/o=; b=PxrLBDbJg//Vl4YSRiKP6tmEmxu1fxros/p3yobPCppZsqIYaiy7qte8NR7kRH5AeabvOM A4MQVi/snrucCGQvjlno4qRFYLUc9JCw/nkybGjuoQ3KlgXxRb5FyB23JXQko8uSIy2ar6 rbghMpW8ulI4b8Ge6N6UjhXwtnlpTX7STh8DuYaiEI1LWECzKYgX9GWlHOtwgTa3ZOWK1B fPH88lTm6mR5zw6PpjxVuSiPL3xOKLfXikAs4Aiui6DLhzYzrg2N7rNbDems9/M+DodLbe M5PY88ImiErZQgRzKolHQCTLPB9Dlgh2p3Us7AzLOBvB7QvmlycUla2QZS0ihA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686058205; 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; bh=T8kvCBRr6G4Tn00FNzEN5p9/PfXIkNjS131RZeqI0/o=; b=MdqyctCEBUygcHHylmx0K0kJA+NMtT0wbjqaUGssmd/7QJuDM0916EsvL4ePqIigSB3O+1 BYP4DHmFlRBL3mBaiTC8J8nLQ0oQPWGeXLqrovwfnQAJfc0jKFQTFJqbrwIYjJuJJPufN5 ZpQG6NFt4BO4Pccvugp8xxVAb5RShBofohi0XRne2RqY/U32hcNKEYDEmVrWIjvk1SzIdb HX9VOI8ATaE3Y1QqkVBpAW7B+VNLVuBxNwyThsg2mJYWSncv/vWJHKKOKOcRQO9E373ZRZ ESfPoxOCB9gA6RY99hnu3jkyGUKoe2LWzRFZ8IBF8oWWqfQbzcrDtwXp0q3hmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686058205; a=rsa-sha256; cv=none; b=lhxuFARf1P15u88MDNvMysAC2CRWMLhDQbZXAnFxFhCUeCmHPwaoc8Gv/dSlc9+vv3uEPz p8L28fIb8uSIJBZ2K8EiH9qoktSgZ1/ghKP6LzK0OH9W1/+WdO+cpFfG7F7iq/IxlPcL49 lVX/UbOUqHVsLygHTBiAXi5e57NgMbCNXSqauePQAXF8tq7QZ/EZDU1vVTt76Faz61gnAy v71DIgcxwEtREXqToBedztX6XOlh6NPaFVHktiNwHUghtmsS3wMy7ondPj0LbFqJLAOUWH CxJ7Jxn3BFJB098KancCJro/VRFrZ6B9BNS3eIiQbzNlbMJwVU/btkgOBVv5Zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbBDD6vGyzWvZ; Tue, 6 Jun 2023 13:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 356DU48X004119; Tue, 6 Jun 2023 13:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 356DU4GR004116; Tue, 6 Jun 2023 13:30:04 GMT (envelope-from git) Date: Tue, 6 Jun 2023 13:30:04 GMT Message-Id: <202306061330.356DU4GR004116@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 82aa1470c94c - main - ntp: Fix build 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 82aa1470c94c55db31c0168d65f8a08fa1d41378 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=82aa1470c94c55db31c0168d65f8a08fa1d41378 commit 82aa1470c94c55db31c0168d65f8a08fa1d41378 Author: Cy Schubert AuthorDate: 2023-06-06 13:27:05 +0000 Commit: Cy Schubert CommitDate: 2023-06-06 13:27:05 +0000 ntp: Fix build Two files used to obtain time from reference clocks did not include ntp_types.h resulting in an undefined NONEMPTY_TRANSLATION_UNIT. Fixes: e6bfd18d21b2 MFC after: 3 days X-MFC-with: e6bfd18d21b2 --- contrib/ntp/libparse/clk_hopf6021.c | 2 ++ contrib/ntp/libparse/clk_wharton.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/ntp/libparse/clk_hopf6021.c b/contrib/ntp/libparse/clk_hopf6021.c index b0b0c1ff2a73..a747581b75dc 100644 --- a/contrib/ntp/libparse/clk_hopf6021.c +++ b/contrib/ntp/libparse/clk_hopf6021.c @@ -20,6 +20,8 @@ # include #endif +#include + #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_HOPF6021) #include "ntp_fp.h" diff --git a/contrib/ntp/libparse/clk_wharton.c b/contrib/ntp/libparse/clk_wharton.c index fbe9cc95f5f7..e1ef61d55bdb 100644 --- a/contrib/ntp/libparse/clk_wharton.c +++ b/contrib/ntp/libparse/clk_wharton.c @@ -9,6 +9,8 @@ #include #endif +#include + #if defined(REFCLOCK) && defined(CLOCK_PARSE) && defined(CLOCK_WHARTON_400A) /* * Support for WHARTON 400A Series clock + 404.2 serial interface. From nobody Tue Jun 6 13:34:14 2023 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 4QbBK61bnpz4bbCv; Tue, 6 Jun 2023 13:34:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QbBK60njwz3lMR; Tue, 6 Jun 2023 13:34:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTP id 6UvWqqViWLAoI6WpFqcYte; Tue, 06 Jun 2023 13:34:17 +0000 Received: from spqr.komquats.com ([70.66.148.124]) by cmsmtp with ESMTPA id 6WpDqmWSe3fOS6WpEqa4sM; Tue, 06 Jun 2023 13:34:17 +0000 X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=647f35d9 a=Cwc3rblV8FOMdVN/wOAqyQ==:117 a=Cwc3rblV8FOMdVN/wOAqyQ==:17 a=kj9zAlcOel0A:10 a=of4jigFt-DYA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=Y23xFIO_nhPO6ogQ8UcA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id E4C221023; Tue, 6 Jun 2023 06:34:14 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id D8CF43B2; Tue, 6 Jun 2023 06:34:14 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 82aa1470c94c - main - ntp: Fix build In-reply-to: <202306061330.356DU4GR004116@gitrepo.freebsd.org> References: <202306061330.356DU4GR004116@gitrepo.freebsd.org> Comments: In-reply-to Cy Schubert message dated "Tue, 06 Jun 2023 13:30:04 +0000." 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 06 Jun 2023 06:34:14 -0700 Message-Id: <20230606133414.D8CF43B2@slippy.cwsent.com> X-CMAE-Envelope: MS4xfPatLWe8Ze0ArWzjhJ6J8crmRaUuU+UhbbgXmXWwDkf2H0MJZPEH1OrIhGBKyeuq3XN7IBKOEzF3x7ME+4IQKFutNRA4Dhwh8YX8bFaLyiSfmXYM3H1N MuZ6OX5Hv4FmJZps4R3b10I1x5uAYBB/u6M3VM1dEGIUaJ9gGGuC0PVaTWqDNwEGT+3bYbcINyYlDDW+9NlpcDBAM67ErdQoPFx8AAruXLsf0YpHaHp/eMro CF+9Ue4ndhI+PP33lR5Uf+dD2p0jNTkNj9+MxdE+ERCGdwRXRzUNOu9dbcQnfrV/4yFSeo1lk6LXMAM5lcKlujAT4ffMUcsCMSBcbcug/d4= X-Rspamd-Queue-Id: 4QbBK60njwz3lMR X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N In message <202306061330.356DU4GR004116@gitrepo.freebsd.org>, Cy Schubert write s: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=82aa1470c94c55db31c0168d65f8a08f > a1d41378 > > commit 82aa1470c94c55db31c0168d65f8a08fa1d41378 > Author: Cy Schubert > AuthorDate: 2023-06-06 13:27:05 +0000 > Commit: Cy Schubert > CommitDate: 2023-06-06 13:27:05 +0000 > > ntp: Fix build > > Two files used to obtain time from reference clocks did not include > ntp_types.h resulting in an undefined NONEMPTY_TRANSLATION_UNIT. BTW, the base NTP should not include support for reference clocks. Those wishing to use reference clocks should use the port. Base support for reference clocks will be removed at some point. > > Fixes: e6bfd18d21b2 > MFC after: 3 days > X-MFC-with: e6bfd18d21b2 -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0 From nobody Tue Jun 6 20:01:58 2023 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 4QbLwQ3JM2z4bMwB; Tue, 6 Jun 2023 20:01:58 +0000 (UTC) (envelope-from git@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 4QbLwQ2sx6z3GV2; Tue, 6 Jun 2023 20:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686081718; 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; bh=Z6CBqxBU1ftgiYoMAvsC7HHzGKETghsOdJ3b/1rRSFA=; b=cAd3aM0snSENonVZ6P154TON2jfOts1LlXn/Vq5imeN86M71aJGoNAVJplmB5FVv1O2n5Z a1GeiV8iJgwEkQxsxW0gZvSGT2M1qoPZhByUHNlflPtCKeBYI8NkvjEHyTE5itKTkbdpPN ovi9Fc7LEmzsXkbZVSjv7mMFRjIO7jYQd/DleSKDi/BLEAzQLc4rOY76rjbjqtDc9j4rEA y8N1H3z7Ymm0CNSf+pIkbVX/ZmdQRwa4W1fUFNrN53HUJRn3wlKk37x19S4TY4wwq3BH3e THujCK1nFDlRMTcaExcob7DBk7OWnloxednbI3SJNNpWYdTdfeOcRseEdDWlYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686081718; 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; bh=Z6CBqxBU1ftgiYoMAvsC7HHzGKETghsOdJ3b/1rRSFA=; b=XSaTxgHSyuLC9hQuItWrer3fabmCu1qRTOzj3JBueyQ9WcqfRDGjZ/QAvTuyESEsO69UNY OcDNCv5eaDerjbidFOT4T3pB6trqRRqq5vKKTrrRqjHkfhNd77siO68Nl5V8NCyaX7Mcpc yxopKAZJwo7slq48ORsb2c3N1VTb9VT4P88nQzsUUOoT2B890BpowfLRotmMfaWv+fOqjS JphA/FarhvNxtnAWt4w3i1rdFnSMZJvwiCBLUHFdjO0PHHGkuo1iSqxQ0+DviqOB/nHz74 bviHoOyo5Pn566mLs1AKCUAMEgZYo3kS7qY5kYv9q6KiazhpaeLArFJarzzuwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686081718; a=rsa-sha256; cv=none; b=Jt15sKReETnALr/UteGXdt1zdAko73yXp81E4+gB2uL+zjWvGKQHs5a02HUnmDYLmr0K3c yb7/cVUlw9U+3+t4TiCUQTzydX3Lffdu1tJHGeAIWT6dpmNsW+QeClucc6AzBLvxJLshI+ NhF/JJhTiLYHuTO4VyA3y16rDdAtA6de9Moj+lU7G3b4ilfOMLgIiAnWu0Rn6yrMME0+4r wOjwLx61T1Rf3ghNSoDEcUoQxtdT5fpUjexVUqzyKHv2lc+TpKA7VP5tzmC0ODpXvAseU3 x+U3jso1wGBAmu0D7EBa2tpuY3naritzAgw0yMvzCjXOko2Lv4AWk4PslIuY+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbLwQ1xPTzjQD; Tue, 6 Jun 2023 20:01:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 356K1wtJ057466; Tue, 6 Jun 2023 20:01:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 356K1wO0057465; Tue, 6 Jun 2023 20:01:58 GMT (envelope-from git) Date: Tue, 6 Jun 2023 20:01:58 GMT Message-Id: <202306062001.356K1wO0057465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 84617f6fccd4 - main - linux(4) rt_sendsig: Remove the use of caddr_t 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 84617f6fccd45505f3eeebad1c8cdce1140b7f8e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=84617f6fccd45505f3eeebad1c8cdce1140b7f8e commit 84617f6fccd45505f3eeebad1c8cdce1140b7f8e Author: Dmitry Chagin AuthorDate: 2023-06-06 20:01:39 +0000 Commit: Dmitry Chagin CommitDate: 2023-06-06 20:01:39 +0000 linux(4) rt_sendsig: Remove the use of caddr_t Replace caddr_t by more appropriate char *. MFC after: 2 weeks --- sys/amd64/linux/linux_sysvec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 943df00328fc..547777127d2a 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -410,7 +410,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct proc *p; struct thread *td; struct sigacts *psp; - caddr_t sp; + char *sp; struct trapframe *regs; struct savefpu *svfp; mcontext_t mc; @@ -440,9 +440,9 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && SIGISMEMBER(psp->ps_sigonstack, sig)) { - sp = (caddr_t)td->td_sigstk.ss_sp + td->td_sigstk.ss_size; + sp = (char *)td->td_sigstk.ss_sp + td->td_sigstk.ss_size; } else - sp = (caddr_t)regs->tf_rsp - 128; + sp = (char *)regs->tf_rsp - 128; mtx_unlock(&psp->ps_mtx); PROC_UNLOCK(p); @@ -497,7 +497,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) for (i = 0; i < nitems(svfp->sv_xmm); ++i) bcopy(svfp->sv_xmm[i].xmm_bytes, &sf.sf_fs.xmm[i], sizeof(svfp->sv_xmm[i].xmm_bytes)); - sf.sf_uc.uc_mcontext.sc_fpstate = (struct l_fpstate *)((caddr_t)sfp + + sf.sf_uc.uc_mcontext.sc_fpstate = (struct l_fpstate *)((char *)sfp + offsetof(struct l_rt_sigframe, sf_fs)); /* Translate the signal. */ From nobody Tue Jun 6 21:02:40 2023 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 4QbNGT0gMFz4bYm3; Tue, 6 Jun 2023 21:02:41 +0000 (UTC) (envelope-from git@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 4QbNGT07TBz3QL0; Tue, 6 Jun 2023 21:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686085361; 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; bh=6gZ48wv4PnQiFXiIWm5d9nndZXwo+gHqBCNUZkUfs40=; b=ZnbyfDrNp5Uq/BRCstPhCj+Xzw84ZLk5vWVHK55JvXZtH0URThhq81aT1XFLvDBceYDBAP grfRY3n3qwSSGJBIxN6lOCh/Sc8E+JnTf595KCMFVF6iK+ABrxgMYzxH1DcAY3ODLE/DrW k56pkcejRqh5E2qR0Jj1WocNsJCn4JullYpQiDM4QY8kQOj88Lht1CqMCBn3Iqos103f/I ixhBu7tg56dy7hnHLfIzgZk9ZkXz3uQNcQvxe2jW+e8u3bP9EbuLz4WDl7rSWkBTSE+as/ jD/udIObtneBA6tm2Bn5Paa5wENmyzwONmboWOZhoe4z4hPphCoD2r6sRfbm8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686085361; 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; bh=6gZ48wv4PnQiFXiIWm5d9nndZXwo+gHqBCNUZkUfs40=; b=k3MIgevDnijem3mmZVv70c6FI4MECLoELUbaxn6xtpvhiiypeYYS3ujxhdqMjtkAyKYOGX 3RXNSfm4tm6fhkiVTo+b7P9gsx/uj2K9ik1Fm0C3Rxyti36qN+Xr9I1oyhvTBe9kCqnmOb XkGc+J/LESa2Dj+cpTifINkTfviBjdwDOYGUY00mozPP3QmZfVMAKJkLArHwXaVALcII6J VRAzlWEat11t/tfdMfBFFWztXKTLb2gy3jmQcJ4gIFkZt/eYA3Dq0eDpdKlt9AE5mVWHd8 R74WmrF+GzHlvlPbhaHmfu5KKzK7sl9k7dqUTiYhmLs8egtX4SoBQI70f8UdEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686085361; a=rsa-sha256; cv=none; b=qqkFEka4KvEo3zYFjsAcJMJN48G+3nzt9hP7gBBv30PEYscFWK96oVswMg39InCAnm8MCd iOttZ1dUF3WiMp59kNYOczEelQBOuKw6NuEHzNAj1yaTx6wOmeybtviXXprpF1WXeU2FFQ TYCQvbekL92SKAdAjiPXnfXJAwDDuX/znYcdTimqF//Yk+B5Zk7tBIIPwPB12lecJJyR3S rsu5+EO1h2TGUWiUYlRfQNkI9IcbMASj1Ms2svGulm2yIyISxlTl+84GpD+lVak2qr3JwR eQxxEKKqnXB8cRMsBZMxt4g8i0K1LMwW98/aoVyDJbPNYXkerm6+YbhnJG71mg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbNGS6LX1zl82; Tue, 6 Jun 2023 21:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 356L2ejQ059796; Tue, 6 Jun 2023 21:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 356L2ejk059795; Tue, 6 Jun 2023 21:02:40 GMT (envelope-from git) Date: Tue, 6 Jun 2023 21:02:40 GMT Message-Id: <202306062102.356L2ejk059795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 43b117f88f30 - main - tcp: make the maximum number of retransmissions tunable per VNET 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43b117f88f3044d5f08e70b0daf0bb964f9ecb4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=43b117f88f3044d5f08e70b0daf0bb964f9ecb4b commit 43b117f88f3044d5f08e70b0daf0bb964f9ecb4b Author: Richard Scheffenegger AuthorDate: 2023-06-06 20:56:44 +0000 Commit: Richard Scheffenegger CommitDate: 2023-06-06 20:58:54 +0000 tcp: make the maximum number of retransmissions tunable per VNET Both Windows (TcpMaxDataRetransmissions) and Linux (tcp_retries2) allow to restrict the maximum number of consecutive timer based retransmissions. Add that same capability on a per-VNet basis to FreeBSD. Reviewed By: cc, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D40424 --- share/man/man4/tcp.4 | 5 ++++- sys/netinet/tcp_output.c | 2 +- sys/netinet/tcp_stacks/bbr.c | 8 ++++---- sys/netinet/tcp_stacks/rack.c | 8 ++++---- sys/netinet/tcp_timer.c | 30 ++++++++++++++++++++++++++---- sys/netinet/tcp_var.h | 2 ++ 6 files changed, 41 insertions(+), 14 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index ce27705f7eda..382e39a4355d 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 3, 2023 +.Dd June 6, 2023 .Dt TCP 4 .Os .Sh NAME @@ -843,6 +843,9 @@ Maximum size of automatic receive buffer. Initial .Tn TCP receive window (buffer size). +.It Va retries +Maximum number of consecutive timer based retransmits sent after a data +segment is lost (default and maximum is 12). .It Va rexmit_drop_options Drop TCP options from third and later retransmitted SYN segments of a connection. diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index abfab1a62176..800480413586 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1766,7 +1766,7 @@ tcp_setpersist(struct tcpcb *tp) tt = maxunacktime; } tcp_timer_activate(tp, TT_PERSIST, tt); - if (tp->t_rxtshift < TCP_MAXRXTSHIFT) + if (tp->t_rxtshift < V_tcp_retries) tp->t_rxtshift++; } diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 5ecb558dadb3..1e8053afc45c 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -4763,7 +4763,7 @@ bbr_timeout_persist(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts) * the idle time (no responses to probes) reaches the maximum * backoff that we would use if retransmitting. */ - if (tp->t_rxtshift == TCP_MAXRXTSHIFT && + if (tp->t_rxtshift >= V_tcp_retries && (ticks - tp->t_rcvtime >= tcp_maxpersistidle || ticks - tp->t_rcvtime >= TCP_REXMTVAL(tp) * tcp_totbackoff)) { KMOD_TCPSTAT_INC(tcps_persistdrop); @@ -4796,7 +4796,7 @@ bbr_timeout_persist(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts) tp->t_flags &= ~TF_DELACK; free(t_template, M_TEMP); } - if (tp->t_rxtshift < TCP_MAXRXTSHIFT) + if (tp->t_rxtshift < V_tcp_retries) tp->t_rxtshift++; bbr_start_hpts_timer(bbr, tp, cts, 3, 0, 0); out: @@ -4990,8 +4990,8 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts) */ tp->t_rxtshift++; } - if (tp->t_rxtshift > TCP_MAXRXTSHIFT) { - tp->t_rxtshift = TCP_MAXRXTSHIFT; + if (tp->t_rxtshift > V_tcp_retries) { + tp->t_rxtshift = V_tcp_retries; KMOD_TCPSTAT_INC(tcps_timeoutdrop); tcp_log_end_status(tp, TCP_EI_STATUS_RETRAN); /* XXXGL: previously t_softerror was casted to uint16_t */ diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index c9b5b937cc46..36fd5daf07dd 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -7445,7 +7445,7 @@ rack_timeout_persist(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts) * the idle time (no responses to probes) reaches the maximum * backoff that we would use if retransmitting. */ - if (tp->t_rxtshift == TCP_MAXRXTSHIFT && + if (tp->t_rxtshift >= V_tcp_retries && (ticks - tp->t_rcvtime >= tcp_maxpersistidle || TICKS_2_USEC(ticks - tp->t_rcvtime) >= RACK_REXMTVAL(tp) * tcp_totbackoff)) { KMOD_TCPSTAT_INC(tcps_persistdrop); @@ -7491,7 +7491,7 @@ rack_timeout_persist(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts) tp->t_flags &= ~TF_DELACK; free(t_template, M_TEMP); } - if (tp->t_rxtshift < TCP_MAXRXTSHIFT) + if (tp->t_rxtshift < V_tcp_retries) tp->t_rxtshift++; out: rack_log_to_event(rack, RACK_TO_FRM_PERSIST, NULL); @@ -7783,10 +7783,10 @@ rack_timeout_rxt(struct tcpcb *tp, struct tcp_rack *rack, uint32_t cts) */ tp->t_rxtshift++; } - if (tp->t_rxtshift > TCP_MAXRXTSHIFT) { + if (tp->t_rxtshift > V_tcp_retries) { tcp_log_end_status(tp, TCP_EI_STATUS_RETRAN); drop_it: - tp->t_rxtshift = TCP_MAXRXTSHIFT; + tp->t_rxtshift = V_tcp_retries; KMOD_TCPSTAT_INC(tcps_timeoutdrop); /* XXXGL: previously t_softerror was casted to uint16_t */ MPASS(tp->t_softerror >= 0); diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index d1301c18d54f..6126d85c7565 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -201,6 +201,28 @@ static int per_cpu_timers = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, per_cpu_timers, CTLFLAG_RW, &per_cpu_timers , 0, "run tcp timers on all cpus"); +static int +sysctl_net_inet_tcp_retries(SYSCTL_HANDLER_ARGS) +{ + int error, new; + + new = V_tcp_retries; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr) { + if ((new < 1) || (new > TCP_MAXRXTSHIFT)) + error = EINVAL; + else + V_tcp_retries = new; + } + return (error); +} + +VNET_DEFINE(int, tcp_retries) = TCP_MAXRXTSHIFT; +SYSCTL_PROC(_net_inet_tcp, OID_AUTO, retries, + CTLTYPE_INT | CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_retries), 0, sysctl_net_inet_tcp_retries, "I", + "maximum number of consecutive timer based retransmissions"); + /* * Map the given inp to a CPU id. * @@ -492,7 +514,7 @@ tcp_timer_persist(struct tcpcb *tp) * progress. */ progdrop = tcp_maxunacktime_check(tp); - if (progdrop || (tp->t_rxtshift == TCP_MAXRXTSHIFT && + if (progdrop || (tp->t_rxtshift >= V_tcp_retries && (ticks - tp->t_rcvtime >= tcp_maxpersistidle || ticks - tp->t_rcvtime >= TCP_REXMTVAL(tp) * tcp_totbackoff))) { if (!progdrop) @@ -555,10 +577,10 @@ tcp_timer_rexmt(struct tcpcb *tp) * or we've gone long enough without making progress, then drop * the session. */ - if (++tp->t_rxtshift > TCP_MAXRXTSHIFT || tcp_maxunacktime_check(tp)) { - if (tp->t_rxtshift > TCP_MAXRXTSHIFT) + if (++tp->t_rxtshift > V_tcp_retries || tcp_maxunacktime_check(tp)) { + if (tp->t_rxtshift > V_tcp_retries) TCPSTAT_INC(tcps_timeoutdrop); - tp->t_rxtshift = TCP_MAXRXTSHIFT; + tp->t_rxtshift = V_tcp_retries; tcp_log_end_status(tp, TCP_EI_STATUS_RETRAN); NET_EPOCH_ENTER(et); tp = tcp_drop(tp, ETIMEDOUT); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 86345b2aa630..587998331fbf 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1289,6 +1289,7 @@ VNET_DECLARE(int, tcp_perconn_stats_dflt_tpl); VNET_DECLARE(int, tcp_perconn_stats_enable); #endif /* STATS */ VNET_DECLARE(int, tcp_recvspace); +VNET_DECLARE(int, tcp_retries); VNET_DECLARE(int, tcp_sack_globalholes); VNET_DECLARE(int, tcp_sack_globalmaxholes); VNET_DECLARE(int, tcp_sack_maxholes); @@ -1335,6 +1336,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_perconn_stats_enable VNET(tcp_perconn_stats_enable) #endif /* STATS */ #define V_tcp_recvspace VNET(tcp_recvspace) +#define V_tcp_retries VNET(tcp_retries) #define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) #define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) #define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) From nobody Tue Jun 6 21:14:33 2023 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 4QbNXB0xRCz4bbgg; Tue, 6 Jun 2023 21:14:34 +0000 (UTC) (envelope-from git@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 4QbNXB0nbYz3hQv; Tue, 6 Jun 2023 21:14:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686086074; 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; bh=M4F452Qcu6Z5/qzHKv296NsKHPcfeqkw+mK7pQM4DDQ=; b=iIgOgjuForgAZtK68XmTS2zdBswEgVCe7t3wRs83VXNuc6rNtW/LALEMCUSmwfqgUnGE5H aoi/LeW1eHjTEJZhYpw3lf2NyqRSfRKeZFf+8sJIWUY2n2maFe6uCve6+xB1UKq2AoYfby Jsl1AKX2dF7TyY+SEMwp5iDjlh321w4M+zFntYAhleDUWy/b5b1oCOkAQBRT4f0tEkExd7 K9lUP4Pb6/TnwwaThhk0inm710Caf69s1Zu73EXFakcVSAfdvS0maoWGzzViyYgGwQ4AmS zInIXa745ilPSJM8b8PGjzmyVJj3MJYE/tAz8LcPWS08agBf1l4D2GeFs26o5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686086074; 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; bh=M4F452Qcu6Z5/qzHKv296NsKHPcfeqkw+mK7pQM4DDQ=; b=ofX+s2ReM/0D74wFL6Ap7Bwb8yb9xKtQouS/tGJXHJHFgWjR8tFHP8nfN0ixiBtCNJd1Kg Apt5SJ/gNF9OymS7w0HjOtWWlMNptXa8SHqVsmB0YsG4lOxXh6cSpR1dNnbaaNkpYXlDCv I4jAzQ+UqG/8sZikQ2BTwmQ/y24CotnDgXXFUnSKRsMM15HEJr2kwH+G2DL4nZN4Es6Q/7 7srVNlEonhkDA1F9TUokdsojD/ohUS8kDocsHY4QULtO1BlQth0BjFnr1JHr5ffw0vAFEs tKG0o72ooZC/ogDNRawy2wtBfJrlbrXC/Go6orQXx5zaWK6L6LLRUXASBtSFjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686086074; a=rsa-sha256; cv=none; b=q1ld/jEyOOz+K0+L+sBlqfj2dJQNepMwnMxQHZTpEq3wUg9N+upGOVs+8iQqSz34RnY8b7 PjWKTtVbha5MVtxPLEYhu3CJvY8FZ+B9dDkMqppzNNzliARXWOqceaY0c/t9xKjVBtJgOo xje8ayKi1FuFPG98etDsXfzP2tCNwWivuKz73xYK+U7LXSqAzmYeQjE/CFnvENIpE8kbCW pIPGpXsFMJH31WiHgD2Fx6vTFNiVYy7otAAmfeB2LzU8RUbdFuDYnQgqV0VdMue4XGzErx 0hpL+wH2JzsOAEgEPThBSE/2GKGSQ8UQlRjuYzjxjp0+a6ahsMjxk6+itJsFMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbNX96xwwzlHZ; Tue, 6 Jun 2023 21:14:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 356LEXP2076833; Tue, 6 Jun 2023 21:14:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 356LEXOq076832; Tue, 6 Jun 2023 21:14:33 GMT (envelope-from git) Date: Tue, 6 Jun 2023 21:14:33 GMT Message-Id: <202306062114.356LEXOq076832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: eb5bfdd06565 - main - tcp: Add and update cubic module variable names 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eb5bfdd06565b38939079bf29265264efb1e21c0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=eb5bfdd06565b38939079bf29265264efb1e21c0 commit eb5bfdd06565b38939079bf29265264efb1e21c0 Author: Richard Scheffenegger AuthorDate: 2023-06-06 21:03:30 +0000 Commit: Richard Scheffenegger CommitDate: 2023-06-06 21:09:28 +0000 tcp: Add and update cubic module variable names Prepare the cubic congestion control module to better align with the specifications in RFC8312bis. Rename a few cubic state variables to the variable names found in the RFC8312bis specification. This makes the code more understandable for someone reading the RFC and the code. It also makes the variable naming convention more uniform. Add some variables needed subsequently. No functional change. Submitted By: Bhaskar Pardeshi, VMware Inc. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D40436 --- sys/netinet/cc/cc_cubic.c | 121 +++++++++++++++++++++++++--------------------- sys/netinet/cc/cc_cubic.h | 62 ++++++++++++++---------- 2 files changed, 103 insertions(+), 80 deletions(-) diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c index be9bd9859122..77bb0daadcb1 100644 --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -239,8 +239,8 @@ static void cubic_ack_received(struct cc_var *ccv, uint16_t type) { struct cubic *cubic_data; - unsigned long w_tf, w_cubic_next; - int usecs_since_cong; + unsigned long W_est, W_cubic; + int usecs_since_epoch; cubic_data = ccv->cc_data; cubic_record_rtt(ccv); @@ -272,57 +272,56 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) /* RFC8312 Section 4.7 */ cubic_data->flags &= ~(CUBICFLAG_RTO_EVENT | CUBICFLAG_IN_SLOWSTART); - cubic_data->max_cwnd = CCV(ccv, snd_cwnd); + cubic_data->W_max = CCV(ccv, snd_cwnd); cubic_data->K = 0; } else if (cubic_data->flags & (CUBICFLAG_IN_SLOWSTART | CUBICFLAG_IN_APPLIMIT)) { cubic_data->flags &= ~(CUBICFLAG_IN_SLOWSTART | CUBICFLAG_IN_APPLIMIT); - cubic_data->t_last_cong = ticks; - cubic_data->K = cubic_k(cubic_data->max_cwnd / + cubic_data->t_epoch = ticks; + cubic_data->K = cubic_k(cubic_data->W_max / CCV(ccv, t_maxseg)); } - usecs_since_cong = (ticks - cubic_data->t_last_cong) * tick; - if (usecs_since_cong < 0) { + usecs_since_epoch = (ticks - cubic_data->t_epoch) * tick; + if (usecs_since_epoch < 0) { /* - * dragging t_last_cong along + * dragging t_epoch along */ - usecs_since_cong = INT_MAX; - cubic_data->t_last_cong = ticks - INT_MAX; + usecs_since_epoch = INT_MAX; + cubic_data->t_epoch = ticks - INT_MAX; } /* * The mean RTT is used to best reflect the equations in * the I-D. Using min_rtt in the tf_cwnd calculation - * causes w_tf to grow much faster than it should if the + * causes W_est to grow much faster than it should if the * RTT is dominated by network buffering rather than * propagation delay. */ - w_tf = tf_cwnd(usecs_since_cong, cubic_data->mean_rtt_usecs, - cubic_data->max_cwnd, CCV(ccv, t_maxseg)); + W_est = tf_cwnd(usecs_since_epoch, cubic_data->mean_rtt_usecs, + cubic_data->W_max, CCV(ccv, t_maxseg)); - w_cubic_next = cubic_cwnd(usecs_since_cong + - cubic_data->mean_rtt_usecs, - cubic_data->max_cwnd, - CCV(ccv, t_maxseg), - cubic_data->K); + W_cubic = cubic_cwnd(usecs_since_epoch + + cubic_data->mean_rtt_usecs, + cubic_data->W_max, + CCV(ccv, t_maxseg), + cubic_data->K); ccv->flags &= ~CCF_ABC_SENTAWND; - if (w_cubic_next < w_tf) { + if (W_cubic < W_est) { /* * TCP-friendly region, follow tf * cwnd growth. */ - if (CCV(ccv, snd_cwnd) < w_tf) - CCV(ccv, snd_cwnd) = ulmin(w_tf, INT_MAX); - } else if (CCV(ccv, snd_cwnd) < w_cubic_next) { + if (CCV(ccv, snd_cwnd) < W_est) + CCV(ccv, snd_cwnd) = ulmin(W_est, INT_MAX); + } else if (CCV(ccv, snd_cwnd) < W_cubic) { /* * Concave or convex region, follow CUBIC * cwnd growth. * Only update snd_cwnd, if it doesn't shrink. */ - CCV(ccv, snd_cwnd) = ulmin(w_cubic_next, - INT_MAX); + CCV(ccv, snd_cwnd) = ulmin(W_cubic, INT_MAX); } /* @@ -330,12 +329,12 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * new cwnd limit at the start of a connection * (happens when hostcache has a relevant entry), * keep updating our current estimate of the - * max_cwnd. + * W_max. */ if (((cubic_data->flags & CUBICFLAG_CONG_EVENT) == 0) && - cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) { - cubic_data->max_cwnd = CCV(ccv, snd_cwnd); - cubic_data->K = cubic_k(cubic_data->max_cwnd / + cubic_data->W_max < CCV(ccv, snd_cwnd)) { + cubic_data->W_max = CCV(ccv, snd_cwnd); + cubic_data->K = cubic_k(cubic_data->W_max / CCV(ccv, t_maxseg)); } } @@ -348,7 +347,7 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) /* * This is a CUBIC specific implementation of after_idle. * - Reset cwnd by calling New Reno implementation of after_idle. - * - Reset t_last_cong. + * - Reset t_epoch. */ static void cubic_after_idle(struct cc_var *ccv) @@ -357,8 +356,8 @@ cubic_after_idle(struct cc_var *ccv) cubic_data = ccv->cc_data; - cubic_data->max_cwnd = ulmax(cubic_data->max_cwnd, CCV(ccv, snd_cwnd)); - cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg)); + cubic_data->W_max = ulmax(cubic_data->W_max, CCV(ccv, snd_cwnd)); + cubic_data->K = cubic_k(cubic_data->W_max / CCV(ccv, t_maxseg)); if ((cubic_data->flags & CUBICFLAG_HYSTART_ENABLED) == 0) { /* * Re-enable hystart if we have been idle. @@ -368,7 +367,7 @@ cubic_after_idle(struct cc_var *ccv) cubic_log_hystart_event(ccv, cubic_data, 12, CCV(ccv, snd_ssthresh)); } newreno_cc_after_idle(ccv); - cubic_data->t_last_cong = ticks; + cubic_data->t_epoch = ticks; } static void @@ -397,7 +396,7 @@ cubic_cb_init(struct cc_var *ccv, void *ptr) cubic_data = ptr; /* Init some key variables with sensible defaults. */ - cubic_data->t_last_cong = ticks; + cubic_data->t_epoch = ticks; cubic_data->min_rtt_usecs = TCPTV_SRTTBASE; cubic_data->mean_rtt_usecs = 1; @@ -441,8 +440,8 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { cubic_ssthresh_update(ccv, mss); cubic_data->flags |= CUBICFLAG_CONG_EVENT; - cubic_data->t_last_cong = ticks; - cubic_data->K = cubic_k(cubic_data->max_cwnd / mss); + cubic_data->t_epoch = ticks; + cubic_data->K = cubic_k(cubic_data->W_max / mss); } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -458,8 +457,8 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { cubic_ssthresh_update(ccv, mss); cubic_data->flags |= CUBICFLAG_CONG_EVENT; - cubic_data->t_last_cong = ticks; - cubic_data->K = cubic_k(cubic_data->max_cwnd / mss); + cubic_data->t_epoch = ticks; + cubic_data->K = cubic_k(cubic_data->W_max / mss); CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } @@ -468,22 +467,36 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) case CC_RTO: /* RFC8312 Section 4.7 */ if (CCV(ccv, t_rxtshift) == 1) { - cubic_data->t_last_cong_prev = cubic_data->t_last_cong; - cubic_data->prev_max_cwnd_cp = cubic_data->prev_max_cwnd; + /* + * Remember the state only for the first RTO event. This + * will help us restore the state to the values seen + * at the most recent congestion avoidance stage before + * the current RTO event. + */ + cubic_data->undo_t_epoch = cubic_data->t_epoch; + cubic_data->undo_cwnd_epoch = cubic_data->cwnd_epoch; + cubic_data->undo_W_est = cubic_data->W_est; + cubic_data->undo_cwnd_prior = cubic_data->cwnd_prior; + cubic_data->undo_W_max = cubic_data->W_max; + cubic_data->undo_K = cubic_data->K; } cubic_data->flags |= CUBICFLAG_CONG_EVENT | CUBICFLAG_RTO_EVENT; - cubic_data->prev_max_cwnd = cubic_data->max_cwnd; - CCV(ccv, snd_ssthresh) = ((uint64_t)CCV(ccv, snd_cwnd) * + cubic_data->undo_W_max = cubic_data->W_max; + cubic_data->num_cong_events++; + CCV(ccv, snd_ssthresh) = ((uint64_t)CCV(ccv, snd_cwnd) * CUBIC_BETA) >> CUBIC_SHIFT; CCV(ccv, snd_cwnd) = mss; break; case CC_RTO_ERR: cubic_data->flags &= ~(CUBICFLAG_CONG_EVENT | CUBICFLAG_RTO_EVENT); - cubic_data->max_cwnd = cubic_data->prev_max_cwnd; - cubic_data->prev_max_cwnd = cubic_data->prev_max_cwnd_cp; - cubic_data->t_last_cong = cubic_data->t_last_cong_prev; - cubic_data->K = cubic_k(cubic_data->max_cwnd / mss); + cubic_data->num_cong_events--; + cubic_data->K = cubic_data->undo_K; + cubic_data->cwnd_prior = cubic_data->undo_cwnd_prior; + cubic_data->W_max = cubic_data->undo_W_max; + cubic_data->W_est = cubic_data->undo_W_est; + cubic_data->cwnd_epoch = cubic_data->undo_cwnd_epoch; + cubic_data->t_epoch = cubic_data->undo_t_epoch; break; } } @@ -496,11 +509,11 @@ cubic_conn_init(struct cc_var *ccv) cubic_data = ccv->cc_data; /* - * Ensure we have a sane initial value for max_cwnd recorded. Without + * Ensure we have a sane initial value for W_max recorded. Without * this here bad things happen when entries from the TCP hostcache * get used. */ - cubic_data->max_cwnd = CCV(ccv, snd_cwnd); + cubic_data->W_max = CCV(ccv, snd_cwnd); } static int @@ -542,8 +555,8 @@ cubic_post_recovery(struct cc_var *ccv) CCV(ccv, snd_cwnd) = max(pipe, CCV(ccv, t_maxseg)) + CCV(ccv, t_maxseg); else - /* Update cwnd based on beta and adjusted max_cwnd. */ - CCV(ccv, snd_cwnd) = max(((uint64_t)cubic_data->max_cwnd * + /* Update cwnd based on beta and adjusted W_max. */ + CCV(ccv, snd_cwnd) = max(((uint64_t)cubic_data->W_max * CUBIC_BETA) >> CUBIC_SHIFT, 2 * CCV(ccv, t_maxseg)); } @@ -619,21 +632,21 @@ cubic_ssthresh_update(struct cc_var *ccv, uint32_t maxseg) cwnd = CCV(ccv, snd_cwnd); /* Fast convergence heuristic. */ - if (cwnd < cubic_data->max_cwnd) { + if (cwnd < cubic_data->W_max) { cwnd = ((uint64_t)cwnd * CUBIC_FC_FACTOR) >> CUBIC_SHIFT; } - cubic_data->prev_max_cwnd = cubic_data->max_cwnd; - cubic_data->max_cwnd = cwnd; + cubic_data->undo_W_max = cubic_data->W_max; + cubic_data->W_max = cwnd; /* * On the first congestion event, set ssthresh to cwnd * 0.5 - * and reduce max_cwnd to cwnd * beta. This aligns the cubic concave + * and reduce W_max to cwnd * beta. This aligns the cubic concave * region appropriately. On subsequent congestion events, set * ssthresh to cwnd * beta. */ if ((cubic_data->flags & CUBICFLAG_CONG_EVENT) == 0) { ssthresh = cwnd >> 1; - cubic_data->max_cwnd = ((uint64_t)cwnd * + cubic_data->W_max = ((uint64_t)cwnd * CUBIC_BETA) >> CUBIC_SHIFT; } else { ssthresh = ((uint64_t)cwnd * diff --git a/sys/netinet/cc/cc_cubic.h b/sys/netinet/cc/cc_cubic.h index 3d408154c1a5..694de4a19833 100644 --- a/sys/netinet/cc/cc_cubic.h +++ b/sys/netinet/cc/cc_cubic.h @@ -93,12 +93,18 @@ struct cubic { int64_t K; /* Sum of RTT samples across an epoch in usecs. */ int64_t sum_rtt_usecs; - /* cwnd at the most recent congestion event. */ - unsigned long max_cwnd; - /* cwnd at the previous congestion event. */ - unsigned long prev_max_cwnd; - /* A copy of prev_max_cwnd. Used for CC_RTO_ERR */ - unsigned long prev_max_cwnd_cp; + /* Size of cwnd just before cwnd was reduced in the last congestion event */ + uint64_t W_max; + /* An estimate for the congestion window in the Reno-friendly region */ + uint64_t W_est; + /* The cwnd at the beginning of the current congestion avoidance stage */ + uint64_t cwnd_epoch; + /* + * Size of cwnd at the time of setting ssthresh most recently, + * either upon exiting the first slow start, or just before cwnd + * was reduced in the last congestion event + */ + uint64_t cwnd_prior; /* various flags */ uint32_t flags; /* Minimum observed rtt in usecs. */ @@ -107,14 +113,18 @@ struct cubic { int mean_rtt_usecs; /* ACKs since last congestion event. */ int epoch_ack_count; - /* Timestamp (in ticks) of arriving in congestion avoidance from last - * congestion event. - */ - int t_last_cong; - /* Timestamp (in ticks) of a previous congestion event. Used for - * CC_RTO_ERR. - */ - int t_last_cong_prev; + /* Timestamp (in ticks) at which the current CA epoch started. */ + int t_epoch; + /* Timestamp (in ticks) at which the previous CA epoch started. */ + int undo_t_epoch; + /* Few variables to restore the state after RTO_ERR */ + int64_t undo_K; + uint64_t undo_cwnd_prior; + uint64_t undo_W_max; + uint64_t undo_W_est; + uint64_t undo_cwnd_epoch; + /* Number of congestion events experienced */ + uint64_t num_cong_events; uint32_t css_baseline_minrtt; uint32_t css_current_round_minrtt; uint32_t css_lastround_minrtt; @@ -149,7 +159,7 @@ theoretical_cubic_k(double wmax_pkts) } static __inline unsigned long -theoretical_cubic_cwnd(int ticks_since_cong, unsigned long wmax, uint32_t smss) +theoretical_cubic_cwnd(int ticks_since_epoch, unsigned long wmax, uint32_t smss) { double C, wmax_pkts; @@ -157,25 +167,25 @@ theoretical_cubic_cwnd(int ticks_since_cong, unsigned long wmax, uint32_t smss) wmax_pkts = wmax / (double)smss; return (smss * (wmax_pkts + - (C * pow(ticks_since_cong / (double)hz - + (C * pow(ticks_since_epoch / (double)hz - theoretical_cubic_k(wmax_pkts) / pow(2, CUBIC_SHIFT), 3.0)))); } static __inline unsigned long -theoretical_reno_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax, +theoretical_reno_cwnd(int ticks_since_epoch, int rtt_ticks, unsigned long wmax, uint32_t smss) { - return ((wmax * 0.5) + ((ticks_since_cong / (float)rtt_ticks) * smss)); + return ((wmax * 0.5) + ((ticks_since_epoch / (float)rtt_ticks) * smss)); } static __inline unsigned long -theoretical_tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned long wmax, +theoretical_tf_cwnd(int ticks_since_epoch, int rtt_ticks, unsigned long wmax, uint32_t smss) { return ((wmax * 0.7) + ((3 * 0.3) / (2 - 0.3) * - (ticks_since_cong / (float)rtt_ticks) * smss)); + (ticks_since_epoch / (float)rtt_ticks) * smss)); } #endif /* !_KERNEL */ @@ -222,14 +232,14 @@ cubic_k(unsigned long wmax_pkts) * XXXLAS: Characterise bounds for overflow. */ static __inline unsigned long -cubic_cwnd(int usecs_since_cong, unsigned long wmax, uint32_t smss, int64_t K) +cubic_cwnd(int usecs_since_epoch, unsigned long wmax, uint32_t smss, int64_t K) { int64_t cwnd; /* K is in fixed point form with CUBIC_SHIFT worth of precision. */ /* t - K, with CUBIC_SHIFT worth of precision. */ - cwnd = (((int64_t)usecs_since_cong << CUBIC_SHIFT) - (K * hz * tick)) / + cwnd = (((int64_t)usecs_since_epoch << CUBIC_SHIFT) - (K * hz * tick)) / (hz * tick); if (cwnd > CUBED_ROOT_MAX_ULONG) @@ -266,7 +276,7 @@ cubic_cwnd(int usecs_since_cong, unsigned long wmax, uint32_t smss, int64_t K) * XXX: Not used */ static __inline unsigned long -reno_cwnd(int usecs_since_cong, int rtt_usecs, unsigned long wmax, +reno_cwnd(int usecs_since_epoch, int rtt_usecs, unsigned long wmax, uint32_t smss) { @@ -275,7 +285,7 @@ reno_cwnd(int usecs_since_cong, int rtt_usecs, unsigned long wmax, * W_tcp(t) deals with cwnd/wmax in pkts, so because our cwnd is in * bytes, we have to multiply by smss. */ - return (((wmax * RENO_BETA) + (((usecs_since_cong * smss) + return (((wmax * RENO_BETA) + (((usecs_since_epoch * smss) << CUBIC_SHIFT) / rtt_usecs)) >> CUBIC_SHIFT); } @@ -287,13 +297,13 @@ reno_cwnd(int usecs_since_cong, int rtt_usecs, unsigned long wmax, * the value of cwnd at the last congestion event. */ static __inline unsigned long -tf_cwnd(int usecs_since_cong, int rtt_usecs, unsigned long wmax, +tf_cwnd(int usecs_since_epoch, int rtt_usecs, unsigned long wmax, uint32_t smss) { /* Equation 4 of I-D. */ return (((wmax * CUBIC_BETA) + - (((THREE_X_PT3 * (unsigned long)usecs_since_cong * + (((THREE_X_PT3 * (unsigned long)usecs_since_epoch * (unsigned long)smss) << CUBIC_SHIFT) / (TWO_SUB_PT3 * rtt_usecs))) >> CUBIC_SHIFT); } From nobody Wed Jun 7 00:21:53 2023 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 4QbShK5cVWz4ZVMm; Wed, 7 Jun 2023 00:21:53 +0000 (UTC) (envelope-from git@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 4QbShK5BLKz3wRm; Wed, 7 Jun 2023 00:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686097313; 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; bh=1vlG5cY3bfP0KpXo/vGJOToM7eZKNYya4VZyqyhD5Gc=; b=Qpa4/To5oXmlFl0spyK8sN/857QWL762jnQWwlw37OTDeaE0Uf6tehrQ7UQhSfqkPDKKPt kOzX7y/rcGm2yOOMGCwbINtTKOb+4eBlLm2kOhxcDbUbngXEyRFUkEJRtWn0ZRIcQS+3sZ NWxsYqGSbczDBShan74bfZJhG+uLoIpuhbWBpwN5umFvXbrowEUaVPLD207PyB+6ZydLYU Km1e7/QzwRw/r5sLmQt3rir2jIy2vmAkJv1tBVdB0R4nHyaT7UKfDJhxdYGcBguqO/HB1y zlaQI1FVOihVJ5OLrpEt9tqkOeAeG3elcoMFECHaGL4awGBT3iePMGpu/UXkbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686097313; 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; bh=1vlG5cY3bfP0KpXo/vGJOToM7eZKNYya4VZyqyhD5Gc=; b=EPBiGk7o1Csiv51K6qOSrSRgY8tIRIRkVPWJKJCtcE1n0e67etaAoibR6gZy8CfzExLxab HtozUquZXXWyYN6c62vyW6Q07MMx5YEbmm/yc5LNtSLwq8RH+fIsEhE5+G1jlUaVLPP5Vv vwozsdBUUXHzwlhaVol235ISNbDohrE7ihssCAN6DqPuNcJPC71sSljFjIsP0PTH6nyK86 XKOfNMS/9CcPcZDYXJcUVPDoH9rao0s/D0xsJDS4kR4RryJ88kPSuabElmw54LeNXFGebW 6z4Ww5qeayu8+N386hatlIvjIXyLCXUHroGlU34xOHKPkXOLCi9ZzZ3Y3YU4vA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686097313; a=rsa-sha256; cv=none; b=DJF4IoCrIVumEd87jPjPYjrD1rVezHmFwjo4DTO07wjMGloyIkqcImNT8eg3w9O0WuJMRA ZSENWidrBQCNb+nAgR1MjgSfYcXlxyy9GG9Lc60mXOfn2lcicZ4izTSd6MiHTCC1AzFeip Vv84HaikYrwtxS5Aq+j5SB0O3/TQ/Tg+dPIKVCJfSZqNquEpR40dCfbcV7aA6TdDStc+aN 4GlGG6iwJxmkf5Yu7At5lcKdO7lxCQ/1bU0v5C8+CVdjFy2/4k0zkrVOWSaMvqQEeecpAE eQIblB6bG738zx6TrsX2WryloFL0/CofJieEfWmcz6lcruwFAXXvS4Dv6foz9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbShK4F50zrB9; Wed, 7 Jun 2023 00:21:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3570Lrca089001; Wed, 7 Jun 2023 00:21:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3570LrQB089000; Wed, 7 Jun 2023 00:21:53 GMT (envelope-from git) Date: Wed, 7 Jun 2023 00:21:53 GMT Message-Id: <202306070021.3570LrQB089000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: e82a62943529 - main - jail: add ".include" directive to jail.conf 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e82a62943529d1a7c1fcec39aec13eba69c671d6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=e82a62943529d1a7c1fcec39aec13eba69c671d6 commit e82a62943529d1a7c1fcec39aec13eba69c671d6 Author: Jamie Gritton AuthorDate: 2023-06-07 00:19:12 +0000 Commit: Jamie Gritton CommitDate: 2023-06-07 00:19:12 +0000 jail: add ".include" directive to jail.conf Jail config files can now include literal filenames and file globs. They can not (yet) include files based on variables/parameters. --- usr.sbin/jail/config.c | 86 ++++++++++++++++++++++++++++++++++++----------- usr.sbin/jail/jail.conf.5 | 17 +++++++++- usr.sbin/jail/jailp.h | 27 ++++++++++----- usr.sbin/jail/jailparse.y | 47 ++++++++++++++++++++------ 4 files changed, 137 insertions(+), 40 deletions(-) diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index 52e1cbf05c28..35f40c123042 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -46,6 +47,8 @@ __FBSDID("$FreeBSD$"); #include "jailp.h" +#define MAX_INCLUDE_DEPTH 32 + struct ipspec { const char *name; unsigned flags; @@ -58,8 +61,8 @@ extern int yyset_in(FILE *fp, void *scanner); struct cfjails cfjails = TAILQ_HEAD_INITIALIZER(cfjails); +static void parse_config(const char *fname, int is_stdin); static void free_param(struct cfparams *pp, struct cfparam *p); -static void free_param_strings(struct cfparam *p); static const struct ipspec intparams[] = { [IP_ALLOW_DYING] = {"allow.dying", PF_INTERNAL | PF_BOOL}, @@ -135,26 +138,10 @@ load_config(const char *cfname) struct cfparam *p, *vp, *tp; struct cfstring *s, *vs, *ns; struct cfvar *v, *vv; - struct cflex cflex; char *ep; - void *scanner; int did_self, jseq, pgen; - cflex.cfname = cfname; - cflex.error = 0; - yylex_init_extra(&cflex, &scanner); - if (!strcmp(cfname, "-")) { - cflex.cfname = "STDIN"; - yyset_in(stdin, scanner); - } else { - FILE *yfp = fopen(cfname, "r"); - if (!yfp) - err(1, "%s", cfname); - yyset_in(yfp, scanner); - } - if (yyparse(scanner) || cflex.error) - exit(1); - yylex_destroy(scanner); + parse_config(cfname, !strcmp(cfname, "-")); /* Separate the wildcard jails out from the actual jails. */ jseq = 0; @@ -281,6 +268,67 @@ load_config(const char *cfname) } } +void +include_config(void *scanner, const char *cfname) +{ + static unsigned int depth; + glob_t g = {0}; + const char *slash; + char *fullpath = NULL; + + /* Simple sanity check for include loops. */ + if (++depth > MAX_INCLUDE_DEPTH) + errx(1, "maximum include depth exceeded"); + /* Base relative pathnames on the current config file. */ + if (yyget_in(scanner) != stdin && cfname[0] != '/') { + const char *outer_cfname = yyget_extra(scanner)->cfname; + if ((slash = strrchr(outer_cfname, '/')) != NULL) { + size_t dirlen = (slash - outer_cfname) + 1; + + fullpath = emalloc(dirlen + strlen(cfname) + 1); + strncpy(fullpath, outer_cfname, dirlen); + strcpy(fullpath + dirlen, cfname); + cfname = fullpath; + } + } + /* + * Check if the include statement had a filename glob. + * Globbing doesn't need to catch any files, but a non-glob + * file needs to exist (enforced by parse_config). + */ + if (glob(cfname, GLOB_NOCHECK, NULL, &g) != 0) + errx(1, "%s: filename glob failed", cfname); + if (g.gl_flags & GLOB_MAGCHAR) { + for (size_t gi = 0; gi < g.gl_matchc; gi++) + parse_config(g.gl_pathv[gi], 0); + } else + parse_config(cfname, 0); + if (fullpath) + free(fullpath); + --depth; +} + +static void +parse_config(const char *cfname, int is_stdin) +{ + struct cflex cflex = {.cfname = cfname, .error = 0}; + void *scanner; + + yylex_init_extra(&cflex, &scanner); + if (is_stdin) { + cflex.cfname = "STDIN"; + yyset_in(stdin, scanner); + } else { + FILE *yfp = fopen(cfname, "r"); + if (!yfp) + err(1, "%s", cfname); + yyset_in(yfp, scanner); + } + if (yyparse(scanner) || cflex.error) + exit(1); + yylex_destroy(scanner); +} + /* * Create a new jail record. */ @@ -843,7 +891,7 @@ free_param(struct cfparams *pp, struct cfparam *p) free(p); } -static void +void free_param_strings(struct cfparam *p) { struct cfstring *s; diff --git a/usr.sbin/jail/jail.conf.5 b/usr.sbin/jail/jail.conf.5 index 67277e6d78ce..a6990c081a3b 100644 --- a/usr.sbin/jail/jail.conf.5 +++ b/usr.sbin/jail/jail.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2022 +.Dd Jun 3, 2023 .Dt JAIL.CONF 5 .Os .Sh NAME @@ -163,6 +163,14 @@ would apply to jails with names like .Dq foo.bar and .Dq foo.bar.baz . +.Ss Includes +A line of the form +.Bd -literal -offset ident +.include "filename"; +.Ed +.Pp +will include another file in the configuration. The filename must be +a literal string, and cannot contain variable expansions. .Ss Comments The configuration file may contain comments in the common C, C++, and shell formats: @@ -212,6 +220,13 @@ bar { mount.nodevfs; persist; // Required because there are no processes } + +# Include configurations from standard locations. +\[char46]include "/etc/jail.conf.d/*.conf"; +\[char46]include "/etc/jail.*.conf"; +\[char46]include "/usr/local/etc/jail[.]conf"; +\[char46]include "/usr/local/etc/jail.conf.d/*.conf"; +\[char46]include "/usr/local/etc/jail.*.conf"; .Ed .Sh SEE ALSO .Xr jail_set 2 , diff --git a/usr.sbin/jail/jailp.h b/usr.sbin/jail/jailp.h index 6ea4e3ec09a3..cd97063507c8 100644 --- a/usr.sbin/jail/jailp.h +++ b/usr.sbin/jail/jailp.h @@ -35,6 +35,7 @@ #include #include +#include #define CONF_FILE "/etc/jail.conf" @@ -45,15 +46,16 @@ #define DF_LIGHT 0x02 /* Implied dependency on jail existence only */ #define DF_NOFAIL 0x04 /* Don't propagate failed jails */ -#define PF_VAR 0x01 /* This is a variable, not a true parameter */ -#define PF_APPEND 0x02 /* Append to existing parameter list */ -#define PF_BAD 0x04 /* Unable to resolve parameter value */ -#define PF_INTERNAL 0x08 /* Internal parameter, not passed to kernel */ -#define PF_BOOL 0x10 /* Boolean parameter */ -#define PF_INT 0x20 /* Integer parameter */ -#define PF_CONV 0x40 /* Parameter duplicated in converted form */ -#define PF_REV 0x80 /* Run commands in reverse order on stopping */ -#define PF_IMMUTABLE 0x100 /* Immutable parameter */ +#define PF_VAR 0x0001 /* This is a variable, not a true parameter */ +#define PF_APPEND 0x0002 /* Append to existing parameter list */ +#define PF_BAD 0x0004 /* Unable to resolve parameter value */ +#define PF_INTERNAL 0x0008 /* Internal parameter, not passed to kernel */ +#define PF_BOOL 0x0010 /* Boolean parameter */ +#define PF_INT 0x0020 /* Integer parameter */ +#define PF_CONV 0x0040 /* Parameter duplicated in converted form */ +#define PF_REV 0x0080 /* Run commands in reverse order on stopping */ +#define PF_IMMUTABLE 0x0100 /* Immutable parameter */ +#define PF_NAMEVAL 0x0200 /* Parameter is in "name value" form */ #define JF_START 0x0001 /* -c */ #define JF_SET 0x0002 /* -m */ @@ -215,6 +217,7 @@ extern int finish_command(struct cfjail *j); extern struct cfjail *next_proc(int nonblock); extern void load_config(const char *cfname); +extern void include_config(void *scanner, const char *cfname); extern struct cfjail *add_jail(void); extern void add_param(struct cfjail *j, const struct cfparam *p, enum intparam ipnum, const char *value); @@ -226,6 +229,7 @@ extern int import_params(struct cfjail *j); extern int equalopts(const char *opt1, const char *opt2); extern int wild_jail_name(const char *wname); extern int wild_jail_match(const char *jname, const char *wname); +extern void free_param_strings(struct cfparam *p); extern void dep_setup(int docf); extern int dep_check(struct cfjail *j); @@ -237,6 +241,11 @@ extern int start_state(const char *target, int docf, unsigned state, extern void requeue(struct cfjail *j, struct cfjails *queue); extern void requeue_head(struct cfjail *j, struct cfjails *queue); +extern struct cflex *yyget_extra(void *scanner); +extern FILE *yyget_in(void *scanner); +extern int yyget_lineno(void *scanner); +extern char *yyget_text(void *scanner); + extern struct cfjails cfjails; extern struct cfjails ready; extern struct cfjails depend; diff --git a/usr.sbin/jail/jailparse.y b/usr.sbin/jail/jailparse.y index ccc311a76223..e4f2310c7fb4 100644 --- a/usr.sbin/jail/jailparse.y +++ b/usr.sbin/jail/jailparse.y @@ -73,16 +73,18 @@ conf : | conf jail | conf param ';' { - struct cfjail *j = current_jail; + if (!special_param($2, scanner)) { + struct cfjail *j = current_jail; - if (j == NULL) { - if (global_jail == NULL) { - global_jail = add_jail(); - global_jail->name = estrdup("*"); + if (j == NULL) { + if (global_jail == NULL) { + global_jail = add_jail(); + global_jail->name = estrdup("*"); + } + j = global_jail; } - j = global_jail; + TAILQ_INSERT_TAIL(&j->params, $2, tq); } - TAILQ_INSERT_TAIL(&j->params, $2, tq); } | conf ';' ; @@ -141,6 +143,7 @@ param : name { $$ = $1; TAILQ_CONCAT(&$$->val, $2, tq); + $$->flags |= PF_NAMEVAL; free($2); } | error @@ -230,10 +233,6 @@ string : STR extern int YYLEX_DECL(); -extern struct cflex *yyget_extra(void *scanner); -extern int yyget_lineno(void *scanner); -extern char *yyget_text(void *scanner); - static void YYERROR_DECL() { @@ -248,3 +247,29 @@ YYERROR_DECL() yyget_extra(scanner)->cfname, yyget_lineno(scanner), yyget_text(scanner), s); } + +/* Handle special parameters (i.e. the include directive). + * Return true if the parameter was specially handled. + */ +static int +special_param(struct cfparam *p, void *scanner) +{ + if ((p->flags & (PF_VAR | PF_APPEND | PF_NAMEVAL)) != PF_NAMEVAL + || strcmp(p->name, ".include")) + return 0; + struct cfstring *s; + TAILQ_FOREACH(s, &p->val, tq) { + if (STAILQ_EMPTY(&s->vars)) + include_config(scanner, s->s); + else { + warnx("%s line %d: " + "variables not permitted in '.include' filename", + yyget_extra(scanner)->cfname, + yyget_lineno(scanner)); + yyget_extra(scanner)->error = 1; + } + } + free_param_strings(p); + free(p); + return 1; +} From nobody Wed Jun 7 01:52:10 2023 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 4QbVhV53cLz4Zmvr; Wed, 7 Jun 2023 01:52:10 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QbVhV4LZGz46N7; Wed, 7 Jun 2023 01:52:10 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686102730; 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=KTZvBj3dCnKwupY9pWvOO7B/gSEmGoWUUJYg1pkp+CQ=; b=y0AcLmGAEn4HxWWUYq4JCrYiPtqEbeBeL46vryWjdbUlp4v1gGYy0YN8CfChplGBR7EgUD dN+yyz0CmuEfqmNip1vUWg1mU3qOC3SGjfEhksioRTMYOnxsOv4+bG2mC8iVoeX1Y85uLX g9yNpwUbivVXRUkuP62Q+q0fLDfDH7UYxgSmai3u+sTUYCuAiumHRH6bi0TDhRcIOLKLa0 lMl6i31+x+2mcPC0l8ok9XB17R7R3dF3fMiVkmzN550pCmBZCY9/HORhyawTouuSul9sSo VJ7QUldgM2gQ5w0UjRPoB7bevwUTYCQF0jH7dNBbG8vnIj05MYs6fSwhJIjvSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686102730; 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=KTZvBj3dCnKwupY9pWvOO7B/gSEmGoWUUJYg1pkp+CQ=; b=O8+fnrnWpmZKmHxNc0GI9ptMblkASYoVzKPx6Z/qPg9pufNxaNuEuACyf6CLLJ1ITAVemN aBA5n6Rf7buhRc3jhEcg3iiCQBZSx2u5GNk63MJCO61lhGdZJ/yDTJWuY56OXFf3BefG80 hejL5Vzibkx0+K9ZYCaNSYcO1j8cBTtTHhDVhvd6NyCIF+4TZpcHXlXVQWW+hpr2dzX6Hu NhLStJ4ykYdQTkYgrw4zARPLbmf0Yj9L+8FVZcj8g6tfl+dJ/OULVvTE1TFib2xMybjO/z ZAC3WTZmBkeCfp016LbywXjww8uajZvLniwA99mmTDnz+9CnIqvply3TENXqbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686102730; a=rsa-sha256; cv=none; b=s9zgApZqWTGlBKoMVZ4ynpfjFPnjzHURvRiU6RNBBFanHJktTkwwZwItS0N1gsam9Q7GhX vJ6LZ0AYjXITma3//2f97S1mwv4GbYBJqJ6sIqxU1/HXrfopnfYS5gN6i+BBTq9YYjQIHP trJoyApSiRztX+Ft85CS4a9Pm52y0ZyM/Nb9s+T6h0UV7FDGOZRd1qgdN1ER/tiDpyR5Ae 5AN/ZqG+skonjJ+ZUIsh6iI5oJbb+G3QVYWYUvJEWZhvte+Y0yRpEQGK1EMMqHJJyFybMC kzvHuhWwPg6So2YilVVoVBWPOHN17RJGjo3bpIyqrzMOVZeeU95kPG0UWJZltA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 82CEC1F46F; Wed, 7 Jun 2023 01:52:10 +0000 (UTC) Date: Wed, 7 Jun 2023 01:52:10 +0000 From: Alexey Dokuchaev To: Dmitry Chagin Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 1b0d96f3c43a - main - xregs_sig: Finish renaming simd to xregs before adding avx Message-ID: References: <202306031713.353HDY7D036200@gitrepo.freebsd.org> <3F83B6B8-7A16-488B-9594-50A7426931F5@freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ThisMailContainsUnwantedMimeParts: N On Sat, Jun 03, 2023 at 10:29:12PM +0300, Dmitry Chagin wrote: > On Sat, Jun 03, 2023 at 07:57:03PM +0100, Jessica Clarke wrote: > > ... > > But the AArch64 registers are called x0 through x30. They are x > > registers. So calling the SIMD registers X registers is both incorrect > > and highly confusing. It is not general, it is specific to x86's notion > > of SIMD. > > Naming is hard (c) especially for non-native :), > I just need an avx registers test to fix golang issues in the Linuxulator. > Feel free to join D40410, D40384, propose you naming variant, may be > x->ext or ngprs What was wrong with SIMD (simd)? ./danfe From nobody Wed Jun 7 04:14:45 2023 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 4QbYs14rlvz4bT5r; Wed, 7 Jun 2023 04:14:45 +0000 (UTC) (envelope-from git@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 4QbYs14M8Hz4N5R; Wed, 7 Jun 2023 04:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686111285; 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; bh=bDbP6/XNUE2YnsPMV0ReN0AaPyd2Ctr4w7V04WLOlEw=; b=MiYZjXatL5AvhCUWBr8IiSBGuUMc4+pv9o6qDTw4I7ok6IwE6XLa6y5hePnK7VN2GRmi8v l6rTdcFP0n2Wl/t02favdnL39gmTUnbh+B7oM3/oDNqLu80gByDLPl8sT2CpeAP6AnBj7j ZMI5VJ5CKdU9TYWXhMzNYbHf98qECNed/I25bpeavzmN5LPCMlaE+oaCDEqxPOrbeG8HwX /BHCHl/JKyOAvgc92XEB5lWRLi8UG3yo18URLR7h3+9pic+HY8aXD8yHXfKhhtqi86poTN shIdsXD05tZntp9+k0YTcoPge9+gDxwQp74DRY9p8msffDN2IZ0VSc69cvNKcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686111285; 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; bh=bDbP6/XNUE2YnsPMV0ReN0AaPyd2Ctr4w7V04WLOlEw=; b=TjRdNdBpxz9QGvuhjcdRRPvgzWc81dGmIO4C+WxIDBOTD98IfpvSlRKMCF/h4uHMt7dV5Q 2Ew/gfF8Mt6PyR+KeUsDCFZlIbos+qmEVe2ynNIiBAp93zOW/TiWga/SerhguH/EcH3zkm 8Q5MluCdrVAHbjixwu0kvq8EVZMjHiJUPao/Z9/fL1Ycg79JiyBjg+1+lvHFN0dR3SlOlc +KwF3zDC0OmRtrZZoJeABCs473XWt9TzH1jQOt65sLSHHXm8uO/UAS4OTBMAyrJzfVqS/K ftva49ZZGH7xEhTCvDnt5rgHxiLlIzJb1vCfOtRu41ZyqnKyHzbTScYV2izUAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686111285; a=rsa-sha256; cv=none; b=rFGZpnt1iwVDfgXyOFDqPjc4lbEv9SekiUAoNb2Qoaoy29oUmWv0U3Us+ObBP1TvPUI8IY 4vzw+JB/xd2Ff/4xHYGh0L1lbPCtpNq7lgZ62DAchwqAOqsB2tnHDYOFsh2KWaPq9yNEIG etNZEATatgMt9lezXEUDFaKeo6rg8rFteBLxN17vY0AtFoAp4UXzCVq2tNkcHZZBQ7uqhK OGYXk2wTgeq7Uw49fj8bGyPhFcxE0vebTkcuSQsOq0NeR5c6A3bAnlJTLSp5Ue90IRRaSW wHJuL0VPf01vqwfLpb+PXKuXSR1sUZfjOcglOhtFSyaG5rC9EnWPryq1gn02nw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbYs13RX9zx8F; Wed, 7 Jun 2023 04:14:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3574EjA1071535; Wed, 7 Jun 2023 04:14:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3574Ej1I071534; Wed, 7 Jun 2023 04:14:45 GMT (envelope-from git) Date: Wed, 7 Jun 2023 04:14:45 GMT Message-Id: <202306070414.3574Ej1I071534@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 1177a6c8dcfd - main - gve: Unobfuscate code by using nitems directly for loop. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1177a6c8dcfd6625c541d6ffc3c6915b8b6354f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=1177a6c8dcfd6625c541d6ffc3c6915b8b6354f7 commit 1177a6c8dcfd6625c541d6ffc3c6915b8b6354f7 Author: Xin LI AuthorDate: 2023-06-07 04:14:30 +0000 Commit: Xin LI CommitDate: 2023-06-07 04:14:30 +0000 gve: Unobfuscate code by using nitems directly for loop. While there, also make MODULE_PNP_INFO to reflect that the device description is provided. Reported-by: jrtc27 Reviewed-by: jrtc27, imp Differential Revision: https://reviews.freebsd.org/D40430 --- sys/dev/gve/gve_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/gve/gve_main.c b/sys/dev/gve/gve_main.c index 383fd326d33a..c3ee6d5c3433 100644 --- a/sys/dev/gve/gve_main.c +++ b/sys/dev/gve/gve_main.c @@ -46,7 +46,6 @@ static struct gve_dev { } gve_devs[] = { { PCI_VENDOR_ID_GOOGLE, PCI_DEV_ID_GVNIC, "gVNIC" } }; -#define GVE_DEVS_COUNT nitems(gve_devs) struct sx gve_global_lock; @@ -717,7 +716,7 @@ gve_probe(device_t dev) vendorid = pci_get_vendor(dev); deviceid = pci_get_device(dev); - for (i = 0; i < GVE_DEVS_COUNT; i++) { + for (i = 0; i < nitems(gve_devs); i++) { if (vendorid == gve_devs[i].vendor_id && deviceid == gve_devs[i].device_id) { device_set_desc(dev, gve_devs[i].name); @@ -869,5 +868,5 @@ DRIVER_MODULE(gve, pci, gve_driver, gve_devclass, 0, 0); #else DRIVER_MODULE(gve, pci, gve_driver, 0, 0); #endif -MODULE_PNP_INFO("U16:vendor;U16:device", pci, gve, gve_devs, - GVE_DEVS_COUNT); +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, gve, gve_devs, + nitems(gve_devs)); From nobody Wed Jun 7 08:24:50 2023 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 4QbgPZ5DLKz4bFPV; Wed, 7 Jun 2023 08:24:50 +0000 (UTC) (envelope-from git@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 4QbgPZ4Qhvz3QVR; Wed, 7 Jun 2023 08:24:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686126290; 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; bh=HsH3mbogkLC6MR+2svuL5Y0XWWhG7yqU/3+7Uf0rxPc=; b=Wejgl6SwvzQ3v+RRGLmjsIFmE6AjEvnsh5gW3hk9Xq1JT+KpahSsBqw8f0IBCiojyEVs4V q2/MR/d37VoQ7Jl1DqJKSV8wvNGzzwAgSbAoRteGiT0RZkI/L7cN5VSZ4sFAntEcY/72Ut C3hJwV2fHXzJml+xK0r2IENgOdRTJRUfkjWsDNqSMRMHIV4GugcujYxZx/vsfEAZzkgjrg lo396wN8pzj3s5ZtcQDegkjgTy4R2kb/XkrNXYkiXDj7j+56OhblVmWpVuA6GHRfuMmtLo spEz0VSjrYkNuMPyU09uIE5b8qjwuYYZorSpBrfJaA3klEWk4hTwcvl8PVKbsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686126290; 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; bh=HsH3mbogkLC6MR+2svuL5Y0XWWhG7yqU/3+7Uf0rxPc=; b=LlQCLJUR/O5ucvGRGQnlk5HFmPAsK3aNwuKGV5vKxCicic7m2muecsVpu4dV7uAnv8nQ14 UOFtaI1W3X4jgUJHqhXAfdZcxHM940q7f2UZohZGcUp9o9ofFxUPmJaxPbx/HUdpzDyBfa cwinlaSiY3g1tjfbnIwANvvUgXdz/ixXqhytzOempg7HoyzI+pS8vCOqk1qxRAAW4OXU4G fZTQaKAT7YhO2Z0WPm/50E/v502YN94fEMDqyzEG09E36i8jRzP5UDGgkEip+Irb4lPRlm t7noffdZBEf1W1M13v7Wq5bzO/v7tt51F1AlhJpKd25RCMASGSSj5Gm4rOiq1w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686126290; a=rsa-sha256; cv=none; b=OJ5fmPAqxUDU5wrY6zms7xWFHfxgXGcqHYhitGxbTKfQMlCrl2GgGiCumHOP5JZoLb4Um8 Ad972LoWA34An4cE1l6ak4PCvj+Uq8fdM1+IutVxPvAo0zpQH5QyZvOa3GYdTHcs2zIytg Ygk6Lmz0IUZKDldUKakfFH9QTvnDRyyW2TTY3E+asPNNQNe9qsW0ocUjOm1x7dZ5oyAuUu iFgMTZ17m951yiXp4CqXY3Qgs2JRCWLC0CTvfEmRozIuKlLYSXH8k1faJscpc2YZQ5IZmQ Y6TsH157TAsVFOWTCA1Im0WAn5SZ3vDUsZNO1gUCoF1zcuvfvgUx/fnauy0Uhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbgPZ3W8bz14RB; Wed, 7 Jun 2023 08:24:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3578Oorv084278; Wed, 7 Jun 2023 08:24:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3578OoJF084277; Wed, 7 Jun 2023 08:24:50 GMT (envelope-from git) Date: Wed, 7 Jun 2023 08:24:50 GMT Message-Id: <202306070824.3578OoJF084277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wei Hu Subject: git: 4f8c634de09f - main - arm64 Hyper-V: enable Hyper-V SMP for ARM64 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f8c634de09ffa2583306821e235f6f92104e729 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=4f8c634de09ffa2583306821e235f6f92104e729 commit 4f8c634de09ffa2583306821e235f6f92104e729 Author: Wei Hu AuthorDate: 2023-06-07 08:03:59 +0000 Commit: Wei Hu CommitDate: 2023-06-07 08:24:13 +0000 arm64 Hyper-V: enable Hyper-V SMP for ARM64 Vmbus_synic_setup() is invoked via vmbus_intrhook -> vmbus_doattach -> smp_rendezvous. On !EARLY_AP_STARTUP (e.g., aarch64), SMP isn't functional in intrhooks and smp_rendezvous() will just call vmbus_synic_setup() on the boot processor. There's nothing that will initialize the pcpu data on every other AP. To fix it we need to use SI_SUB_SMP for vmbus_doattach(). With this patch the vmbus interrupt should work on all arm64 cpus on HyperV. Reported by: kevans Reviewed by: kevans, whu Tested by: Souradeep Chakrabarti Obtained from: Souradeep Chakrabarti Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D40279 --- sys/dev/hyperv/vmbus/vmbus.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index ae4c466d98d9..cc37d84ff151 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -114,7 +114,7 @@ static uint32_t vmbus_get_vcpu_id_method(device_t bus, device_t dev, int cpu); static struct taskqueue *vmbus_get_eventtq_method(device_t, device_t, int); -#if defined(EARLY_AP_STARTUP) || defined(__aarch64__) +#if defined(EARLY_AP_STARTUP) static void vmbus_intrhook(void *); #endif @@ -1482,7 +1482,7 @@ vmbus_event_proc_dummy(struct vmbus_softc *sc __unused, int cpu __unused) { } -#if defined(EARLY_AP_STARTUP) || defined(__aarch64__) +#if defined(EARLY_AP_STARTUP) static void vmbus_intrhook(void *xsc) @@ -1495,7 +1495,7 @@ vmbus_intrhook(void *xsc) config_intrhook_disestablish(&sc->vmbus_intrhook); } -#endif /* EARLY_AP_STARTUP aarch64 */ +#endif /* EARLY_AP_STARTUP */ static int vmbus_attach(device_t dev) @@ -1511,22 +1511,13 @@ vmbus_attach(device_t dev) */ vmbus_sc->vmbus_event_proc = vmbus_event_proc_dummy; -#if defined(EARLY_AP_STARTUP) || defined(__aarch64__) +#if defined(EARLY_AP_STARTUP) /* * Defer the real attach until the pause(9) works as expected. */ vmbus_sc->vmbus_intrhook.ich_func = vmbus_intrhook; vmbus_sc->vmbus_intrhook.ich_arg = vmbus_sc; config_intrhook_establish(&vmbus_sc->vmbus_intrhook); -#else /* !EARLY_AP_STARTUP */ - /* - * If the system has already booted and thread - * scheduling is possible indicated by the global - * cold set to zero, we just call the driver - * initialization directly. - */ - if (!cold) - vmbus_doattach(vmbus_sc); #endif /* EARLY_AP_STARTUP and aarch64 */ return (0); @@ -1572,7 +1563,7 @@ vmbus_detach(device_t dev) return (0); } -#if !defined(EARLY_AP_STARTUP) && !defined(__aarch64__) +#if !defined(EARLY_AP_STARTUP) static void vmbus_sysinit(void *arg __unused) @@ -1582,14 +1573,7 @@ vmbus_sysinit(void *arg __unused) if (vm_guest != VM_GUEST_HV || sc == NULL) return; - /* - * If the system has already booted and thread - * scheduling is possible, as indicated by the - * global cold set to zero, we just call the driver - * initialization directly. - */ - if (!cold) - vmbus_doattach(sc); + vmbus_doattach(sc); } /* * NOTE: From nobody Wed Jun 7 08:35:40 2023 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 4QbgfH0fWkz4bHRN; Wed, 7 Jun 2023 08:35:51 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Received: from heemeyer.club (heemeyer.club [195.93.173.158]) (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 4QbgfG0qVbz3hHV; Wed, 7 Jun 2023 08:35:49 +0000 (UTC) (envelope-from dchagin@heemeyer.club) Authentication-Results: mx1.freebsd.org; none Received: from heemeyer.club (localhost [127.0.0.1]) by heemeyer.club (8.17.1/8.16.1) with ESMTP id 3578Zemk074700; Wed, 7 Jun 2023 11:35:40 +0300 (MSK) (envelope-from dchagin@heemeyer.club) Received: (from dchagin@localhost) by heemeyer.club (8.17.1/8.16.1/Submit) id 3578Zegk074699; Wed, 7 Jun 2023 11:35:40 +0300 (MSK) (envelope-from dchagin) Date: Wed, 7 Jun 2023 11:35:40 +0300 From: Dmitry Chagin To: Alexey Dokuchaev Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 1b0d96f3c43a - main - xregs_sig: Finish renaming simd to xregs before adding avx Message-ID: References: <202306031713.353HDY7D036200@gitrepo.freebsd.org> <3F83B6B8-7A16-488B-9594-50A7426931F5@freebsd.org> 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 4QbgfG0qVbz3hHV X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:61400, ipnet:195.93.173.0/24, country:RU] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Wed, Jun 07, 2023 at 01:52:10AM +0000, Alexey Dokuchaev wrote: > On Sat, Jun 03, 2023 at 10:29:12PM +0300, Dmitry Chagin wrote: > > On Sat, Jun 03, 2023 at 07:57:03PM +0100, Jessica Clarke wrote: > > > ... > > > But the AArch64 registers are called x0 through x30. They are x > > > registers. So calling the SIMD registers X registers is both incorrect > > > and highly confusing. It is not general, it is specific to x86's notion > > > of SIMD. > > > > Naming is hard (c) especially for non-native :), > > I just need an avx registers test to fix golang issues in the Linuxulator. > > Feel free to join D40410, D40384, propose you naming variant, may be > > x->ext or ngprs > > What was wrong with SIMD (simd)? Strictly speaking test is about the fact that signal context properly saves/restores machine context including gprs, simd registers, on x86 xsave area including many things, whch can be added later > > ./danfe From nobody Wed Jun 7 09:33:16 2023 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 4QbhwX24jqz4bSMZ; Wed, 7 Jun 2023 09:33:16 +0000 (UTC) (envelope-from git@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 4QbhwX1w36z3p1Q; Wed, 7 Jun 2023 09:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686130396; 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; bh=wkBBu4b9PMiuNDV6ZshsoY0o/N57+3zKqFBGXexxQxo=; b=fvGdAp7kFUNMBzncmNfSnIm6d6LYsaLF6LB/haglBlPb1+U+y21YHIfXoBNcrTGkpBumzd i5QtDf4CZ9ZYka0EyrpxTblO0HKvEIn13H2E0dkZLBgJ6ML+j7ugbqIvCyamPDWarkt3QR MLckUyV7a9QoaCCA7BpyE0McIWRqy64TJudGFOQMQKO9Ha3MEeJ5UnNCu8QRtHMJmC87AN VLcqQWCi/7pkoBQXj2uvER8K/x9TDV6YWpxsxu/Zh/HKol1fRvQLsrDtBSeU+2g2HtjCeG Bc5Wqym4m8hY5wlOqnkpGyYBsOi9IU4mc6sz/RYgYsHjlk4Ar0cth92TdgEt6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686130396; 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; bh=wkBBu4b9PMiuNDV6ZshsoY0o/N57+3zKqFBGXexxQxo=; b=NOEsVuVmpqAUEcS0u5oeSil6yVC6JxUVeWtQqsuoLxB4oFxowRXv5pr8pEaMvh8pMv5/20 z+fKWAB6jgAa/aCfEPWX114zoIE6VXq9UVlSSDkKTy2TinOqq+oO1PhhgGTLzNx46zzH7B U5t59fi+mwt7Q7yQX2T10KIX4+cw/j/XVNlC98KYbn5LlquChV8NlANeSxtpzWFamTZ3MS g6u6SJPjpC9iMq5co/pUH27183emScwDrH7dOVSAhmQ8WlhGuRtFaMA0FuL6Vrmtae6TcY 0FBnY5EoCeOg+dZgf+smNITRqLNfX3MIabddJQDvQEmZJp2G4dRWLd6TIx/jfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686130396; a=rsa-sha256; cv=none; b=dvgSnIczRMiD+D1kr0SjD3hJkOJokWPHx1Qj8BFIfrRTH82rf4YbUGCxBprgv8Xco5oeVO Wo5kpohenbe/G5s5Tw1/3nV9YAqzyLgUe5rik+8r8DyunzCSdDhmwG+Z4Lg56wbyJFI4Z9 Je7FzAoOxozeRuwGcOeLB6VHstB1pzChWyilywtsrhAjZkW87pulaolj2gd+BMsHohvFNU eqBHXbsiYeUIAARlf/IF+PVccpbxK9/OomJk0mTsXQXmIKXtVIYladZvivhGLaHfLd3Gtz ZToMr1KjgQPl4OzbqFAqcPId6tZP5dRa0Z4GBKAMdNlAvjxPGyM4xPHgJW8wnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbhwX0zSbz15xB; Wed, 7 Jun 2023 09:33:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3579XGoq098637; Wed, 7 Jun 2023 09:33:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3579XGcj098636; Wed, 7 Jun 2023 09:33:16 GMT (envelope-from git) Date: Wed, 7 Jun 2023 09:33:16 GMT Message-Id: <202306070933.3579XGcj098636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 1f166509895d - main - ipmi: add Block Transfer interface support 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f166509895dd90fcaaa08b557f9bc106e3f7e71 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=1f166509895dd90fcaaa08b557f9bc106e3f7e71 commit 1f166509895dd90fcaaa08b557f9bc106e3f7e71 Author: Andrey V. Elsukov AuthorDate: 2023-06-07 09:30:47 +0000 Commit: Andrey V. Elsukov CommitDate: 2023-06-07 09:30:47 +0000 ipmi: add Block Transfer interface support Reviewed by: ambrisko Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D40421 --- sys/conf/files.arm64 | 1 + sys/conf/files.x86 | 1 + sys/dev/ipmi/ipmi_acpi.c | 19 +-- sys/dev/ipmi/ipmi_bt.c | 296 +++++++++++++++++++++++++++++++++++++++++++++ sys/dev/ipmi/ipmi_isa.c | 19 +-- sys/dev/ipmi/ipmi_pci.c | 28 +++-- sys/dev/ipmi/ipmi_smbios.c | 1 + sys/dev/ipmi/ipmivars.h | 19 ++- sys/modules/ipmi/Makefile | 2 +- 9 files changed, 353 insertions(+), 33 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 9218336d154d..1fed31af0761 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -338,6 +338,7 @@ dev/iicbus/twsi/twsi.c optional twsi fdt dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi +dev/ipmi/ipmi_bt.c optional ipmi dev/ipmi/ipmi_kcs.c optional ipmi dev/ipmi/ipmi_smic.c optional ipmi diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index f80638f98f95..7f455b4c9bb3 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -153,6 +153,7 @@ dev/iommu/iommu_gas.c optional acpi iommu pci dev/ipmi/ipmi.c optional ipmi dev/ipmi/ipmi_acpi.c optional ipmi acpi dev/ipmi/ipmi_isa.c optional ipmi isa +dev/ipmi/ipmi_bt.c optional ipmi dev/ipmi/ipmi_kcs.c optional ipmi dev/ipmi/ipmi_smic.c optional ipmi dev/ipmi/ipmi_smbus.c optional ipmi smbus diff --git a/sys/dev/ipmi/ipmi_acpi.c b/sys/dev/ipmi/ipmi_acpi.c index e06f929c80b9..bfebac6c92d6 100644 --- a/sys/dev/ipmi/ipmi_acpi.c +++ b/sys/dev/ipmi/ipmi_acpi.c @@ -94,16 +94,17 @@ ipmi_acpi_attach(device_t dev) switch (interface_type) { case KCS_MODE: - count = 2; + count = IPMI_IF_KCS_NRES; mode = "KCS"; break; case SMIC_MODE: - count = 3; + count = IPMI_IF_SMIC_NRES; mode = "SMIC"; break; case BT_MODE: - device_printf(dev, "BT interface not supported\n"); - return (ENXIO); + count = IPMI_IF_BT_NRES; + mode = "BT"; + break; case SSIF_MODE: device_printf(dev, "SSIF interface not supported on ACPI\n"); return (0); @@ -170,18 +171,20 @@ ipmi_acpi_attach(device_t dev) * We assume an alignment of 1 byte as currently the IPMI spec * doesn't provide any way to determine the alignment via ACPI. */ + error = ENXIO; switch (interface_type) { case KCS_MODE: error = ipmi_kcs_attach(sc); - if (error) - goto bad; break; case SMIC_MODE: error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; diff --git a/sys/dev/ipmi/ipmi_bt.c b/sys/dev/ipmi/ipmi_bt.c new file mode 100644 index 000000000000..0f970d966731 --- /dev/null +++ b/sys/dev/ipmi/ipmi_bt.c @@ -0,0 +1,296 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Yandex LLC + * Copyright (c) 2023 Andrey V. Elsukov + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* + * BT interface + */ + +#define DMSG0(sc, fmt, ...) do { \ + device_printf((sc)->ipmi_dev, "BT: %s: " fmt "\n", \ + __func__, ## __VA_ARGS__); \ +} while (0) + +#define DMSGV(...) if (bootverbose) { \ + DMSG0(__VA_ARGS__); \ +} + +#ifdef IPMI_BT_DEBUG +#define DMSG(...) DMSG0(__VA_ARGS__) +#else +#define DMSG(...) +#endif + +#define BT_IO_BASE 0xe4 + +#define BT_CTRL_REG 0 +#define BT_C_CLR_WR_PTR (1L << 0) +#define BT_C_CLR_RD_PTR (1L << 1) +#define BT_C_H2B_ATN (1L << 2) +#define BT_C_B2H_ATN (1L << 3) +#define BT_C_SMS_ATN (1L << 4) +#define BT_C_OEM0 (1L << 5) +#define BT_C_H_BUSY (1L << 6) +#define BT_C_B_BUSY (1L << 7) + +#define BT_CTRL_BITS "\20\01CLR_WR_PTR\02CLR_RD_PTR\03H2B_ATN\04B2H_ATN"\ + "\05SMS_ATN\06OEM0\07H_BUSY\010B_BUSY" + +#define BT_DATA_REG 1 +#define BTMSG_REQLEN 3 +#define BTMSG_REPLEN 4 + +#define BT_INTMASK_REG 2 +#define BT_IM_B2H_IRQ_EN (1L << 0) +#define BT_IM_B2H_IRQ (1L << 1) +#define BT_IM_BMC_HWRST (1L << 7) + +static int bt_polled_request(struct ipmi_softc *, struct ipmi_request *); +static int bt_driver_request(struct ipmi_softc *, struct ipmi_request *, int); +static int bt_wait(struct ipmi_softc *, uint8_t, uint8_t); +static int bt_reset(struct ipmi_softc *); + +static void bt_loop(void *); +static int bt_startup(struct ipmi_softc *); + +#define BT_DELAY_MIN 1 +#define BT_DELAY_MAX 256 + +static int +bt_wait(struct ipmi_softc *sc, uint8_t mask, uint8_t wanted) +{ + volatile uint8_t value; + int delay = BT_DELAY_MIN; + int count = 20000; /* about 5 seconds */ + + while (count--) { + value = INB(sc, BT_CTRL_REG); + if ((value & mask) == wanted) + return (value); + /* + * The wait delay is increased exponentially to avoid putting + * significant load on I/O bus. + */ + DELAY(delay); + if (delay < BT_DELAY_MAX) + delay <<= 1; + } + DMSGV(sc, "failed: m=%b w=%b v=0x%02x\n", + mask, BT_CTRL_BITS, wanted, BT_CTRL_BITS, value); + return (-1); + +} + +static int +bt_reset(struct ipmi_softc *sc) +{ + uint8_t v; + + v = INB(sc, BT_CTRL_REG); + DMSG(sc, "ctrl: %b", v, BT_CTRL_BITS); + v &= BT_C_H_BUSY; /* clear H_BUSY iff it set */ + v |= BT_C_CLR_WR_PTR | BT_C_CLR_RD_PTR | BT_C_B2H_ATN | BT_C_H2B_ATN; + + bt_wait(sc, BT_C_B_BUSY, 0); + OUTB(sc, BT_CTRL_REG, v); + + v = BT_IM_B2H_IRQ | BT_IM_BMC_HWRST; + OUTB(sc, BT_INTMASK_REG, v); + + return (0); +} + +/* + * Send a request message and collect the reply. Returns 1 if we + * succeed. + */ +static int +bt_polled_request(struct ipmi_softc *sc, struct ipmi_request *req) +{ + uint8_t addr, cmd, seq, v; + int i; + + IPMI_IO_LOCK(sc); + + /* + * Send the request: + * + * Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5:N + * -------+-----------+--------+--------+--------- + * Length | NetFn/LUN | Seq | Cmd | Data + */ + + if (bt_wait(sc, BT_C_B_BUSY | BT_C_H2B_ATN, 0) < 0) { + DMSG(sc, "failed to start write transfer"); + goto fail; + } + DMSG(sc, "request: length=%d, addr=0x%02x, seq=%u, cmd=0x%02x", + (int)req->ir_requestlen, req->ir_addr, sc->ipmi_bt_seq, req->ir_command); + OUTB(sc, BT_CTRL_REG, BT_C_CLR_WR_PTR); + OUTB(sc, BT_DATA_REG, req->ir_requestlen + BTMSG_REQLEN); + OUTB(sc, BT_DATA_REG, req->ir_addr); + OUTB(sc, BT_DATA_REG, sc->ipmi_bt_seq); + OUTB(sc, BT_DATA_REG, req->ir_command); + for (i = 0; i < req->ir_requestlen; i++) + OUTB(sc, BT_DATA_REG, req->ir_request[i]); + OUTB(sc, BT_CTRL_REG, BT_C_H2B_ATN); + + if (bt_wait(sc, BT_C_B_BUSY | BT_C_H2B_ATN, 0) < 0) { + DMSG(sc, "failed to finish write transfer"); + goto fail; + } + + /* + * Read the reply: + * + * Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6:N + * -------+-----------+--------+--------+-----------------+--------- + * Length | NetFn/LUN | Seq | Cmd | Completion code | Data + */ + if (bt_wait(sc, BT_C_B2H_ATN, BT_C_B2H_ATN) < 0) { + DMSG(sc, "got no reply from BMC"); + goto fail; + } + OUTB(sc, BT_CTRL_REG, BT_C_H_BUSY); + OUTB(sc, BT_CTRL_REG, BT_C_B2H_ATN); + OUTB(sc, BT_CTRL_REG, BT_C_CLR_RD_PTR); + + i = INB(sc, BT_DATA_REG); + if (i < BTMSG_REPLEN) { + DMSG(sc, "wrong data length: %d", i); + goto fail; + } + req->ir_replylen = i - BTMSG_REPLEN; + DMSG(sc, "data length: %d, frame length: %d", req->ir_replylen, i); + + addr = INB(sc, BT_DATA_REG); + if (addr != IPMI_REPLY_ADDR(req->ir_addr)) { + DMSGV(sc, "address doesn't match: addr=0x%02x vs. 0x%02x", + req->ir_addr, addr); + } + + seq = INB(sc, BT_DATA_REG); + if (seq != sc->ipmi_bt_seq) { + DMSGV(sc, "seq number doesn't match: seq=0x%02x vs. 0x%02x", + sc->ipmi_bt_seq, seq); + } + + cmd = INB(sc, BT_DATA_REG); + if (cmd != req->ir_command) { + DMSGV(sc, "command doesn't match: cmd=0x%02x vs. 0x%02x", + req->ir_command, cmd); + } + + req->ir_compcode = INB(sc, BT_DATA_REG); + for (i = 0; i < req->ir_replylen; i++) { + v = INB(sc, BT_DATA_REG); + if (i < req->ir_replybuflen) + req->ir_reply[i] = v; + } + + OUTB(sc, BT_CTRL_REG, BT_C_H_BUSY); + IPMI_IO_UNLOCK(sc); + DMSG(sc, "reply: length=%d, addr=0x%02x, seq=%u, cmd=0x%02x, code=0x%02x", + (int)req->ir_replylen, addr, seq, req->ir_command, req->ir_compcode); + return (1); +fail: + bt_reset(sc); + IPMI_IO_UNLOCK(sc); + return (0); +} + +static void +bt_loop(void *arg) +{ + struct ipmi_softc *sc = arg; + struct ipmi_request *req; + + IPMI_LOCK(sc); + while ((req = ipmi_dequeue_request(sc)) != NULL) { + IPMI_UNLOCK(sc); + (void)bt_driver_request(sc, req, 0); + IPMI_LOCK(sc); + sc->ipmi_bt_seq++; + ipmi_complete_request(sc, req); + } + IPMI_UNLOCK(sc); + kproc_exit(0); +} + +static int +bt_startup(struct ipmi_softc *sc) +{ + + return (kproc_create(bt_loop, sc, &sc->ipmi_kthread, 0, 0, "%s: bt", + device_get_nameunit(sc->ipmi_dev))); +} + +static int +bt_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo __unused) +{ + int i, ok; + + ok = 0; + for (i = 0; i < 3 && !ok; i++) + ok = bt_polled_request(sc, req); + if (ok) + req->ir_error = 0; + else + req->ir_error = EIO; + return (req->ir_error); +} + +int +ipmi_bt_attach(struct ipmi_softc *sc) +{ + /* Setup function pointers. */ + sc->ipmi_startup = bt_startup; + sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; + sc->ipmi_driver_request = bt_driver_request; + sc->ipmi_driver_requests_polled = 1; + sc->ipmi_bt_seq = 1; + + return (bt_reset(sc)); +} diff --git a/sys/dev/ipmi/ipmi_isa.c b/sys/dev/ipmi/ipmi_isa.c index 275c2f5523f9..06fe10e87286 100644 --- a/sys/dev/ipmi/ipmi_isa.c +++ b/sys/dev/ipmi/ipmi_isa.c @@ -188,16 +188,17 @@ ipmi_isa_attach(device_t dev) switch (info.iface_type) { case KCS_MODE: - count = 2; + count = IPMI_IF_KCS_NRES; mode = "KCS"; break; case SMIC_MODE: - count = 3; + count = IPMI_IF_SMIC_NRES; mode = "SMIC"; break; case BT_MODE: - device_printf(dev, "BT mode is unsupported\n"); - return (ENXIO); + count = IPMI_IF_BT_NRES; + mode = "BT"; + break; default: return (ENXIO); } @@ -248,19 +249,21 @@ ipmi_isa_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); } + error = ENXIO; switch (info.iface_type) { case KCS_MODE: error = ipmi_kcs_attach(sc); - if (error) - goto bad; break; case SMIC_MODE: error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; diff --git a/sys/dev/ipmi/ipmi_pci.c b/sys/dev/ipmi/ipmi_pci.c index 72a1c84f9b71..9417caa40c78 100644 --- a/sys/dev/ipmi/ipmi_pci.c +++ b/sys/dev/ipmi/ipmi_pci.c @@ -112,8 +112,8 @@ ipmi_pci_attach(device_t dev) mode = "SMIC"; break; case BT_MODE: - device_printf(dev, "BT mode is unsupported\n"); - return (ENXIO); + mode = "BT"; + break; default: device_printf(dev, "No IPMI interface found\n"); return (ENXIO); @@ -143,18 +143,20 @@ ipmi_pci_attach(device_t dev) sc->ipmi_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->ipmi_irq_rid, RF_SHAREABLE | RF_ACTIVE); + error = ENXIO; switch (info.iface_type) { case KCS_MODE: error = ipmi_kcs_attach(sc); - if (error) - goto bad; break; case SMIC_MODE: error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; @@ -215,8 +217,7 @@ ipmi2_pci_attach(device_t dev) break; case PCIP_SERIALBUS_IPMI_BT: iface = BT_MODE; - device_printf(dev, "BT interface unsupported\n"); - return (ENXIO); + break; default: device_printf(dev, "Unsupported interface: %d\n", pci_get_progif(dev)); @@ -242,6 +243,7 @@ ipmi2_pci_attach(device_t dev) sc->ipmi_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->ipmi_irq_rid, RF_SHAREABLE | RF_ACTIVE); + error = ENXIO; switch (iface) { case KCS_MODE: device_printf(dev, "using KSC interface\n"); @@ -252,7 +254,6 @@ ipmi2_pci_attach(device_t dev) */ if (!ipmi_kcs_probe_align(sc)) { device_printf(dev, "Unable to determine alignment\n"); - error = ENXIO; goto bad; } @@ -262,12 +263,15 @@ ipmi2_pci_attach(device_t dev) break; case SMIC_MODE: device_printf(dev, "using SMIC interface\n"); - error = ipmi_smic_attach(sc); - if (error) - goto bad; + break; + case BT_MODE: + device_printf(dev, "using BT interface\n"); + error = ipmi_bt_attach(sc); break; } + if (error) + goto bad; error = ipmi_attach(dev); if (error) goto bad; diff --git a/sys/dev/ipmi/ipmi_smbios.c b/sys/dev/ipmi/ipmi_smbios.c index db15a853e5ea..66b7b63087b0 100644 --- a/sys/dev/ipmi/ipmi_smbios.c +++ b/sys/dev/ipmi/ipmi_smbios.c @@ -104,6 +104,7 @@ smbios_ipmi_info(struct smbios_structure_header *h, void *arg) switch (s->interface_type) { case KCS_MODE: case SMIC_MODE: + case BT_MODE: info->address = IPMI_BAR_ADDR(s->base_address) | IPMI_BAM_ADDR_LSB(s->base_address_modifier); info->io_mode = IPMI_BAR_MODE(s->base_address); diff --git a/sys/dev/ipmi/ipmivars.h b/sys/dev/ipmi/ipmivars.h index 3a20f5a9de1c..be684957122a 100644 --- a/sys/dev/ipmi/ipmivars.h +++ b/sys/dev/ipmi/ipmivars.h @@ -59,6 +59,10 @@ struct ipmi_request { uint8_t ir_ipmb_command; }; +#define IPMI_IF_KCS_NRES 2 +#define IPMI_IF_SMIC_NRES 3 +#define IPMI_IF_BT_NRES 3 + #define MAX_RES 3 #define KCS_DATA 0 #define KCS_CTL_STS 1 @@ -80,6 +84,10 @@ struct ipmi_device { u_char ipmi_lun; }; +struct ipmi_bt { + uint8_t seq; +}; + struct ipmi_kcs { }; @@ -94,6 +102,7 @@ struct ipmi_ssif { struct ipmi_softc { device_t ipmi_dev; union { + struct ipmi_bt bt; struct ipmi_kcs kcs; struct ipmi_smic smic; struct ipmi_ssif ssif; @@ -131,11 +140,12 @@ struct ipmi_softc { #define ipmi_ssif_smbus_address _iface.ssif.smbus_address #define ipmi_ssif_smbus _iface.ssif.smbus +#define ipmi_bt_seq _iface.bt.seq -#define KCS_MODE 0x01 -#define SMIC_MODE 0x02 -#define BT_MODE 0x03 -#define SSIF_MODE 0x04 +#define KCS_MODE 0x01 +#define SMIC_MODE 0x02 +#define BT_MODE 0x03 +#define SSIF_MODE 0x04 /* KCS status flags */ #define KCS_STATUS_OBF 0x01 /* Data Out ready from BMC */ @@ -252,6 +262,7 @@ const char *ipmi_pci_match(uint16_t, uint16_t); int ipmi_kcs_attach(struct ipmi_softc *); int ipmi_kcs_probe_align(struct ipmi_softc *); int ipmi_smic_attach(struct ipmi_softc *); +int ipmi_bt_attach(struct ipmi_softc *); int ipmi_ssif_attach(struct ipmi_softc *, device_t, int); extern int ipmi_attached; diff --git a/sys/modules/ipmi/Makefile b/sys/modules/ipmi/Makefile index 733ac6f30222..3d0414fc3807 100644 --- a/sys/modules/ipmi/Makefile +++ b/sys/modules/ipmi/Makefile @@ -10,7 +10,7 @@ SRCS+= bus_if.h device_if.h .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "aarch64" -SRCS+= ipmi_kcs.c ipmi_smic.c +SRCS+= ipmi_kcs.c ipmi_smic.c ipmi_bt.c SRCS+= ipmi_acpi.c SRCS+= opt_acpi.h SRCS+= acpi_if.h From nobody Wed Jun 7 14:26:22 2023 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 4QbqQk6z3sz4Zrc7; Wed, 7 Jun 2023 14:26:22 +0000 (UTC) (envelope-from git@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 4QbqQk6KS7z4M3G; Wed, 7 Jun 2023 14:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686147982; 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; bh=Av+TtQOG5dvXzDuBcty1OtxJUAYAJKGTNAMvd9lY/1E=; b=J6e7H/NZspeFeYeYiIJXFu77Hrz0B0ESiMUWTbqP4uOhOAumLU3tFFVbfKtyiKr5THvRex +PGhFvETxZ0k7tfkaBhouOihl/hxmQkpotp5qsDiM8jO3fSxUskuFfMcaisbdRgxqFmGzS putP1PI0Uujmr/lixWr5JBUFgFa/eZ3KbtcIt6wbOHHI+CawWJMlBcX8OatCXLpqPYxjuv Rp88MYJlmfnggXK6hLtxHXMaxrx33nqQwwwYFwlG2mg0b40toQHQa306SLwxLYJy+yYUTu 1LgdI4ApdVh5z6SXHOasPCPkYl6lBpclMzs/2raZYwl/BK249604vtL2ZPd0gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686147982; 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; bh=Av+TtQOG5dvXzDuBcty1OtxJUAYAJKGTNAMvd9lY/1E=; b=mnNcaDnA1otCySaHspPUn8JVj7fNKdxGJaDp51vpRFxphOQw/yDxt56soRTPJM11/7F+SY q+aKP3jSQivowZC5ZnMBcY0cZOVCT25cmKVqnIDXzJH927eWADdMJDjrKo9LJj25dLQGhk J1Nw0peRZvvyC93Fgz0xYRZU+VGbPoUMzHIKlNsx+GRGMoIcyYTGqrWCEwlGB/gpbFeKIU EWXXHSvOnloYo61Wi0rNfolYpXV28QzBobEllrksQnAc5Db7TMQr+orY/GxK1Hkmx8zi/P WATacbcV9Yb+45/6bDl1PQtE9nhv27tfFTg+nBArkcZoUHfXLkDah+L/MRnjFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686147982; a=rsa-sha256; cv=none; b=E8oUGMmqDOSnF+CKrTmdgz6a1neqykdB+m1cJyaoCxVexdg1QgkBiksdyheigs0r7VvMX4 ighlU/vB2DUnhYOlSbf/zOCiemK8g12CbUmQFn63UBDUoCBYNr1XTgPUtrmcya1Y7/s89j 5XDO/YdlDpP9U1hVWGDLaplpbyuIO3iJRF2omv1821oXnFKIs9RtACL8YpgjOSPdBIxN1b YmY4FXq6ATirJa+6eEckDIxHP/bJVXpRcY3ZzSz+srxOwqECd7aYT22mP88Ipfl7wVlDQe 5WOBeT4KhzlgvP8Gx0gNczNlOt6+pYgrIBYnBPqjXICEPu+7DfctM0Wg8qGcEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbqQk5MYNzFW4; Wed, 7 Jun 2023 14:26:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 357EQMBP076405; Wed, 7 Jun 2023 14:26:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 357EQMJx076404; Wed, 7 Jun 2023 14:26:22 GMT (envelope-from git) Date: Wed, 7 Jun 2023 14:26:22 GMT Message-Id: <202306071426.357EQMJx076404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 7a706aad8349 - main - hwpmc: Update manpage date 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a706aad83494fe702c0c97fd85b3b3285ce54a2 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7a706aad83494fe702c0c97fd85b3b3285ce54a2 commit 7a706aad83494fe702c0c97fd85b3b3285ce54a2 Author: Jessica Clarke AuthorDate: 2023-05-31 00:17:52 +0000 Commit: Jessica Clarke CommitDate: 2023-06-07 14:24:29 +0000 hwpmc: Update manpage date Fixes: 8e63e787abbd ("pmc: Initialise and check the pm_flags field for CONFIGURELOG") --- share/man/man4/hwpmc.4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/hwpmc.4 b/share/man/man4/hwpmc.4 index 4500e168b021..05fecf816a10 100644 --- a/share/man/man4/hwpmc.4 +++ b/share/man/man4/hwpmc.4 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 3, 2021 +.Dd May 31, 2023 .Dt HWPMC 4 .Os .Sh NAME From nobody Wed Jun 7 14:26:23 2023 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 4QbqQm1BNDz4ZrrR; Wed, 7 Jun 2023 14:26:24 +0000 (UTC) (envelope-from git@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 4QbqQm0DVtz4MM1; Wed, 7 Jun 2023 14:26:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686147984; 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; bh=qCrFP2a1aqH8A/twGJ3BgQm2RcZe+zZIcAStV/ZOIgs=; b=tXTjAomd04G50cYYJdKeOUTmus5TvV1Ws8J2y2XeiNlnkIDe17zI2WBulleu5I24rUF//g t8E9y6kRHooqaExpepwhTYAevEu9aH/kHI0i/wgI+w4l5D8kakVA+4GWv3CadAhOSrVDrf fWFHEMA3lQxQAZ4NpD7FRf0kXw/9GdyFE704/YzCfNSWDLNjRVatNGV7bQljjgF6/jTry1 R+T2OtLxVkyiRq1X2jfpCh8+iXZtAJPjlepOp1huYwP8qqPFGBIcqblDIBmAh3IE8HphUc GmsQHr2tI7gAgdeEA76NFQGV4/vpMpGYNbRfvvLr7e52HNrghcotFSd+glqboA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686147984; 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; bh=qCrFP2a1aqH8A/twGJ3BgQm2RcZe+zZIcAStV/ZOIgs=; b=XIQ6kvE2wALIE0ueqfvKlfXdE38CbjkK0sofOPORVioLfWKWARoa9HquJIjRyRQ6bIZnXL mQnOBaOIt/6g2U4+Y6AXWX+3MiYF3hczKah7fH8U+yq1evoQ5EZ3TCSIvTgGxI7tXvww0N OFQufrcXLc5kPnv3zTl1PZboC1WzofASws3qt8/1cAk/YmneZoMND46C9YBHQ1ArX3bOAO S1JTLX+3SLlShHd6DTTQ9eVugmTEZHUBVMgTHak+TirFN/rRDEwjNETOcwhVGNl74MNkAk F31owhaiSWiTGlNDvH6yFyiV+ZENhzayIhnKYxIcjL63gRYqc/uyJpOX0/k4Zw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686147984; a=rsa-sha256; cv=none; b=ZyfTcoUaQiADQ0pb3eG+9EVCDXIPsVXPIfHwxuRxiihnsxr28lnEI6O7jNJUjfxNQtmRza 52HPsKiZgTFeWCLVGuDwvt0kr6gZltuewlWVBViD0Z5YvUl2m7Pxi5SltO3BW3w8h8knz9 FqM3uXKP/HKeR+Ea3/WfQBKJX9TrpPrpqLK7GNw2STv1xwjEy49q7sN8ieeE+drmAFgXGL A7DINSVcyiqeT2O3evyKQYOekDBVoOR1Z50pJfaneR4b5clP39kk8LTbpt0iz0OX5zmzmj 2R9EW53lH+wJ+HwWDvWaYKMDHrs/PeE5TiA/Qsj/MZ37pX5sERPgEBUcYHsNUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbqQl62ZNzFt4; Wed, 7 Jun 2023 14:26:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 357EQNuk076425; Wed, 7 Jun 2023 14:26:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 357EQNR8076424; Wed, 7 Jun 2023 14:26:23 GMT (envelope-from git) Date: Wed, 7 Jun 2023 14:26:23 GMT Message-Id: <202306071426.357EQNR8076424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 296a0987be59 - main - pmcstat: Update manpage date 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 296a0987be590e73784e4c313d28a61ff310f1a3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=296a0987be590e73784e4c313d28a61ff310f1a3 commit 296a0987be590e73784e4c313d28a61ff310f1a3 Author: Jessica Clarke AuthorDate: 2023-05-31 00:18:49 +0000 Commit: Jessica Clarke CommitDate: 2023-06-07 14:24:29 +0000 pmcstat: Update manpage date Fixes: 53d0b9e438bc ("pmc: Provide full path to modules from kernel linker") --- usr.sbin/pmcstat/pmcstat.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pmcstat/pmcstat.8 b/usr.sbin/pmcstat/pmcstat.8 index 8e0a077f5115..8835ae3c8c7a 100644 --- a/usr.sbin/pmcstat/pmcstat.8 +++ b/usr.sbin/pmcstat/pmcstat.8 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 24, 2023 +.Dd May 31, 2023 .Dt PMCSTAT 8 .Os .Sh NAME From nobody Wed Jun 7 14:26:24 2023 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 4QbqQn269Pz4ZrjD; Wed, 7 Jun 2023 14:26:25 +0000 (UTC) (envelope-from git@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 4QbqQn0kNdz4MH3; Wed, 7 Jun 2023 14:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686147985; 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; bh=Gy2veYEH4xLJbd1IfttNpO1qjtO+kWlZHYJZPJTSyhY=; b=XGayyQLWEuP5tkF4yy/WuGOd8sjvsy/N94P+jGqZp81EnVFJHbi/xlq4Zpfr6R0OrLVj+b PFaaE3zkuuERdf9OBgYF0UahY55or3aCvqn/QCDob/uFD7DAccbWwgq0t72+ZHN8l+ceUl +Vmzo/JF8MIG9blwDU+6BqviE5wCi9pmMqRJne1oTNtyguqI8pb+rPIR0Q2G9B4Hlneiuq VV+ocLuDs/WcQTFYH+kuMBHKwlD7hdT4kO6qKOVcDkHfJJN0UHQEY8abIKBEzYKIIOCrIQ GRoCGjM8RzVBsdzvVpHGqU7XmLTBIQK178Ivl78RrEL5povjJtfxDLasx+1jTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686147985; 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; bh=Gy2veYEH4xLJbd1IfttNpO1qjtO+kWlZHYJZPJTSyhY=; b=T4cRHDjjX9n3PGWbhJUw58IZRm9wqDrbPn3WfttoeG3u5QcFpI0s55bpB1lZY4j085Ye71 imA3XJeEpTGlu+iSiTPzF5ww0ETHmdn//6osxlPo5j+BfkOiX6RAAbgxGfxuJrIlu9MvGN DOPcXA1c+MTKPj41AfePh0C0IXVjJe1U4k0Lguwvh5cvwF+qUIcrupLjHin4WQvCi4vECG 3R8eRcmJ+HLFY0uOb+wL55cnhFAt4VfDMQpY9PJKtKsLq/XIt6HO5FoVYMpeUN9a+poqMc Hd2/6vnaIGk1BHQice8Ks5GY9rvRm9zd4qc8Njp7m1SsgBcjLC18QdVaO+cyAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686147985; a=rsa-sha256; cv=none; b=gaVwipVxesimLuK5gSfaEqEuM1TxryUD94acJvDkISY2Gd5SUe+cCxQXWygIoDLcSdIHSo InekuWuOfHG+qg+mj1Kr5yXWNWp1fXaiqL0ZCEU9XQjhVrRbckOr4oJ9Ta7UytADWsbZWB hx6GiDXqfNdHqp3auSDQ9FkMSOSUB4pbweGUDGizrssLZ7oQRmr86+uetbNfvJ8MluADfA 7zHCxGYC1RasF62zhcZ3tmVgigjYA3bhRrPR0yI5t547q5EAfgdhEDVQsR+8sbDsg24j5L 69XmoRQklGFXI8XPifPSa1vBNC7Tzdo23s44BqiB1Q+LR5jUL+NvKw31IRmVFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbqQm6r51zFW5; Wed, 7 Jun 2023 14:26:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 357EQOh6076446; Wed, 7 Jun 2023 14:26:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 357EQOgl076445; Wed, 7 Jun 2023 14:26:24 GMT (envelope-from git) Date: Wed, 7 Jun 2023 14:26:24 GMT Message-Id: <202306071426.357EQOgl076445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 21f7397a61f7 - main - libpmc: Handle PMCALLOCATE log with PMC code on PMU event system 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21f7397a61f7bff61a1221cc6340cd980a922540 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=21f7397a61f7bff61a1221cc6340cd980a922540 commit 21f7397a61f7bff61a1221cc6340cd980a922540 Author: Jessica Clarke AuthorDate: 2023-06-07 14:21:18 +0000 Commit: Jessica Clarke CommitDate: 2023-06-07 14:24:29 +0000 libpmc: Handle PMCALLOCATE log with PMC code on PMU event system On an arm64 system that reports as a Cortex A72 r0p3, running pmcstat -P CPU_CYCLES command works, but pmcstat -P cpu-cycles command does not. This is because the former uses the PMU event from the JSON source, resulting in pl_event in the log event being a small index (here, 5) into the generated events table, whilst the latter does not match any of the JSON events and falls back on PMC's own tables, mapping it to the PMC event 0x14111, i.e. PMC_EV_ARMV8_EVENT_11H. Then, when libpmc gets the PMCALLOCATE event, it tries to use the event as an index into the JSON-derived table, but doing so only makes sense for the former, whilst for the latter it will go way out of bounds and either read junk (which may trigger the != NULL assertion) or segfault. As far as I can tell we don't have anything lying around to tell us which of the two cases we're in, but we can exploit the fact that the first 0x1000 PMC event codes are reserved, and that none of our PMU events tables reach that number of entries yet. PR: 268857 Reviewed by: mhorne MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D39592 --- lib/libpmc/libpmc.c | 9 ++++++++- lib/libpmc/pmclog.c | 27 +++++++++++++++++++++------ 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/lib/libpmc/libpmc.c b/lib/libpmc/libpmc.c index 57b9c90de256..003d9615a44a 100644 --- a/lib/libpmc/libpmc.c +++ b/lib/libpmc/libpmc.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1084,8 +1085,14 @@ pmc_allocate(const char *ctrspec, enum pmc_mode mode, r = spec_copy = strdup(ctrspec); ctrname = strsep(&r, ","); if (pmc_pmu_enabled()) { - if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) + if (pmc_pmu_pmcallocate(ctrname, &pmc_config) == 0) { + /* + * XXX: pmclog_get_event exploits this to disambiguate + * PMU from PMC event codes in PMCALLOCATE events. + */ + assert(pmc_config.pm_ev < PMC_EVENT_FIRST); goto found; + } /* Otherwise, reset any changes */ pmc_config.pm_ev = 0; diff --git a/lib/libpmc/pmclog.c b/lib/libpmc/pmclog.c index 0db91cf51bc2..92bcb1c2b161 100644 --- a/lib/libpmc/pmclog.c +++ b/lib/libpmc/pmclog.c @@ -356,12 +356,27 @@ pmclog_get_event(void *cookie, char **data, ssize_t *len, PMCLOG_READ32(le,ev->pl_u.pl_a.pl_flags); PMCLOG_READ32(le,noop); PMCLOG_READ64(le,ev->pl_u.pl_a.pl_rate); - ev->pl_u.pl_a.pl_evname = pmc_pmu_event_get_by_idx(ps->ps_cpuid, ev->pl_u.pl_a.pl_event); - if (ev->pl_u.pl_a.pl_evname != NULL) - break; - else if ((ev->pl_u.pl_a.pl_evname = - _pmc_name_of_event(ev->pl_u.pl_a.pl_event, ps->ps_arch)) - == NULL) { + + /* + * Could be either a PMC event code or a PMU event index; + * assume that their encodings don't overlap (i.e. no PMU event + * table is more than 0x1000 entries) to distinguish them here. + * Otherwise pmc_pmu_event_get_by_idx will go out of bounds if + * given a PMC event code when it knows about that CPU. + * + * XXX: Ideally we'd have user flags to give us that context. + */ + if (ev->pl_u.pl_a.pl_event < PMC_EVENT_FIRST) + ev->pl_u.pl_a.pl_evname = + pmc_pmu_event_get_by_idx(ps->ps_cpuid, + ev->pl_u.pl_a.pl_event); + else if (ev->pl_u.pl_a.pl_event <= PMC_EVENT_LAST) + ev->pl_u.pl_a.pl_evname = + _pmc_name_of_event(ev->pl_u.pl_a.pl_event, + ps->ps_arch); + else + ev->pl_u.pl_a.pl_evname = NULL; + if (ev->pl_u.pl_a.pl_evname == NULL) { printf("unknown event\n"); goto error; } From nobody Wed Jun 7 18:01:29 2023 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 4QbwC00cM8z4blHn; Wed, 7 Jun 2023 18:01:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 4QbwC009yGz3lnb; Wed, 7 Jun 2023 18:01:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686160892; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WXxDXi9aNideDTkIqFEEYLXoOhjJ4UhVw9rZhinR2FA=; b=QScCyqTUl3bXxekocmGwyQxnRw068bRy4Gu/4DAOtJyRPvysJyBC18FaffUuCGlhRm9amA cMBPQ9y5fzIGE6h5ZBQQWcC9aHRpPeYNxr2aM7O7l95tcjhbTkfGy+Eyj4tYqhueJi74Ab 0nVmuGOaNsrVH6P0kipweOzx5ZqRqlIuXDoZXuvb7aI5dqnlRQqPh/T65I+8iDo2HWM3HL 1to9/b8UW3E+fJ3HZ5/sBxoqVZL5AkalLCIuovdpp7S3QG3zEep9Emyqu8qG9eGoKPmmSd 5vqlgiXB9kVi6lsR9+cXEwPjV0hDTl5bUP1Z45uuOLanaUGLk0Rq1L4O2Dl5Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686160892; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WXxDXi9aNideDTkIqFEEYLXoOhjJ4UhVw9rZhinR2FA=; b=uqhpE3ERvJhyqfSEt9yNiVxEBzRJA5ldn+OL+QNS769K8w7qowTlq2Udk/ZE8nDajD3ime oBFYqOLVV/pSK5YDvhY6gECbOVU4zbi3X/OWjGKdj/AaXvXSEPPxHL2w/V2WOOTkJhUSxL W0knjD6oP3eFJUnk8hi7etx3K9qtXCV68CwRQs0ihD88Uf2d+plYZbSoQlIGLA0NDJrk/C dkGHPwv64JohFKx3Fr/qmEmrj87MlU8sGv8m74+7vL8ly+QVK3N2tHrHCF5c9fTiyk2H0X R7kWBl4+r7gH3jl8Ov2qxOYcHPxvYCcXPetyHiLOBrFPQkEK3C9peERaFvNn+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686160892; a=rsa-sha256; cv=none; b=jUig+nK+QTufNGhfy3ER5qKeN/0sd2mYCriLCngixGyMbDAEvFQrPNs0Yw4UO5nTaXGBcB 0u3oAeSt386SU0lmKJe2a2Y/wS202nAamt+23viSK2SGfXbfWdMjIoJCxljf/GC5L60LmU 7rerUsV//p4La9Z78Ocf6GMwp0NXzCUrXFA+Rv7FEtgpZSILfBjBEo/ZjjZUeBU2fMWf7C Ole+rUo8isJSCt5EJaJv4tlq+zGhT18VfUC5dXMHnXJqyqY5RwtdYnNzYt6Cu04ckWYnOQ Nj+HFc3fn5whoIOJUQaReq+5o9ZC5wPCDF8y3nWOSkgkEtpuPKW9U8qaKu2p6Q== Received: from [IPV6:2601:648:8680:16b0:240e:dd1a:5053:4aca] (unknown [IPv6:2601:648:8680:16b0:240e:dd1a:5053:4aca]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QbwBz25ktzM2n; Wed, 7 Jun 2023 18:01:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <59a6e27d-4844-204a-215a-28ccec683f6d@FreeBSD.org> Date: Wed, 7 Jun 2023 11:01:29 -0700 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: git: 1b0d96f3c43a - main - xregs_sig: Finish renaming simd to xregs before adding avx Content-Language: en-US To: Dmitry Chagin , Alexey Dokuchaev Cc: Jessica Clarke , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202306031713.353HDY7D036200@gitrepo.freebsd.org> <3F83B6B8-7A16-488B-9594-50A7426931F5@freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ThisMailContainsUnwantedMimeParts: N On 6/7/23 1:35 AM, Dmitry Chagin wrote: > On Wed, Jun 07, 2023 at 01:52:10AM +0000, Alexey Dokuchaev wrote: >> On Sat, Jun 03, 2023 at 10:29:12PM +0300, Dmitry Chagin wrote: >>> On Sat, Jun 03, 2023 at 07:57:03PM +0100, Jessica Clarke wrote: >>>> ... >>>> But the AArch64 registers are called x0 through x30. They are x >>>> registers. So calling the SIMD registers X registers is both incorrect >>>> and highly confusing. It is not general, it is specific to x86's notion >>>> of SIMD. >>> >>> Naming is hard (c) especially for non-native :), >>> I just need an avx registers test to fix golang issues in the Linuxulator. >>> Feel free to join D40410, D40384, propose you naming variant, may be >>> x->ext or ngprs >> >> What was wrong with SIMD (simd)? > > Strictly speaking test is about the fact that signal context properly > saves/restores machine context including gprs, simd registers, on x86 > xsave area including many things, whch can be added later For example, PKRU on x86 is a non-simd register that this test could be verifying. -- John Baldwin From nobody Wed Jun 7 18:04:19 2023 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 4QbwGD0VQxz4blhl; Wed, 7 Jun 2023 18:04:20 +0000 (UTC) (envelope-from git@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 4QbwGC75Zfz3lt2; Wed, 7 Jun 2023 18:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686161060; 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; bh=NIUyvlyA1oUJxvg9hAwK/CWn1Xu7TT9FszuNzEGZm10=; b=aRVB4Zm46tj99DWnndJpYJkLLrECkmW0JEQ0djkGaksoLPa8tM34ob+byBw10b7vyluU6z FTDKn2wWqkMgum3AuDv7RS7Vu2LEiMuz2F3hQPS9qtdiDh+NcwwzdUdvO00wlTm4SWd2bJ 2RtOH5YNgi6+KuTaqqo46tOLYp6myivJkxDcBzoEjHlk7lCiialkPXs76pSzbeyQrYXFm3 F7olF2R4L087rqyCcDPf6ZXqQvMyEbGn4GWFJ2A6FHg8Eqz1b/4H//plC6x5TIpkft40PH t+WeQ9YFN99IA0H3tGoaOPssmvoNQhssBkVxqU0Kv3wUkhfAfrqCh0LEVpYG/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686161060; 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; bh=NIUyvlyA1oUJxvg9hAwK/CWn1Xu7TT9FszuNzEGZm10=; b=dwRTxnz/z0RMog3627nCFxpwT0AJ5evO4mRrm7drRAckyye0IvMqwsFw4FUq0gXV5EzWty 7q6rCI4SRJn+7OeMqC6St7NcOB7+u/nu4kC0cYWvzF5MrNi1Xwviv2L4vd2WY9UDKqFSgn kL1NsTekUyrooOP0ZeZnQ/1homzaJbrH5ZOKGveXwabJ6PbndipbHiBvN/G4XHsRpSRA5a WXO+Nv/fAh0eEj+T+ACuGX8cdXZzC/rMeHLDhQT0j6r5IAUlbI6ygqkSNzu39JfKKxrnuZ uznuNmeU++BOWOb+N3OuPKIRMl4B9GOmyuSVNTJZ/bUbv0wkj2HNn+b6slmwsA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686161060; a=rsa-sha256; cv=none; b=AOMuVPW0Nhv0dDXfTxOwh5MBalCvt5BxTgFH/yR5G/m0v5wC63I4FgXwNufJUlNSAwJpl3 3hvsZjvRJsHinySwne/DcTZ9OfHPLDlXREIoFaQqX2as6HoJO+6sFsm7+BOsfEzk9pykkH NkSZcRQoSlhy3QPJReNOWNVkurJidStYW7EC+9qfl2et3jwrQUxOFe828WwJzTjv8IB5pi 92gtn2ZKoA73/FeNlE152dNzF+al6rJk7/nu+NxmVDATjn8XWyUpV08ZoXsXS8P/NFO4wr 3dPFMGiiGBaYYeCH/a70QsEKJvbWO6Sc39w6CEtUtbey/Wa2UjDgscaPnj5A1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QbwGC61DKzLrj; Wed, 7 Jun 2023 18:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 357I4J98038741; Wed, 7 Jun 2023 18:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 357I4Jg0038740; Wed, 7 Jun 2023 18:04:19 GMT (envelope-from git) Date: Wed, 7 Jun 2023 18:04:19 GMT Message-Id: <202306071804.357I4Jg0038740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: aee3611fecba - main - pmcstat: Tweak typo fix. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aee3611fecba4202c944803b43042ab701dac153 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aee3611fecba4202c944803b43042ab701dac153 commit aee3611fecba4202c944803b43042ab701dac153 Author: John Baldwin AuthorDate: 2023-06-07 18:03:02 +0000 Commit: John Baldwin CommitDate: 2023-06-07 18:03:02 +0000 pmcstat: Tweak typo fix. Reviewed by: imp --- usr.sbin/pmcstat/pmcstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c index decb2c5af953..634085a95335 100644 --- a/usr.sbin/pmcstat/pmcstat.c +++ b/usr.sbin/pmcstat/pmcstat.c @@ -96,7 +96,7 @@ __FBSDID("$FreeBSD$"); * * /Parent/ /Child/ * - * - Wait for children token. + * - Wait for child's token. * - Sends token. * - Awaits signal to start. * - Attaches PMCs to the child's pid From nobody Wed Jun 7 19:29:01 2023 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 4Qby7y1YBjz4Zm6l; Wed, 7 Jun 2023 19:29:02 +0000 (UTC) (envelope-from git@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 4Qby7y119bz3xGn; Wed, 7 Jun 2023 19:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686166142; 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; bh=dX0dh0I206s5FcKN+Hjmpyv5BZxRcAzdDtLQky6NY30=; b=TWXIFSmueVZLuKYm/TZsSqazyFNZFzq/H/fKgcRPNryh09Mp+g21yVNXYOW9rbU4u+3qkE MQLBk5ZzESkTNRuTP7l975YDsTXo6Wxb901B3CFWtolt5tlnsxcvAoNNTFtB4ZKUwdILKJ 9gRe29gvReUA8WXyZskN0lTLWfaksXIcz8UnuTzwJmGEQmCRlspBbdcDORCXmcoJvpP/Au YAsnKDEd6/0FJ9gS5GKYBPKq9/Ee3ZJS9KPnSBp9FezvRu8HiCxx/GZTq7nAo+EpnLIqUz G4/oh9JAujJb1T5JlJO1q4rVO13eHas3416V4axz9BDisGPs20g61D8BjzvreQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686166142; 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; bh=dX0dh0I206s5FcKN+Hjmpyv5BZxRcAzdDtLQky6NY30=; b=G0DRlNlDMlzq5j0YBBU3HQ8p1l3amu3o/bwuDlfhLDrQmjUNVWcL7P8FQtOANKNDmFG0DZ kxY2+AponWuez/AlX+bhQ0gQ2oMdeXzBAypCPRjw8cq9JzTSrdXL3VTter+ynB0m8rK7+g /AZrxJI3PKMVMNrCbVoEtIx4y2s9J7tQx/WUsP+hfoYRpim2fzYIt7cFyHMfwYvFg/97zb m/qEQviVX20AX7RVSq3pXUpeH87n698SdlXliPnygas8r25m8qCvVCTtTUdDkbQDo4uiMQ JBZgLsXEBYrajoEj0l+dqgWnEc9eMyV1BldkQhPY71BbonX3gEr0247m47QGrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686166142; a=rsa-sha256; cv=none; b=Mb3krnF9zZzSVRY7b1wdhe1z5nHQ4DZe4z38wQS1wxWXRTlCQ33NAaNZZJXz2RX1Ds6BB8 Lw7mpi8TPs5qkw49Xzj3tc3nvw1qvpQCcJFWBY9yjQaD8/JlLIECSynrEPSpmVc8OF/D7F HbuTvriMIvSO9C9ksaQAl1vuxngkU+WhW52rKqufP1JwcKJzvttrXe4AAvGVUYj05UmF0F Pzsf5xi0eLvoT+7A1rc8pMJN/tjdaWSFzqNnORcmSFPwWYrqn+9u7CasM/q6HJLbCsVd0c QWtOVAdSa3SKl+l4wbwtg/dx+/KCI94ZnMRYobvJt2Tsxa7y/0c39jyt27f7vA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qby7y055HzNl6; Wed, 7 Jun 2023 19:29:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 357JT1LA070239; Wed, 7 Jun 2023 19:29:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 357JT1fL070237; Wed, 7 Jun 2023 19:29:01 GMT (envelope-from git) Date: Wed, 7 Jun 2023 19:29:01 GMT Message-Id: <202306071929.357JT1fL070237@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 653738e895ba - main - ptrace: Clear TDB_BORN during PT_DETACH. 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 653738e895ba022be1179a95a85089e7bc66dbbe Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=653738e895ba022be1179a95a85089e7bc66dbbe commit 653738e895ba022be1179a95a85089e7bc66dbbe Author: John Baldwin AuthorDate: 2023-06-07 19:26:57 +0000 Commit: John Baldwin CommitDate: 2023-06-07 19:28:36 +0000 ptrace: Clear TDB_BORN during PT_DETACH. If a debugger detaches from a process that has a new thread that has not yet executed, the new thread will raise a SIGTRAP signal to report it's thread birth event even after the detach. With the debugger detached, this results in a SIGTRAP sent to the process and typically a core dump. Fix this by clearing TDB_BORN from any new threads during detach. Bump __FreeBSD_version for debuggers to notice when the fix is present. Reported by: GDB's testsuite Reviewed by: kib, markj (previous version) Differential Revision: https://reviews.freebsd.org/D39856 --- sys/kern/kern_fork.c | 2 +- sys/kern/sys_process.c | 2 +- sys/sys/param.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index f981747aaf70..944ecf494736 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -1144,7 +1144,7 @@ fork_return(struct thread *td, struct trapframe *frame) td->td_dbgflags &= ~TDB_STOPATFORK; } PROC_UNLOCK(p); - } else if (p->p_flag & P_TRACED || td->td_dbgflags & TDB_BORN) { + } else if (p->p_flag & P_TRACED) { /* * This is the start of a new thread in a traced * process. Report a system call exit event. diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 47fdf91b87d5..41434da783c8 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1288,7 +1288,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) SIGSTOP); } td3->td_dbgflags &= ~(TDB_XSIG | TDB_FSTP | - TDB_SUSPEND); + TDB_SUSPEND | TDB_BORN); } if ((p->p_flag2 & P2_PTRACE_FSTP) != 0) { diff --git a/sys/sys/param.h b/sys/sys/param.h index 5bdc3e2ebee4..d3577411e998 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -76,7 +76,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1400089 +#define __FreeBSD_version 1400090 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Thu Jun 8 01:06:18 2023 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 4Qc5d62J6yz4c0h2; Thu, 8 Jun 2023 01:06:18 +0000 (UTC) (envelope-from git@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 4Qc5d61gnTz3kYq; Thu, 8 Jun 2023 01:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686186378; 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; bh=VlL03gOBO/p7CbqznPitxHlGFQ9SRS6cH99fwqpTf7s=; b=fQ4mB+EwYI1c84x68R2gi7C7TwT2k8tQ3RmN0jHz6yRUtbMMNF0NqOBYcrDbaLnPIEWdTT BTTvn5ezo6SrctBde4xL44puwsZTJ0cvW1JHqZH3nTfP8BRS7iL9M3faYDHuIRhLtBh2vT 8oEd759PkoQXlNaUHyxL/uFFVGDnl6p3Bzj3RiNMR08Z+N/fDTbYhsqBPyayCW/VbSSkP4 g6CvYDjZaRjEkZ7CwP/sGa62CaWjHCz4rrkIKuJGuGo14JO7ZdONHD4L2xKo6WqGQH6w+T TJ7VQgaZny/tGP1gxz+PJSYtsgIgPp+xUstBu+t6DLVqHtZmZw2cyAY2NuN1LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686186378; 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; bh=VlL03gOBO/p7CbqznPitxHlGFQ9SRS6cH99fwqpTf7s=; b=ELVEL4fRc6Vk+TM4ENA79UdaLVxo+EpJWae41M1zgNxtsRUp1bkyr2ngaenC+IB3924B4t 4U96IPyOxenS66nR4augQFz3gex4s4dBShx9LBiWLElEa48F0kHsEJguVESH9hpwi+F/0h ziU8INlrpOdZ0sqpDFpQyOqmaugimhY1tcbuGMLNvx4FIOfSpPKsxSh6aM0Re/57uDnVHS 0LTchcj+UH4eI9uoHwq0L2oE+Q+jqDNVIDnNyxUG+O6x9CTvpPGOu2ySVTJrcgv7T17NNa +wZZZJMMqxV8edG5bNWlZihEemhF9/2MrxA1gNMo8R1/sNsuhXr9M2Op74/PPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686186378; a=rsa-sha256; cv=none; b=TCOO4jfLxCD38Nf9fb2nBVhFoD6tvg6HLUuK3DVx4ci68SzU2U7hjhe8qo2jtIUwCBmCLM CKQCj1x9B7ZgmjYbm4lYeeN/SyCxXEeRrUpcyhdcRyKtTbErknPk4umgKNrRf870GSAN5U 0RHUVLIcSFjg3S/jGFF6KMI9M+1jzLiEcke1oujax880QenkRASJsAI9K1wQh1lU5cXAUC qvATTOqBu5hD/ufCAX5KIOTp26EoFw7uwmsA9sV7B8o2PT/spt06Co7LNWnO9FgT8XHHde 6b5MPkxLHz2pnIoJ1Fr9Zh2RqAINV3C6NxsuweTTaUFWiqvnGEMlR7kkSRe9kQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qc5d60kf4zZ3h; Thu, 8 Jun 2023 01:06:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35816IUt030757; Thu, 8 Jun 2023 01:06:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35816I1F030756; Thu, 8 Jun 2023 01:06:18 GMT (envelope-from git) Date: Thu, 8 Jun 2023 01:06:18 GMT Message-Id: <202306080106.35816I1F030756@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 1232c7884d4a - main - od(1): Fix skip value handling 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1232c7884d4a9bc69d4dd71cd293f92bb1ae6197 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=1232c7884d4a9bc69d4dd71cd293f92bb1ae6197 commit 1232c7884d4a9bc69d4dd71cd293f92bb1ae6197 Author: Xin LI AuthorDate: 2023-06-08 01:06:07 +0000 Commit: Xin LI CommitDate: 2023-06-08 01:06:07 +0000 od(1): Fix skip value handling POSIX defines -j as the number of bytes that od(1) should skip over the concatenated input files. The existing code tries to implement this behavior by checking if the current address was smaller than the skip value. However, this is not correct, because we adjust both the skip value and the address at the same time when we do fseeko (when file is seekable) or getchar (when file is not seekable). This commit fixes the problem by expecting the skip value to be zero upon return of next(). If the condition is not satisfied, a diagnostic message will be issued. Reported-by: Mohamed Akram Reviewed-by: emaste PR: 271832 MFC-after: 2 weeks Differential Revision: https://reviews.freebsd.org/D40446 --- usr.bin/hexdump/display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index cad548e1ec41..36306ededfc6 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -263,7 +263,7 @@ get(void) * block and set the end flag. */ if (!length || (ateof && !next((char **)NULL))) { - if (odmode && address < skip) + if (odmode && skip > 0) errx(1, "cannot skip past end of input"); if (need == blocksize) return((u_char *)NULL); From nobody Thu Jun 8 01:59:22 2023 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 4Qc6pL71TDz4ZfVk; Thu, 8 Jun 2023 01:59:22 +0000 (UTC) (envelope-from git@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 4Qc6pL6LRqz3qF0; Thu, 8 Jun 2023 01:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686189562; 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; bh=mH+NjnC35uROMCHVY2nhoLNB+W63PDxEXckImepI2Qg=; b=pu+GgnwMvtjl0I6ulWGnxwSWBdpLB3pp48C9c02Gyz3vya9qeEtICGzz6inty+uj489pWX SizVxQeKdSGk8PPdX2EU1Hnxt6l+gCaFs0jtAsF6zrN+iJzrdwdtx4j1b9ofG+zp1UZkfk RYhQo5oy8oUCfnLUeXaQZwYWy6+me2ajMOEaHXEGaAAEtiqTDcfhPt8iyDLNvrz+7E89nB xKB9NUF22vs0Qb4voOldAFRYlm0CanaM2tGe3ph2iM/Dn0SEWsSwJ2KUKAoTKZruSNoI01 EXN1AUahEi+vCx7mkI5es9VIulfLgRZz8c1/0yXDhAHkKWgsxF/QG/wDy1irqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686189562; 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; bh=mH+NjnC35uROMCHVY2nhoLNB+W63PDxEXckImepI2Qg=; b=h1Wd/rYxw9D+2i1iCGcWXcUkXVwi0w4wBnttNzrJ3uNiReF8mRpXpHbJ7aXXghVyGWBjD7 Z3bQX+5Fmx8b3ZgE6aYsQzdmh9G/F2TVKKTXLCDS5ckpbbgiENyJzUkh3avHvgE5UrC7d2 z2eoYeCUXOyuSVZHj/kcZzD7n3kkDkMLJ3S7mtLo1kPLoEcWzQJHD52dw16nap8FgQLW3D hWOvJ0jVuE7aNoUWMy4X0wcMidHgF/q0Mo6ZZujJTd5v2j+KIIXR3X4UlMU62taQJwxAja k1l3R03L6lIWPhXK6+WcM188qn+t6NcsbYNE8rUTJZvW2ogZM23sKdMm+bN2mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686189562; a=rsa-sha256; cv=none; b=ZHDZO4n2P74sLgZmEhuNFLJ0Fe2tbb4mZTJ4mLqzVgNgBK92sey5IolETLl/ZRIsM7siCo aEAjEoTnrEy/Fzr6gbe663HXSzMd6/LHQj4QmLqT7auQbGBl8WhRX5FEjUMumzOxzhpbqZ VsSPCq8rvSkL1pqCoqnA5sQnpIFkq/ENYXp0sLFUuEXuqoVWsyU8p89iVXmi67t6RaurIF dfNVOF1nVUWjfYqA0AG9T2bfES6wrLXdaqKeqcb8g/9vKLrv16MDeTFd1hkO7QVI8PC50M +K3Qc7DfnW3RTiX/42mEIbDkXPTQP5ITL/bAYNmkQmUTTLaIn72bYTTVTKYrqQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4Qc6pL566WzbJh; Thu, 8 Jun 2023 01:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3581xMCV012859; Thu, 8 Jun 2023 01:59:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3581xMYL012858; Thu, 8 Jun 2023 01:59:22 GMT (envelope-from git) Date: Thu, 8 Jun 2023 01:59:22 GMT Message-Id: <202306080159.3581xMYL012858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: 1cdec2832d05 - main - ndp: Prepare for pending tcpdump update 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1cdec2832d051ddcb1417f3f2601e6212aff2613 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=1cdec2832d051ddcb1417f3f2601e6212aff2613 commit 1cdec2832d051ddcb1417f3f2601e6212aff2613 Author: Joseph Mingrone AuthorDate: 2023-06-07 02:21:27 +0000 Commit: Joseph Mingrone CommitDate: 2023-06-08 01:57:20 +0000 ndp: Prepare for pending tcpdump update ndp makes use of gmt2local, however that library has been removed from tcpdump. Add utc_offset() as a substitute. Reviewed by: emaste, jhb, melifaro Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40445 --- usr.sbin/ndp/Makefile | 6 ++---- usr.sbin/ndp/ndp.c | 20 ++++++++++++++++++-- usr.sbin/ndp/ndp_netlink.c | 1 - 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ndp/Makefile b/usr.sbin/ndp/Makefile index 1722f4a5a2ef..f66c4ec846a8 100644 --- a/usr.sbin/ndp/Makefile +++ b/usr.sbin/ndp/Makefile @@ -15,15 +15,13 @@ .include -.PATH: ${SRCTOP}/contrib/tcpdump - PROG= ndp MAN= ndp.8 -SRCS= ndp.c gmt2local.c +SRCS= ndp.c LIBADD= xo -CFLAGS+= -I. -I${.CURDIR} -I${SRCTOP}/contrib/tcpdump +CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -D_U_="" .if ${MK_EXPERIMENTAL} != "no" diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 23e186466c22..112fd099e3e0 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -98,6 +98,7 @@ #include +#include #include #include #include @@ -107,11 +108,12 @@ #include #include #include +#include #include #include #include #include -#include "gmt2local.h" +#include #include "ndp.h" @@ -181,6 +183,20 @@ valid_type(int if_type) return (false); } +static int32_t +utc_offset(void) +{ + time_t t; + struct tm *tm; + + t = time(NULL); + tm = localtime(&t); + + assert(tm->tm_gmtoff > INT32_MIN && tm->tm_gmtoff < INT32_MAX); + + return (tm->tm_gmtoff); +} + int main(int argc, char **argv) { @@ -188,7 +204,7 @@ main(int argc, char **argv) char *arg = NULL; pid = getpid(); - thiszone = gmt2local(0); + thiszone = utc_offset(); argc = xo_parse_args(argc, argv); if (argc < 0) diff --git a/usr.sbin/ndp/ndp_netlink.c b/usr.sbin/ndp/ndp_netlink.c index a34359a4343f..ace3e5e5fa11 100644 --- a/usr.sbin/ndp/ndp_netlink.c +++ b/usr.sbin/ndp/ndp_netlink.c @@ -33,7 +33,6 @@ #include #include #include -#include "gmt2local.h" #include From nobody Thu Jun 8 04:23:41 2023 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 4QcB0s25LKz4bNcl; Thu, 8 Jun 2023 04:23:41 +0000 (UTC) (envelope-from git@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 4QcB0s1gPCz49Nl; Thu, 8 Jun 2023 04:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686198221; 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; bh=SgflMWeeafnrhTjH2UVagyNzfgyUjzS9Bnr6hNX6cUU=; b=jrC6+vQ4ve29whRXi3n4pjLacLivccE6zaDDRNth1NC5ERTvAyIBMGDISWgNdbUpZIPDrK eLRGvHEpSysaYSnNAz7DmQSEzIBamyNeP9JC+nBNc1aUp7yPTMlx86rPtO9rwB470SWGaR HZn1QZaNgVjO/jrzMd2Ei+uSjJ2MYU/ONpB1A77Kg6cBfZWHcynkPCSQ8GB73zc1J8JqZQ CGZdYH06y3Pmc5AZA5VmAhNysKRehjhvX4K/pnsQ1P6/9pDEQQDbyZFXbeQiCrAFlKOVwm cAg/3tg8gK5ApjzleHaQcXHIzF34am1cpPUVN0q3kzoDmqx7tMuUAt+Wscc/fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686198221; 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; bh=SgflMWeeafnrhTjH2UVagyNzfgyUjzS9Bnr6hNX6cUU=; b=iV2dt1ObRn07KyepUAMMYVAhQVPaWNm/3o9nGbFWbiNjgVo24g2g4ICJtSFwqhyojZ0LPs Hvf248csIKDjgxVuJQ0E13u63HW/h2USuuEWoF1A2QPqLXsV7hstBuXb5cKqC1MzCrtm4K bKdkQrli0cAh/AYKVsnJq37BHfFyljzA1eXnkxFmJPVQvW5kK90Gw7ftxiVeFsJSZAuwGW pLU6HfTxpwcgUBQz2267lp4CtK99zzXxyf5tENsFkSrL905FXGM1r9IiTEJ7dUOikzaIxy hMbHixsEk/4BhVhuM0puztPKYfckTTWJc/oHJkmGMy3tjn4OfhW0PYvnyl7PwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686198221; a=rsa-sha256; cv=none; b=kASBL24wjpu4BA4kC2kEGD+t7LV6bFpjLi6zScaNHO7iAiIku5Ey+WjiCJIKtDzuBpujt9 ZQcjL3uuhGi9BHwtvC4smtO7Xb2H+3ye9djJrR4OioGuKdTeK+iIa+KHBcz2ACcsMoKEOp kyYqwapEJxVYFYR6EEBQENChAUzx4sCcY5dw4owPn5wKSPHuuUDhuBLbhqjyD4GSeD6fEp xHCfKr7g5XuqBoLbffDW9z7mv8oYSZO/PvcMWstSUnpnDYN4UwQdqLrELt6RvdAHo+22he ecvzBIiUf5jiSSavBOQWSRcEUblHEjFeeeiTSIG4kFZv+BzbYKlMNI/wV7gFRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcB0s0mGhzg7Z; Thu, 8 Jun 2023 04:23:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3584NfTx062124; Thu, 8 Jun 2023 04:23:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3584NflZ062123; Thu, 8 Jun 2023 04:23:41 GMT (envelope-from git) Date: Thu, 8 Jun 2023 04:23:41 GMT Message-Id: <202306080423.3584NflZ062123@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 267411d164d4 - main - EC2: Chase awscli package rename 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 267411d164d4d38a701599e3afe8d9e9261f65dd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=267411d164d4d38a701599e3afe8d9e9261f65dd commit 267411d164d4d38a701599e3afe8d9e9261f65dd Author: Colin Percival AuthorDate: 2023-06-08 04:22:25 +0000 Commit: Colin Percival CommitDate: 2023-06-08 04:23:26 +0000 EC2: Chase awscli package rename MFC after: 1 week --- release/tools/ec2.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf index 34b83fa627b6..eb14337f5703 100644 --- a/release/tools/ec2.conf +++ b/release/tools/ec2.conf @@ -63,7 +63,7 @@ vm_extra_pre_umount() { # The AWS CLI tools are generally useful, and small enough that they # will download quickly; but users will often override this setting # via EC2 user-data. - echo 'firstboot_pkgs_list="awscli"' >> ${DESTDIR}/etc/rc.conf + echo 'firstboot_pkgs_list="devel/py-awscli"' >> ${DESTDIR}/etc/rc.conf # Enable IPv6 on all interfaces, and spawn DHCPv6 via rtsold echo 'ipv6_activate_all_interfaces="YES"' >> ${DESTDIR}/etc/rc.conf From nobody Thu Jun 8 07:51:06 2023 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 4QcGcB2sJ4z4byjQ; Thu, 8 Jun 2023 07:51:06 +0000 (UTC) (envelope-from git@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 4QcGcB1xG1z3LPm; Thu, 8 Jun 2023 07:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686210666; 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; bh=6ZS5QTKdaIxcEeLhfX9b4LQUPwZpUmqYSkkUFTi89HU=; b=Z6+o69G9UajHAAXJLiZEyggf0nEuZh6SODp7nMolHnhrcu6yUiiLfTqA2XlfFHj0bAnhUm EO/lsIFs/OnQ7iP9FkbJ8QGb6dZ7BITqXJw3S9J0cIB00jlkgYkBZ69AgIraBUG+OaGib7 hLetI2BT1PnK1OrAyorwLqRp6qcAu0Vpd7hqQPQCpYY3BoYV8HpgfPV/lXCdape92JXQjx XeZgb4zKbV4HWmdU9ubQ8maUehtb4ZwHcwCHdVBLa6PXrFFMX6Cj3zkgxWEq2NT0Gkft+P zouBFYiLH0igLl9us26h71u7cIxFZL865tf5MHm7Gw5PUa5FnnTDcR8Ot5xQpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686210666; 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; bh=6ZS5QTKdaIxcEeLhfX9b4LQUPwZpUmqYSkkUFTi89HU=; b=EAgqLI1OisGT6DHUV/oSw6L+4qXTRVnsLZypBdU+nE8VdTZYay6UbMqT/PR7xwBJ4uo7+2 TB+saY7YXfSVUUsUcGDmb3jy45L4Uu+aDX0jtBtEK1ZA9nDIqDtpRYmXBxyPSM4zxG3izd wWHjXZVfq62X57eADTKvZOV+1T70714TFv6K/N3+1clVZE0GWtLqwYk9unBsOK01mCHwEm w/oiuIJOTEkAhPjt1Jzht/3c4/zFJrHspH0R96pNOGPoBquUvZMe7XJuY463FAONkETHsf QDiUAZLtPd+9le8SE2I89dUhqb4TFDYy+xkNfYb8CMbgXNpz87v/CQD6WqHkyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686210666; a=rsa-sha256; cv=none; b=hmrlbpwF18dRAVuJ6T/5hNL+LIIazQp81ja+J65ePRkkI/lw9ctW5gjMthj3NHuGtWSDsx 7ku/BN0NG6jT2ZAP+hGYVu7sogtAOxC5lGwwIHz9geQTvXlcSpwwxTNxa80zhTHiMqQ4hB w2S28RNY+1pL5qNQRXXI6jqeJpQIh8x3WxgbfnJnd1W5fFUY1V7D9aacx5EW5NHzOIKND5 f5bKcodg9SAj34KhxfvToWnlmxojI+s3jBSXdxeoWUtjcC5qWdP8lAo/+th6iR8Uvx8sdJ LzDw3HgKpiFcNn0BbR8ehUAea7fb41aJst+LyE/AVcHAirfgJcEw2pZwvvJtbg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcGcB1135zls1; Thu, 8 Jun 2023 07:51:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3587p6QB002455; Thu, 8 Jun 2023 07:51:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3587p6xe002454; Thu, 8 Jun 2023 07:51:06 GMT (envelope-from git) Date: Thu, 8 Jun 2023 07:51:06 GMT Message-Id: <202306080751.3587p6xe002454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 6b7a06c3bdbc - main - stress2: Avoid using "__unused" 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b7a06c3bdbc17bc5ac450023bd0baadfaeefa78 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7a06c3bdbc17bc5ac450023bd0baadfaeefa78 commit 6b7a06c3bdbc17bc5ac450023bd0baadfaeefa78 Author: Peter Holm AuthorDate: 2023-06-08 07:49:52 +0000 Commit: Peter Holm CommitDate: 2023-06-08 07:49:52 +0000 stress2: Avoid using "__unused" --- tools/test/stress2/misc/reaper2.sh | 8 ++++---- tools/test/stress2/misc/reaper3.sh | 11 +++++------ tools/test/stress2/misc/reaper4.sh | 11 +++++------ 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/tools/test/stress2/misc/reaper2.sh b/tools/test/stress2/misc/reaper2.sh index 1643e9985240..ee9cf927f1d9 100755 --- a/tools/test/stress2/misc/reaper2.sh +++ b/tools/test/stress2/misc/reaper2.sh @@ -65,8 +65,9 @@ test(void) { struct procctl_reaper_kill killemall; pid_t pid; time_t start; - int data[20], e, n __unused, m; + int data[20], debug, e, n, m; + debug = 0; /* set to 1 for debug output */ n = m = 0; if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1) err(EXIT_FAILURE, "Fail to acquire the reaper"); @@ -94,9 +95,8 @@ test(void) { if (waitpid(pid, NULL, 0) != pid) err(1, "waitpid()"); } -#if defined(DEBUG) - fprintf(stderr, "n = %d out of %d\n", n, m); -#endif + if (debug == 1) + fprintf(stderr, "n = %d out of %d\n", n, m); _exit(0); } diff --git a/tools/test/stress2/misc/reaper3.sh b/tools/test/stress2/misc/reaper3.sh index 90bb395da5c1..59012d2c45ca 100755 --- a/tools/test/stress2/misc/reaper3.sh +++ b/tools/test/stress2/misc/reaper3.sh @@ -59,14 +59,13 @@ flip(void *ap, size_t len) { unsigned char *cp; int byte; - unsigned char bit, buf, mask, old __unused; + unsigned char bit, buf, mask; cp = (unsigned char *)ap; byte = random_long(0, len); bit = random_long(0,7); mask = ~(1 << bit); buf = cp[byte]; - old = cp[byte]; buf = (buf & mask) | (~buf & ~mask); cp[byte] = buf; } @@ -86,8 +85,9 @@ test(void) { struct procctl_reaper_kill killemall; pid_t pid; time_t start; - int data[20], e, n __unused, m; + int data[20], debug, e, n, m; + debug = 0; /* set to 1 for debug output */ n = m = 0; if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1) err(EXIT_FAILURE, "Fail to acquire the reaper"); @@ -118,9 +118,8 @@ test(void) { if (waitpid(pid, NULL, 0) != pid) err(1, "waitpid()"); } -#if defined(DEBUG) - fprintf(stderr, "n = %d out of %d\n", n, m); -#endif + if (debug == 1) + fprintf(stderr, "n = %d out of %d\n", n, m); _exit(0); } diff --git a/tools/test/stress2/misc/reaper4.sh b/tools/test/stress2/misc/reaper4.sh index bd30bd1b0efd..0fdb3f75ccff 100755 --- a/tools/test/stress2/misc/reaper4.sh +++ b/tools/test/stress2/misc/reaper4.sh @@ -59,14 +59,13 @@ flip(void *ap, size_t len) { unsigned char *cp; int byte; - unsigned char bit, buf, mask, old __unused; + unsigned char bit, buf, mask; cp = (unsigned char *)ap; byte = random_long(0, len); bit = random_long(0,7); mask = ~(1 << bit); buf = cp[byte]; - old = cp[byte]; buf = (buf & mask) | (~buf & ~mask); cp[byte] = buf; } @@ -85,8 +84,9 @@ test(void) { struct procctl_reaper_kill killemall; pid_t pid; time_t start; - int data[20], e, n __unused, m; + int data[20], debug, e, n, m; + debug = 0; /* set to 1 for debug output */ n = m = 0; if (procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL) == -1) err(EXIT_FAILURE, "Fail to acquire the reaper"); @@ -117,9 +117,8 @@ test(void) { if (waitpid(pid, NULL, 0) != pid) err(1, "waitpid()"); } -#if defined(DEBUG) - fprintf(stderr, "n = %d out of %d\n", n, m); -#endif + if (debug == 1) + fprintf(stderr, "n = %d out of %d\n", n, m); _exit(0); } From nobody Thu Jun 8 14:43:09 2023 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 4QcRlf1VRfz4bpJ6; Thu, 8 Jun 2023 14:43:10 +0000 (UTC) (envelope-from git@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 4QcRlf0rTBz4Rsx; Thu, 8 Jun 2023 14:43:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686235390; 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; bh=+herRStdZZABhMoDVmHBZlnqnS31sE51D7tzuRWzlGI=; b=Mc7gwxpYD9yh74RWj5wMglj5AYIPBr+VNX1HdLQWpZfimkvzUT8TcY2RaW1Baz2g3Td4va J3880PW1O7z5TwluJJn6rZltzX79XH5cD0M3KGKzzz6v9wriY/uWNxxNBicmflLE4SQaRW T3VbLW7EnW8iqvDPvgOdKcfAM9Ctr8BFNqasZD9g/+G1stlI0sXvXselP/EX8J/dVyI5Ol P+w0iAXEdIOFsGW4ShPYsp3e+dLvMgQfAiCEWIxEjJITLglRcumO+Du/9Hxp8EV2svXrLD hdCCMTuB4Q0FpjpHeRSiCkI5zRFLaXIcqYdHFhkXEFwpKsKxZKzJ8L7h7wruCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686235390; 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; bh=+herRStdZZABhMoDVmHBZlnqnS31sE51D7tzuRWzlGI=; b=p0hg1YlF1Qd7/CSiMZ/PrKWsJnhJz5tWc/t/sWV5grKQRTZ7sa7Mv5nXJt2GIedHq3zAM4 SkTChyPlaIjtrBzhUwClzNFg5WVl7oft//y4XNsIADl5mUVz0VwyvKtloQjvozRHa2+hvT zpZty1sluri7gVxnvmlCms5Ii0VH1e8TYxxJccCv0eJHAYr3qW/WxMeTxdEJmR9nOlD0Nw Q9qKb5NBJJo/0kcKUZaZzwaAI0+7l6fqqKNjuRUSNhoy+Zw2vSfoJ31eHIFpT50hLoM4g0 qs9PCkmSFz/vErrkmdSm2J5UkqnmhkFSC0Yai9DJkojT+e8ASpN1uUTZ7Afyjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686235390; a=rsa-sha256; cv=none; b=F5abDEc6L3klxsOg4xiMrLwJPEsL2QG5yisIzN+7AYyb7WJ6YhlqhY+9pLEQMQjz96rhpO Ty+DCB7CKfjF8cefmyZy/RRMmxVffJ7z8xCZaQTESPpy+AlnIDtvBUrobQ8iWcgT99cEJP e6TmoVLK2KgT0hTjggAgou/ljnOHTBRgnaQHTlxDWOg+GsbNaUvZjy9ZNfcGgN59YhGPBR 2CXgKLDDIuO66dWfIAcGbU8Le1MKwtbjysTyjhLXdXEXQ87dfeyEdcFrrFcOf5w8UqkXFN 4jjrF3+BXX99GhPoCoIeS/Xot3PVxTyu5ig5C1srFCGZJKkwnwgY7Te9SRGf1g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcRld712bzy9F; Thu, 8 Jun 2023 14:43:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358Eh9RL083304; Thu, 8 Jun 2023 14:43:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358Eh9p0083301; Thu, 8 Jun 2023 14:43:09 GMT (envelope-from git) Date: Thu, 8 Jun 2023 14:43:09 GMT Message-Id: <202306081443.358Eh9p0083301@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: b17b639832e7 - main - contrib/spleen: update to Spleen 2.0.0 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b17b639832e707aab0e9514cf94727498e2d67bd Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b17b639832e707aab0e9514cf94727498e2d67bd commit b17b639832e707aab0e9514cf94727498e2d67bd Merge: 6b7a06c3bdbc 533de2d7a987 Author: Ed Maste AuthorDate: 2023-06-08 14:38:41 +0000 Commit: Ed Maste CommitDate: 2023-06-08 14:42:25 +0000 contrib/spleen: update to Spleen 2.0.0 Merge commit '533de2d7a9875ff652be477a3f6c817d66a3d3d9' Submitted by: Frederic Cambus Differential Revision: https://reviews.freebsd.org/D40378 contrib/spleen/ChangeLog | 13 + contrib/spleen/README.md | 37 +- contrib/spleen/spleen-12x24.bdf | 4 +- contrib/spleen/spleen-16x32.bdf | 8166 ++++++--- contrib/spleen/spleen-32x64.bdf | 36456 ++++++++++++++++++++++---------------- contrib/spleen/spleen-5x8.bdf | 4 +- contrib/spleen/spleen-6x12.bdf | 4 +- contrib/spleen/spleen-8x16.bdf | 1277 +- 8 files changed, 27933 insertions(+), 18028 deletions(-) diff --cc contrib/spleen/README.md index 629a13711038,000000000000..ce2e6addc305 mode 100644,000000..100644 --- a/contrib/spleen/README.md +++ b/contrib/spleen/README.md @@@ -1,236 -1,0 +1,257 @@@ +``` + + :::::::::::::::::::: + ::: ::: + _____ _______ __. ________ ________ ________. ::: + _) _//__ __/ __ / |.\ __ /.\ __ /.\ _. | ::: + .\____ /.\ )/ / || )/ | )/ | \| | ::: + | )/ | __/| \ _____| _____| | |_ ::: + |____ |_____| |_____/____\\ |____\\ | |____/ ::: + - -- -- \_____| -H7--------------------------- `----' ----- ::: - - + ::: ::: + :::::::::::::::::::: + +``` + +# Spleen + +Spleen is a monospaced bitmap font available in 6 sizes: + +- 5x8 +- 6x12 +- 8x16 +- 12x24 +- 16x32 +- 32x64 + +Each size is provided in the Glyph Bitmap Distribution Format (BDF), and +release tarballs contain the fonts in the following formats: `PCF`, `PSF` +(for the Linux console), `OTB`, `OTF`, `.dfont` for macOS users, and `FON` +for Windows users. + +All font sizes contain all ISO/IEC 8859-1 characters (Basic Latin and Latin-1 +Supplement Unicode block), Latin Extended-A characters, as well as Box Drawing, +Block Elements, and Braille Patterns Unicode blocks, except for the 5x8 and the +6x12 versions. + +Due to character size constraints, the 5x8 version only contains printable +ASCII characters, the Braille Patterns Unicode block, and light Box Drawing +characters. Please also note that there is no OpenType version for this size. + +As of Spleen 1.8.0, there is now a 6x12 version containing the same Unicode +blocks as the 5x8 version and the Latin-1 Supplement Unicode block. + ++As of Spleen 2.0.0, the 8x16, 16x32 and 32x64 versions have full support for ++Code page 437 (IBM PC). ++ +Spleen also has support for Powerline symbols out of the box. + +The font name is a reference to Baudelaire. + +## Screenshots + +The following screenshots show Spleen 16x32 displaying code and prose. + +![Spleen - Hello][1] + +![Spleen - L'etranger][2] + +ASCII characters for all sizes: + +Spleen 5x8: + +![Spleen - ASCII characters - 5x8][3] + +Spleen 6x12: + +![Spleen - ASCII characters - 6x12][4] + +Spleen 8x16: + +![Spleen - ASCII characters - 8x16][5] + +Spleen 12x24: + +![Spleen - ASCII characters - 12x24][6] + +Spleen 16x32: +![Spleen - ASCII characters - 16x32][7] + +Spleen 32x64: +![Spleen - ASCII characters - 32x64][8] + +## XLFD font names + +``` +-misc-spleen-medium-r-normal--8-80-72-72-c-50-iso10646-1 +-misc-spleen-medium-r-normal--12-120-72-72-c-60-iso10646-1 +-misc-spleen-medium-r-normal--16-160-72-72-c-80-iso10646-1 +-misc-spleen-medium-r-normal--24-240-72-72-c-120-iso10646-1 +-misc-spleen-medium-r-normal--32-320-72-72-c-160-iso10646-1 +-misc-spleen-medium-r-normal--64-640-72-72-c-320-iso10646-1 +``` + +## Packages + +Spleen packages are available for: + +- [OpenBSD][9] +- [NetBSD][10] +- [FreeBSD][11] +- [Arch Linux][12] +- [Void Linux][13] +- [Nix][14] +- [Debian][15] +- [Ubuntu][16] +- [MacPorts][17] + +## Manual installation + +### *BSD and Linux + +Clone the repository, convert the files to the Portable Compiled Format +(PCF) using **bdftopcf** and run **mkfontdir** in the directory. + +Alternatively, release tarballs provide PCF files for each size. + +### macOS + +macOS users should use the `.dfont` files provided in the release tarballs. + ++### DOS ++ ++DOS users should run the **SPLEEN.COM** executable provided in the release ++tarballs to enable the font. ++ ++This has been tested in DOSBox and FreeDOS on real hardware. ++ +### Windows + +Windows users should use the `.fon` or `.otf` files provided in the release +tarballs. + +## Usage + +### *BSD and Linux + +Update the font path to include **Spleen**: + + xset +fp /usr/local/share/fonts/spleen/ + +Update **.Xdefaults** and add one of the following directives: + + xterm*faceName: spleen:pixelsize=8:antialias=false + xterm*faceName: spleen:pixelsize=12:antialias=false + xterm*faceName: spleen:pixelsize=16:antialias=false + xterm*faceName: spleen:pixelsize=24:antialias=false + xterm*faceName: spleen:pixelsize=32:antialias=false + xterm*faceName: spleen:pixelsize=64:antialias=false + +Launch **xterm**. + +Ubuntu has bitmap fonts support disabled by default, instructions to enable +it are available [here][18]. + +### Linux console + +Release tarballs provide PSF files for each size, `setfont` can be used +to load and set the desired font. + +### NetBSD console + +NetBSD has .fnt files for each size which can be loaded using wsfontload(8). + +For example, to load Spleen 16x32: + + wsfontload -N spleen-16x32 -w 16 -h 32 /usr/share/wscons/fonts/spleen-16x32.fnt + wsconsctl -dw font=spleen-16x32 + +### FreeBSD console + +The FreeBSD package contains .fnt files which can be loaded using +vidcontrol(1). + +For example, to load Spleen 16x32: + + vidcontrol -f /usr/local/share/fonts/spleen/spleen-16x32.fnt + +### OpenType versions + +Spleen release tarballs now contains OTF versions generated automatically +from the BDF files, using [bdf2sfd][19]. Each font has a different name, +allowing them to be installed alongside. + +They should be used in the exact size specified below, with anti-aliasing +disabled. + +- Spleen 6x12: 9 Pt (12 pixels) +- Spleen 8x16: 12 Pt (16 pixels) +- Spleen 12x24: 18 Pt (24 pixels) +- Spleen 16x32: 24 Pt (32 pixels) +- Spleen 32x64: 48 Pt (64 pixels) + +## License + +Spleen is released under the BSD 2-Clause license. See `LICENSE` file for +details. + +## Author + +Spleen is developed by Frederic Cambus. + +- Site: https://www.cambus.net + +## Resources + +- [Spleen - Monospaced bitmap fonts][20] (2018) +- [New console font Spleen made default][21] (2019) +- [NetBSD, CTWM, and Spleen][22] (2021) + +GitHub: https://github.com/fcambus/spleen + +## Trivia + - - Spleen is the default font for OpenBSD consoles since January 2019 - - Spleen was imported in the NetBSD src tree in March 2019 - - Spleen 12x24 was used in the Haiku [kernel debugger][23] (on high resolution ++- Spleen was imported in the OpenBSD src tree in [September 2018][23] ++- Spleen is the default font for OpenBSD consoles since [January 2019][24] ++- Spleen was imported in the NetBSD src tree in [March 2019][25] ++- Spleen 12x24 was used in the Haiku [kernel debugger][26] (on high resolution + displays) from May 2021 to June 2022 - - [msTERM][24], a Terminal program for MailStation devices uses Spleen 5x8 - - [FBInk][25], a library to print text & images to an eInk Linux framebuffer ++- Spleen was imported in the FreeBSD base system in [May 2023][27] ++- [msTERM][28], a Terminal program for MailStation devices uses Spleen 5x8 ++- [FBInk][29], a library to print text & images to an eInk Linux framebuffer + embeds Spleen 16x32 ++- [U8g2][30], a monochrome graphics library for embedded devices includes ++ all Spleen sizes ++- [Ansilove][31], an ANSI and ASCII art to PNG converter includes Spleen + +[1]: https://www.cambus.net/content/2018/09/spleen-hello.png +[2]: https://www.cambus.net/content/2018/09/spleen-etranger.png +[3]: https://www.cambus.net/files/spleen/spleen-5x8.png +[4]: https://www.cambus.net/files/spleen/spleen-6x12.png +[5]: https://www.cambus.net/files/spleen/spleen-8x16.png +[6]: https://www.cambus.net/files/spleen/spleen-12x24.png +[7]: https://www.cambus.net/files/spleen/spleen-16x32.png +[8]: https://www.cambus.net/files/spleen/spleen-32x64.png +[9]: https://openports.pl/path/fonts/spleen +[10]: https://pkgsrc.se/fonts/spleen +[11]: https://www.freshports.org/x11-fonts/spleen/ +[12]: https://aur.archlinux.org/packages/spleen-font/ +[13]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/font-spleen +[14]: https://github.com/NixOS/nixpkgs/tree/master/pkgs/data/fonts/spleen +[15]: https://packages.debian.org/search?keywords=spleen +[16]: https://packages.ubuntu.com/search?keywords=spleen +[17]: https://ports.macports.org/port/font-spleen/ +[18]: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts +[19]: https://github.com/fcambus/bdf2sfd +[20]: https://www.cambus.net/spleen-monospaced-bitmap-fonts/ +[21]: https://undeadly.org/cgi?action=article;sid=20190110064857 +[22]: https://www.cambus.net/netbsd-ctwm-and-spleen/ - [23]: https://git.haiku-os.org/haiku/commit/?id=29a109bd6c01ce71bb61177ee9ff0417e74c1e18 - [24]: https://github.com/jcs/msTERM - [25]: https://github.com/NiLuJe/FBInk ++[23]: https://freshbsd.org/openbsd/src/commit/5raMrDMpYlPYW01H ++[24]: https://freshbsd.org/openbsd/src/commit/MoBCxKiAlFajRvSm ++[25]: https://freshbsd.org/netbsd/src/commit/TAJuMl9caBpVjGfB ++[26]: https://git.haiku-os.org/haiku/commit/?id=29a109bd6c01ce71bb61177ee9ff0417e74c1e18 ++[27]: https://cgit.freebsd.org/src/commit/?id=0d66206fff44 ++[28]: https://github.com/jcs/msTERM ++[29]: https://github.com/NiLuJe/FBInk ++[30]: https://github.com/olikraus/u8g2/wiki/fntgrpspleen ++[31]: https://www.ansilove.org From nobody Thu Jun 8 16:11:16 2023 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 4QcTjK0KvCz4bvWF; Thu, 8 Jun 2023 16:11:17 +0000 (UTC) (envelope-from git@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 4QcTjK06fFz4b0h; Thu, 8 Jun 2023 16:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686240677; 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; bh=Bh+LUdjojXqGrYB77KvVNg2uwjAV/nUCNNMTupHFJZI=; b=bvZ7RC21VUC4J94K6z6HOyy0dlkHBQW3UhAmm9ThIg9rTncobD9+ZYjDrJzwCymoGb4mrj tlGTGv/MPzPUjGomQp92oyq5ZK2EANTGCDRlOL76+pSw1pLntQBNzYMO94ygO6isMqf2kn SLd20hzhCDmjf2sFxV8QeLxPWSrO1rcdXZ5i5U5cLuWDGbPhMBTCa90z5vsnoGL5aiHqG5 XB175zFJxtO5g/OWkUmPSGqXMEawhgf6FS/MVpgHt2rA6nHax5iGOAMPx2FkrEvyHo0aDj 7j7Ke9kTYUnKYbPXul942YqxDjvWQext4NbRVSj7KdU0ibor9kI699/py6cBZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686240677; 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; bh=Bh+LUdjojXqGrYB77KvVNg2uwjAV/nUCNNMTupHFJZI=; b=WtykZk7faUhJjpGcV31RIp2ANz55v1RqL/C2kgdOjToZXgy+6Su7F34oKd/6m9fHl4QA9O mh2E8vKiF42yMwyQwjqumoaHAa2vTG4hqadNCvbyBAbrlZOMKGkbRTEe8GAIvIQupXlCXE yyZmIBijcVxQCyzb49Ow0oOHiBAoh6WAVc7yWYx52YRTze7h3SoEg9yVNjmqpDRdSF5L2B toGi4ES/L1U7LD0sqHZqtg2/RdS7VUfqVCzeNyWgeg7pMmrHvlSzBRW5hvU8ZoQ0tvKQzs phumby7WCjfewdPbhtNDMQtM/H9N/9bi9LiXYUyW+BBK9nrS/7OWdsfa3IVpPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686240677; a=rsa-sha256; cv=none; b=ORua6ZqRyd69DgfJ9u4MrzEcj2fQH9Iye+liyXXBQxx0l1q8fEYlfCzOqirTZrxpJQ5tfC rhcV+bBiwL5F+7t1QnUugRDhBXcbXfoOA37KaMaLia5Ax7w4MENtTLwKrJrRjdp+YuCFpX UtVj7En4VC3wlfs1o/SrOJTOCaFKkHpousIhug8AmmAQ1rvXnCqLj/xntismIpZOBK4FZr bpNb/bu38+T6rLaw0OWpBjDzBwE3t2S1HWCMMz8ry8PuglV6XY9peKFxDZPJvqhsigqGWX LV5LO+HNbJmWy+ZSIGFNaXECirl1NalCMqB/hd0JgO45nzh8i/mtjVRLJ2uFbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcTjJ6JLjz117F; Thu, 8 Jun 2023 16:11:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358GBGFa027041; Thu, 8 Jun 2023 16:11:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358GBGj5027040; Thu, 8 Jun 2023 16:11:16 GMT (envelope-from git) Date: Thu, 8 Jun 2023 16:11:16 GMT Message-Id: <202306081611.358GBGj5027040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 732786a25fd7 - main - arm64: Reduce the direct use of cpu_desc 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 732786a25fd7e9b48b1d64f51c41c80129e37563 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=732786a25fd7e9b48b1d64f51c41c80129e37563 commit 732786a25fd7e9b48b1d64f51c41c80129e37563 Author: Andrew Turner AuthorDate: 2023-06-01 17:25:37 +0000 Commit: Andrew Turner CommitDate: 2023-06-08 16:10:10 +0000 arm64: Reduce the direct use of cpu_desc To help moving to a dynamically allocated cpu_desc array reduce the places we use it directly and create a pointer that is passed in to functions that read it. Reviewed by: Zach Leaf Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40392 --- sys/arm64/arm64/identcpu.c | 179 ++++++++++++++++++++++++--------------------- 1 file changed, 96 insertions(+), 83 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index 299d0fb0e38d..fb1c4537f216 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -47,9 +47,12 @@ __FBSDID("$FreeBSD$"); #include #include +struct cpu_desc; + static void print_cpu_midr(struct sbuf *sb, u_int cpu); -static void print_cpu_features(u_int cpu); -static void print_cpu_caches(struct sbuf *sb, u_int); +static void print_cpu_features(u_int cpu, struct cpu_desc *desc, + struct cpu_desc *prev_desc); +static void print_cpu_caches(struct sbuf *sb, struct cpu_desc *desc); #ifdef COMPAT_FREEBSD32 static u_long parse_cpu_features_hwcap32(void); #endif @@ -71,7 +74,8 @@ static int allow_idc = 1; SYSCTL_INT(_machdep_cache, OID_AUTO, allow_idc, CTLFLAG_RDTUN, &allow_idc, 0, "Allow optimizations based on the IDC cache bit"); -static void check_cpu_regs(u_int cpu); +static void check_cpu_regs(u_int cpu, struct cpu_desc *desc, + struct cpu_desc *prev_desc); /* * The default implementation of I-cache sync assumes we have an @@ -1784,6 +1788,7 @@ update_lower_register(uint64_t val, uint64_t new_val, u_int shift, void update_special_regs(u_int cpu) { + struct cpu_desc *desc; struct mrs_field *fields; uint64_t user_reg, kern_reg, value; int i, j; @@ -1798,8 +1803,9 @@ update_special_regs(u_int cpu) user_cpu_desc.id_aa64dfr0 = ID_AA64DFR0_DebugVer_8; } + desc = &cpu_desc[cpu]; for (i = 0; i < nitems(user_regs); i++) { - value = CPU_DESC_FIELD(cpu_desc[cpu], i); + value = CPU_DESC_FIELD(*desc, i); if (cpu == 0) { kern_reg = value; user_reg = value; @@ -1881,21 +1887,26 @@ parse_cpu_features(void) static void identify_cpu_sysinit(void *dummy __unused) { + struct cpu_desc *desc, *prev_desc; int cpu; bool dic, idc; dic = (allow_dic != 0); idc = (allow_idc != 0); + prev_desc = NULL; CPU_FOREACH(cpu) { - check_cpu_regs(cpu); - if (cpu != 0) + desc = &cpu_desc[cpu]; + if (cpu != 0) { + check_cpu_regs(cpu, desc, prev_desc); update_special_regs(cpu); + } - if (CTR_DIC_VAL(cpu_desc[cpu].ctr) == 0) + if (CTR_DIC_VAL(desc->ctr) == 0) dic = false; - if (CTR_IDC_VAL(cpu_desc[cpu].ctr) == 0) + if (CTR_IDC_VAL(desc->ctr) == 0) idc = false; + prev_desc = desc; } /* Find the values to export to userspace as AT_HWCAP and AT_HWCAP2 */ @@ -1934,10 +1945,15 @@ static void cpu_features_sysinit(void *dummy __unused) { struct sbuf sb; + struct cpu_desc *desc, *prev_desc; u_int cpu; - CPU_FOREACH(cpu) - print_cpu_features(cpu); + prev_desc = NULL; + CPU_FOREACH(cpu) { + desc = &cpu_desc[cpu]; + print_cpu_features(cpu, desc, prev_desc); + prev_desc = desc; + } /* Fill in cpu_model for the hw.model sysctl */ sbuf_new(&sb, cpu_model, sizeof(cpu_model), SBUF_FIXEDLEN); @@ -2117,8 +2133,8 @@ print_cpu_midr(struct sbuf *sb, u_int cpu) } static void -print_cpu_cache(u_int cpu, struct sbuf *sb, uint64_t ccs, bool icache, - bool unified) +print_cpu_cache(struct cpu_desc *desc, struct sbuf *sb, uint64_t ccs, + bool icache, bool unified) { size_t cache_size; size_t line_size; @@ -2130,7 +2146,7 @@ print_cpu_cache(u_int cpu, struct sbuf *sb, uint64_t ccs, bool icache, * formats depending on the FEAT_CCIDX bit in ID_AA64MMFR2 feature * register. */ - if ((cpu_desc[cpu].id_aa64mmfr2 & ID_AA64MMFR2_CCIDX_64)) + if ((desc->id_aa64mmfr2 & ID_AA64MMFR2_CCIDX_64)) cache_size = (CCSIDR_NSETS_64(ccs) + 1) * (CCSIDR_ASSOC_64(ccs) + 1); else @@ -2142,12 +2158,12 @@ print_cpu_cache(u_int cpu, struct sbuf *sb, uint64_t ccs, bool icache, } static void -print_cpu_caches(struct sbuf *sb, u_int cpu) +print_cpu_caches(struct sbuf *sb, struct cpu_desc *desc) { /* Print out each cache combination */ uint64_t clidr; int i = 1; - clidr = cpu_desc[cpu].clidr; + clidr = desc->clidr; for (i = 0; (clidr & CLIDR_CTYPE_MASK) != 0; i++, clidr >>= 3) { int j = 0; @@ -2155,15 +2171,15 @@ print_cpu_caches(struct sbuf *sb, u_int cpu) sbuf_printf(sb, " L%d cache: ", i + 1); if ((clidr & CLIDR_CTYPE_IO)) { - print_cpu_cache(cpu, sb, cpu_desc[cpu].ccsidr[i][j++], - true, false); + print_cpu_cache(desc, sb, desc->ccsidr[i][j++], true, + false); /* If there's more, add to the line. */ if ((ctype_m & ~CLIDR_CTYPE_IO) != 0) sbuf_printf(sb, ", "); } if ((ctype_m & ~CLIDR_CTYPE_IO) != 0) { - print_cpu_cache(cpu, sb, cpu_desc[cpu].ccsidr[i][j], - false, (clidr & CLIDR_CTYPE_UNIFIED)); + print_cpu_cache(desc, sb, desc->ccsidr[i][j], false, + (clidr & CLIDR_CTYPE_UNIFIED)); } sbuf_printf(sb, "\n"); @@ -2173,7 +2189,8 @@ print_cpu_caches(struct sbuf *sb, u_int cpu) } static void -print_cpu_features(u_int cpu) +print_cpu_features(u_int cpu, struct cpu_desc *desc, + struct cpu_desc *prev_desc) { struct sbuf *sb; @@ -2185,17 +2202,17 @@ print_cpu_features(u_int cpu) switch(cpu_aff_levels) { default: case 4: - sbuf_printf(sb, " %2d", CPU_AFF3(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF3(desc->mpidr)); /* FALLTHROUGH */ case 3: - sbuf_printf(sb, " %2d", CPU_AFF2(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF2(desc->mpidr)); /* FALLTHROUGH */ case 2: - sbuf_printf(sb, " %2d", CPU_AFF1(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF1(desc->mpidr)); /* FALLTHROUGH */ case 1: case 0: /* On UP this will be zero */ - sbuf_printf(sb, " %2d", CPU_AFF0(cpu_desc[cpu].mpidr)); + sbuf_printf(sb, " %2d", CPU_AFF0(desc->mpidr)); break; } sbuf_finish(sb); @@ -2225,80 +2242,80 @@ print_cpu_features(u_int cpu) "atomic operations.\n"); #define SHOULD_PRINT_REG(_reg) \ - (cpu == 0 || cpu_desc[cpu]._reg != cpu_desc[cpu - 1]._reg) + (prev_desc == NULL || desc->_reg != prev_desc->_reg) /* Cache Type Register */ if (SHOULD_PRINT_REG(ctr)) { print_register(sb, "Cache Type", - cpu_desc[cpu].ctr, print_ctr_fields, NULL); + desc->ctr, print_ctr_fields, NULL); } /* AArch64 Instruction Set Attribute Register 0 */ if (SHOULD_PRINT_REG(id_aa64isar0)) print_id_register(sb, "Instruction Set Attributes 0", - cpu_desc[cpu].id_aa64isar0, id_aa64isar0_fields); + desc->id_aa64isar0, id_aa64isar0_fields); /* AArch64 Instruction Set Attribute Register 1 */ if (SHOULD_PRINT_REG(id_aa64isar1)) print_id_register(sb, "Instruction Set Attributes 1", - cpu_desc[cpu].id_aa64isar1, id_aa64isar1_fields); + desc->id_aa64isar1, id_aa64isar1_fields); /* AArch64 Instruction Set Attribute Register 2 */ if (SHOULD_PRINT_REG(id_aa64isar2)) print_id_register(sb, "Instruction Set Attributes 2", - cpu_desc[cpu].id_aa64isar2, id_aa64isar2_fields); + desc->id_aa64isar2, id_aa64isar2_fields); /* AArch64 Processor Feature Register 0 */ if (SHOULD_PRINT_REG(id_aa64pfr0)) print_id_register(sb, "Processor Features 0", - cpu_desc[cpu].id_aa64pfr0, id_aa64pfr0_fields); + desc->id_aa64pfr0, id_aa64pfr0_fields); /* AArch64 Processor Feature Register 1 */ if (SHOULD_PRINT_REG(id_aa64pfr1)) print_id_register(sb, "Processor Features 1", - cpu_desc[cpu].id_aa64pfr1, id_aa64pfr1_fields); + desc->id_aa64pfr1, id_aa64pfr1_fields); /* AArch64 Memory Model Feature Register 0 */ if (SHOULD_PRINT_REG(id_aa64mmfr0)) print_id_register(sb, "Memory Model Features 0", - cpu_desc[cpu].id_aa64mmfr0, id_aa64mmfr0_fields); + desc->id_aa64mmfr0, id_aa64mmfr0_fields); /* AArch64 Memory Model Feature Register 1 */ if (SHOULD_PRINT_REG(id_aa64mmfr1)) print_id_register(sb, "Memory Model Features 1", - cpu_desc[cpu].id_aa64mmfr1, id_aa64mmfr1_fields); + desc->id_aa64mmfr1, id_aa64mmfr1_fields); /* AArch64 Memory Model Feature Register 2 */ if (SHOULD_PRINT_REG(id_aa64mmfr2)) print_id_register(sb, "Memory Model Features 2", - cpu_desc[cpu].id_aa64mmfr2, id_aa64mmfr2_fields); + desc->id_aa64mmfr2, id_aa64mmfr2_fields); /* AArch64 Debug Feature Register 0 */ if (SHOULD_PRINT_REG(id_aa64dfr0)) print_id_register(sb, "Debug Features 0", - cpu_desc[cpu].id_aa64dfr0, id_aa64dfr0_fields); + desc->id_aa64dfr0, id_aa64dfr0_fields); /* AArch64 Memory Model Feature Register 1 */ if (SHOULD_PRINT_REG(id_aa64dfr1)) print_id_register(sb, "Debug Features 1", - cpu_desc[cpu].id_aa64dfr1, id_aa64dfr1_fields); + desc->id_aa64dfr1, id_aa64dfr1_fields); /* AArch64 Auxiliary Feature Register 0 */ if (SHOULD_PRINT_REG(id_aa64afr0)) print_id_register(sb, "Auxiliary Features 0", - cpu_desc[cpu].id_aa64afr0, id_aa64afr0_fields); + desc->id_aa64afr0, id_aa64afr0_fields); /* AArch64 Auxiliary Feature Register 1 */ if (SHOULD_PRINT_REG(id_aa64afr1)) print_id_register(sb, "Auxiliary Features 1", - cpu_desc[cpu].id_aa64afr1, id_aa64afr1_fields); + desc->id_aa64afr1, id_aa64afr1_fields); /* AArch64 SVE Feature Register 0 */ - if (cpu_desc[cpu].have_sve) { + if (desc->have_sve) { if (SHOULD_PRINT_REG(id_aa64zfr0) || - !cpu_desc[cpu - 1].have_sve) { + !prev_desc->have_sve) { print_id_register(sb, "SVE Features 0", - cpu_desc[cpu].id_aa64zfr0, id_aa64zfr0_fields); + desc->id_aa64zfr0, id_aa64zfr0_fields); } } @@ -2306,20 +2323,20 @@ print_cpu_features(u_int cpu) /* AArch32 Instruction Set Attribute Register 5 */ if (SHOULD_PRINT_REG(id_isar5)) print_id_register(sb, "AArch32 Instruction Set Attributes 5", - cpu_desc[cpu].id_isar5, id_isar5_fields); + desc->id_isar5, id_isar5_fields); /* AArch32 Media and VFP Feature Register 0 */ if (SHOULD_PRINT_REG(mvfr0)) print_id_register(sb, "AArch32 Media and VFP Features 0", - cpu_desc[cpu].mvfr0, mvfr0_fields); + desc->mvfr0, mvfr0_fields); /* AArch32 Media and VFP Feature Register 1 */ if (SHOULD_PRINT_REG(mvfr1)) print_id_register(sb, "AArch32 Media and VFP Features 1", - cpu_desc[cpu].mvfr1, mvfr1_fields); + desc->mvfr1, mvfr1_fields); #endif if (bootverbose) - print_cpu_caches(sb, cpu); + print_cpu_caches(sb, desc); sbuf_delete(sb); sb = NULL; @@ -2370,23 +2387,25 @@ identify_cache(uint64_t ctr) void identify_cpu(u_int cpu) { + struct cpu_desc *desc; uint64_t clidr; + desc = &cpu_desc[cpu]; /* Save affinity for current CPU */ - cpu_desc[cpu].mpidr = get_mpidr(); - CPU_AFFINITY(cpu) = cpu_desc[cpu].mpidr & CPU_AFF_MASK; - - cpu_desc[cpu].ctr = READ_SPECIALREG(ctr_el0); - cpu_desc[cpu].id_aa64dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); - cpu_desc[cpu].id_aa64dfr1 = READ_SPECIALREG(id_aa64dfr1_el1); - cpu_desc[cpu].id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); - cpu_desc[cpu].id_aa64isar1 = READ_SPECIALREG(id_aa64isar1_el1); - cpu_desc[cpu].id_aa64isar2 = READ_SPECIALREG(id_aa64isar2_el1); - cpu_desc[cpu].id_aa64mmfr0 = READ_SPECIALREG(id_aa64mmfr0_el1); - cpu_desc[cpu].id_aa64mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); - cpu_desc[cpu].id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1); - cpu_desc[cpu].id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_el1); - cpu_desc[cpu].id_aa64pfr1 = READ_SPECIALREG(id_aa64pfr1_el1); + desc->mpidr = get_mpidr(); + CPU_AFFINITY(cpu) = desc->mpidr & CPU_AFF_MASK; + + desc->ctr = READ_SPECIALREG(ctr_el0); + desc->id_aa64dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); + desc->id_aa64dfr1 = READ_SPECIALREG(id_aa64dfr1_el1); + desc->id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); + desc->id_aa64isar1 = READ_SPECIALREG(id_aa64isar1_el1); + desc->id_aa64isar2 = READ_SPECIALREG(id_aa64isar2_el1); + desc->id_aa64mmfr0 = READ_SPECIALREG(id_aa64mmfr0_el1); + desc->id_aa64mmfr1 = READ_SPECIALREG(id_aa64mmfr1_el1); + desc->id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1); + desc->id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_el1); + desc->id_aa64pfr1 = READ_SPECIALREG(id_aa64pfr1_el1); /* * ID_AA64ZFR0_EL1 is only valid when at least one of: @@ -2394,71 +2413,65 @@ identify_cpu(u_int cpu) * - ID_AA64PFR1_EL1.SME is non-zero * In other cases it is zero, but still safe to read */ - cpu_desc[cpu].have_sve = - (ID_AA64PFR0_SVE_VAL(cpu_desc[cpu].id_aa64pfr0) != 0); - cpu_desc[cpu].id_aa64zfr0 = READ_SPECIALREG(ID_AA64ZFR0_EL1_REG); + desc->have_sve = + (ID_AA64PFR0_SVE_VAL(desc->id_aa64pfr0) != 0); + desc->id_aa64zfr0 = READ_SPECIALREG(ID_AA64ZFR0_EL1_REG); - cpu_desc[cpu].clidr = READ_SPECIALREG(clidr_el1); + desc->clidr = READ_SPECIALREG(clidr_el1); - clidr = cpu_desc[cpu].clidr; + clidr = desc->clidr; for (int i = 0; (clidr & CLIDR_CTYPE_MASK) != 0; i++, clidr >>= 3) { int j = 0; if ((clidr & CLIDR_CTYPE_IO)) { WRITE_SPECIALREG(csselr_el1, CSSELR_Level(i) | CSSELR_InD); - cpu_desc[cpu].ccsidr[i][j++] = + desc->ccsidr[i][j++] = READ_SPECIALREG(ccsidr_el1); } if ((clidr & ~CLIDR_CTYPE_IO) == 0) continue; WRITE_SPECIALREG(csselr_el1, CSSELR_Level(i)); - cpu_desc[cpu].ccsidr[i][j] = READ_SPECIALREG(ccsidr_el1); + desc->ccsidr[i][j] = READ_SPECIALREG(ccsidr_el1); } #ifdef COMPAT_FREEBSD32 /* Only read aarch32 SRs if EL0-32 is available */ - if (ID_AA64PFR0_EL0_VAL(cpu_desc[cpu].id_aa64pfr0) == - ID_AA64PFR0_EL0_64_32) { - cpu_desc[cpu].id_isar5 = READ_SPECIALREG(id_isar5_el1); - cpu_desc[cpu].mvfr0 = READ_SPECIALREG(mvfr0_el1); - cpu_desc[cpu].mvfr1 = READ_SPECIALREG(mvfr1_el1); + if (ID_AA64PFR0_EL0_VAL(desc->id_aa64pfr0) == ID_AA64PFR0_EL0_64_32) { + desc->id_isar5 = READ_SPECIALREG(id_isar5_el1); + desc->mvfr0 = READ_SPECIALREG(mvfr0_el1); + desc->mvfr1 = READ_SPECIALREG(mvfr1_el1); } #endif } static void -check_cpu_regs(u_int cpu) +check_cpu_regs(u_int cpu, struct cpu_desc *desc, struct cpu_desc *prev_desc) { - switch (cpu_aff_levels) { case 0: - if (CPU_AFF0(cpu_desc[cpu].mpidr) != - CPU_AFF0(cpu_desc[0].mpidr)) + if (CPU_AFF0(desc->mpidr) != CPU_AFF0(prev_desc->mpidr)) cpu_aff_levels = 1; /* FALLTHROUGH */ case 1: - if (CPU_AFF1(cpu_desc[cpu].mpidr) != - CPU_AFF1(cpu_desc[0].mpidr)) + if (CPU_AFF1(desc->mpidr) != CPU_AFF1(prev_desc->mpidr)) cpu_aff_levels = 2; /* FALLTHROUGH */ case 2: - if (CPU_AFF2(cpu_desc[cpu].mpidr) != - CPU_AFF2(cpu_desc[0].mpidr)) + if (CPU_AFF2(desc->mpidr) != CPU_AFF2(prev_desc->mpidr)) cpu_aff_levels = 3; /* FALLTHROUGH */ case 3: - if (CPU_AFF3(cpu_desc[cpu].mpidr) != - CPU_AFF3(cpu_desc[0].mpidr)) + if (CPU_AFF3(desc->mpidr) != CPU_AFF3(prev_desc->mpidr)) cpu_aff_levels = 4; break; } - if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) { + if (desc->ctr != prev_desc->ctr) { /* * If the cache type register is different we may * have a different l1 cache type. */ - identify_cache(cpu_desc[cpu].ctr); + identify_cache(desc->ctr); } } From nobody Thu Jun 8 16:11:17 2023 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 4QcTjL1x6vz4bvWN; Thu, 8 Jun 2023 16:11:18 +0000 (UTC) (envelope-from git@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 4QcTjL0qTlz4bDb; Thu, 8 Jun 2023 16:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686240678; 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; bh=hW/KwPs498Af/8L2qenlCx/UqRx1JFdo5EGTwZ4DQQU=; b=wHdexyvK+FsoEfScOJo916WaTJtzpJNqQ6YoimSFk5JjWO70RARbna7IWePuvmWR6YUBHm CmGb/rB4uZOkdSlisWWfi0cBi6nn+WNGptJsMGJr85AEepPmkAJ+xbFCp080ADcusBN5fJ 8m/52wfZnENHXUz4Vk8+AW46AMKneewf+OCQtFRwTLaXG2vYv8ayzFCHfP1fV9JYtV4i+Y e+GJvXtHp+gtxul3N+B/6dYb9vgmkG0w/EgqVbSkAMqNj3u1ZDmtqLAovQSKVAmZCQMgTP mJh/B+yIv5gHpwHGw22PQKE1QzB6ylvVoJqL3KLvidhirBeMpJ3+8dyx938Ctg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686240678; 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; bh=hW/KwPs498Af/8L2qenlCx/UqRx1JFdo5EGTwZ4DQQU=; b=ukYGOjrvClN6L2Pa7mgYqsugyUWg5T9OCHIFPp54u365CUdEiFbm5HtvzI2WMRG+fcZP+q OdSNI9SmSaJOQnTnU0I/2lN8P3qZ6yoYZQisAskRdBoMqZrh5tg04/XbTpONgpAhsG1UPe WLVLsexN8b475aFhlB9AVsewjCEr0d1ffE5extgHiCwogCj3guVFpPCCHwmYZ2QPb8LQQo Cxo2X7gzlMK66UQtRbnetn46lSeHWGlkR7PEOOdK2ZUwys0uMgDaNKSlihq9aPM7yZz7y6 /KqChGY/CYvZN9MmWxn4PPmaxKCeGN7QFRe+IXXihU4oyEksWYYW7CZVVjO35Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686240678; a=rsa-sha256; cv=none; b=MkohdULVUh4JX1eXcgZqjvqeaFjpeij5ViPEArct7fjgC92wXPqPdd9YQNgqDgwfW0h0Bw 184Z7SY5J6X5mtIsDYmfJu2fVQO1yNvIwB7U542AzX9PKJ8X19vQQ8UjTVTXxS0txVQoKN PR8HeIn4Wc6vWOBe+0hq3FjBuSjrpVcQ0d7GQnH7FV7gJm2CCUJNMPZJi6wX6sd8P0nzPL 3V3Yr4madR/cQisSgqJqRIGtNEGyJpnlboXjYoo2V/9BQ4WCPOO6r1ZXjVyBAh4CVu0ZkE FZ1wQYMRrveXfFcZwaVcT6vIb75TOOesQrH2PxVYnakUUauXEL3omzAauk6HIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcTjK6vKBz11CV; Thu, 8 Jun 2023 16:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358GBHCK027061; Thu, 8 Jun 2023 16:11:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358GBHbw027060; Thu, 8 Jun 2023 16:11:17 GMT (envelope-from git) Date: Thu, 8 Jun 2023 16:11:17 GMT Message-Id: <202306081611.358GBHbw027060@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: d057b7aac8ae - main - arm64: Malloc the cpu_desc array 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d057b7aac8aedd353f2cb047cb0069f6a4db7a83 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=d057b7aac8aedd353f2cb047cb0069f6a4db7a83 commit d057b7aac8aedd353f2cb047cb0069f6a4db7a83 Author: Andrew Turner AuthorDate: 2023-06-02 16:12:24 +0000 Commit: Andrew Turner CommitDate: 2023-06-08 16:10:10 +0000 arm64: Malloc the cpu_desc array We only need this during boot. Allocate the array before starting CPUs to reduce the memory usage. Reviewed by: Zach Leaf Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D40433 --- sys/arm64/arm64/identcpu.c | 43 ++++++++++++++++++++++++++++++++++++++----- sys/arm64/arm64/mp_machdep.c | 2 ++ sys/arm64/include/cpu.h | 2 ++ 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index fb1c4537f216..86b669ea2f56 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -47,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include +static MALLOC_DEFINE(M_IDENTCPU, "CPU ID", "arm64 CPU identification memory"); + struct cpu_desc; static void print_cpu_midr(struct sbuf *sb, u_int cpu); @@ -150,10 +153,22 @@ struct cpu_desc { bool have_sve; }; -static struct cpu_desc cpu_desc[MAXCPU]; +static struct cpu_desc cpu_desc0; +static struct cpu_desc *cpu_desc; static struct cpu_desc kern_cpu_desc; static struct cpu_desc user_cpu_desc; +static struct cpu_desc * +get_cpu_desc(u_int cpu) +{ + /* The cpu_desc for CPU 0 is used before the allocator is ready. */ + if (cpu == 0) + return (&cpu_desc0); + + MPASS(cpu_desc != NULL); + return (&cpu_desc[cpu - 1]); +} + struct cpu_parts { u_int part_id; const char *part_name; @@ -1803,7 +1818,7 @@ update_special_regs(u_int cpu) user_cpu_desc.id_aa64dfr0 = ID_AA64DFR0_DebugVer_8; } - desc = &cpu_desc[cpu]; + desc = get_cpu_desc(cpu); for (i = 0; i < nitems(user_regs); i++) { value = CPU_DESC_FIELD(*desc, i); if (cpu == 0) { @@ -1839,6 +1854,22 @@ update_special_regs(u_int cpu) } } +void +cpu_desc_init(void) +{ + if (mp_ncpus == 1) + return; + + /* + * Allocate memory for the non-boot CPUs to store their registers. + * As this is indexed by CPU ID we need to allocate space for CPUs + * 1 to mp_maxid. Because of this mp_maxid is already the correct + * number of elements. + */ + cpu_desc = mallocarray(mp_maxid, sizeof(*cpu_desc), M_IDENTCPU, + M_ZERO | M_WAITOK); +} + /* HWCAP */ bool __read_frequently lse_supported = false; @@ -1896,7 +1927,7 @@ identify_cpu_sysinit(void *dummy __unused) prev_desc = NULL; CPU_FOREACH(cpu) { - desc = &cpu_desc[cpu]; + desc = get_cpu_desc(cpu); if (cpu != 0) { check_cpu_regs(cpu, desc, prev_desc); update_special_regs(cpu); @@ -1950,7 +1981,7 @@ cpu_features_sysinit(void *dummy __unused) prev_desc = NULL; CPU_FOREACH(cpu) { - desc = &cpu_desc[cpu]; + desc = get_cpu_desc(cpu); print_cpu_features(cpu, desc, prev_desc); prev_desc = desc; } @@ -1961,6 +1992,8 @@ cpu_features_sysinit(void *dummy __unused) sbuf_finish(&sb); sbuf_delete(&sb); + + free(cpu_desc, M_IDENTCPU); } /* Log features before APs are released and start printing to the dmesg. */ SYSINIT(cpu_features, SI_SUB_SMP - 1, SI_ORDER_ANY, cpu_features_sysinit, NULL); @@ -2390,7 +2423,7 @@ identify_cpu(u_int cpu) struct cpu_desc *desc; uint64_t clidr; - desc = &cpu_desc[cpu]; + desc = get_cpu_desc(cpu); /* Save affinity for current CPU */ desc->mpidr = get_mpidr(); CPU_AFFINITY(cpu) = desc->mpidr & CPU_AFF_MASK; diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 9dd1182e5721..babeee331be0 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -779,6 +779,8 @@ cpu_mp_start(void) mpidr = READ_SPECIALREG(mpidr_el1) & CPU_AFF_MASK; cpuid_to_pcpu[0]->pc_mpidr = mpidr; + cpu_desc_init(); + switch(arm64_bus_method) { #ifdef DEV_ACPI case ARM64_BUS_ACPI: diff --git a/sys/arm64/include/cpu.h b/sys/arm64/include/cpu.h index 88a9ac18080b..1ea497756698 100644 --- a/sys/arm64/include/cpu.h +++ b/sys/arm64/include/cpu.h @@ -214,6 +214,8 @@ void update_special_regs(u_int); bool extract_user_id_field(u_int, u_int, uint8_t *); bool get_kernel_reg(u_int, uint64_t *); +void cpu_desc_init(void); + #define CPU_AFFINITY(cpu) __cpu_affinity[(cpu)] #define CPU_CURRENT_SOCKET \ (CPU_AFF2(CPU_AFFINITY(PCPU_GET(cpuid)))) From nobody Thu Jun 8 16:30:54 2023 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 4QcV7y44ndz4byFb; Thu, 8 Jun 2023 16:30:54 +0000 (UTC) (envelope-from git@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 4QcV7y353Cz3HFH; Thu, 8 Jun 2023 16:30:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686241854; 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; bh=lIs8K6P79OYPy6mRgqxsCpoey6dqYHHFyRy+ovzC8yM=; b=Esd1iwI3Q3fjF5HCNngIAv1qfXXzX+vExS7EGMRpaBKkcTkXI6RR4QLL+y4EGQATrsbct2 lekoxMeTHvZ1QwEUflHfFreDnCr1PyWrwz7HGsfcMA9ksPnaMrRX/75j54FS9dZ+lGqyZv bbn0Iuar3tOUfXx0VBjKf3IbxBgDjdQWam5rYyVlX4UsuAvqakJ60AuZhp5BCo4Y6/1TvW AidE5EKEAfj/kD/cK6PmrTeu8K9dbd5zbKnfXvZppS632am4PoWJrsJulw6lYXEYhvGYey kghUYmBB+Je7aZ++fwwEVNmN2XXelIKaiuL8xHbutp+y5bKmDhNZ/XlKpBIKSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686241854; 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; bh=lIs8K6P79OYPy6mRgqxsCpoey6dqYHHFyRy+ovzC8yM=; b=O3F+9v9rrVoYO2Y+MofMhRzyKpYNaQ7CibPsAftnrtbeRBTa/3aO6RTA4OSqu1Gkpc2oSc 7MyMtgvI5O/GCU6fIDrMzEziIG21FofK2wM7c7E8DgLhTEpqyVcPQY1633Gmp3GzR8N07j zUewVy8VoSzSAaciq8s27UIi6BZUZYUyksimA9RJ5n00Dx+Foqspz+y7bOKeR2eDW34Rjc 6lJg0+6HSKPEJD7l7v+5CIdHDiJayG3he8fw2MuMTxgPiV2vUoECUYdwG7k6akDG48MfUW Omwhf3w8uc5Cl8hSDXgbUkN4/pRMVV/LiGLOqrcalYIlJml4w9QF1XUZuneung== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686241854; a=rsa-sha256; cv=none; b=ZiySFMIAcQE7j62Y9VTVYx7/s0RAzkFkV8jqLMJHFScGLTreSHXTAwwM+g6+OzqmoiN2CI sd6Ec7ZDrXljpx0bo7Na+x7K0c+uAPx/STqLiGkVSjyAMhge56DGThuyCsdqAEqdBp6N6n mBArJYsoWuJjPJ5VehGDJA1Hn+Tb+2grPbf1c7rpgn+BZOlkMhsC3KTpK3sQorB4q/BcxB s8qOKD0e/9RmK2Ni2UWV62TDsKfT+VFLvGeNujHNOqY3BYn9nWzb2XsM76VD+u+ZpsCtTZ xtAYmlqYaGyP5Zwwz+rRarit6bJGmAHK2XNEAAXJufz3BMiv6jL9xFhRuAkpKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcV7y1mv5z11TT; Thu, 8 Jun 2023 16:30:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358GUstH059986; Thu, 8 Jun 2023 16:30:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358GUsce059985; Thu, 8 Jun 2023 16:30:54 GMT (envelope-from git) Date: Thu, 8 Jun 2023 16:30:54 GMT Message-Id: <202306081630.358GUsce059985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f40cd16bfda4 - main - kern: Move devctl_systems[] out of sys/sys/devctl.h 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f40cd16bfda4f4512033bb9e7212ee5d8b94b9a7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f40cd16bfda4f4512033bb9e7212ee5d8b94b9a7 commit f40cd16bfda4f4512033bb9e7212ee5d8b94b9a7 Author: Ed Maste AuthorDate: 2023-06-08 13:58:26 +0000 Commit: Ed Maste CommitDate: 2023-06-08 16:28:04 +0000 kern: Move devctl_systems[] out of sys/sys/devctl.h The amd64-gcc12 build was failing with `error: 'devctl_systems' defined but not used`. Just move it to the C file where it's used. PR: 271903 Sponsored by: The FreeBSD Foundation --- sys/netlink/netlink_sysevent.c | 23 +++++++++++++++++++++++ sys/sys/devctl.h | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/sys/netlink/netlink_sysevent.c b/sys/netlink/netlink_sysevent.c index 9da72a121ecd..01d0837b14d2 100644 --- a/sys/netlink/netlink_sysevent.c +++ b/sys/netlink/netlink_sysevent.c @@ -53,6 +53,29 @@ static struct sysevent_group { uint32_t id; } sysevent_groups[MAX_SYSEVENT_GROUPS] = {}; +static const char *devctl_systems[] = { + "ACPI", + "AEON", + "CAM", + "CARP", + "coretemp", + "DEVFS", + "device", + "ETHERNET", + "GEOM", + "HYPERV_NIC_VF", + "IFNET", + "INFINIBAND", + "KERNEL", + "nvme", + "PMU", + "RCTL", + "USB", + "VFS", + "VT", + "ZFS", +}; + static void sysevent_write(struct sysevent_group *se, const char *subsystem, const char *type, const char *data) diff --git a/sys/sys/devctl.h b/sys/sys/devctl.h index 5b613cf427df..da26eaabc26c 100644 --- a/sys/sys/devctl.h +++ b/sys/sys/devctl.h @@ -13,29 +13,6 @@ * hook to send the message. */ -static const char *devctl_systems[] = { - "ACPI", - "AEON", - "CAM", - "CARP", - "coretemp", - "DEVFS", - "device", - "ETHERNET", - "GEOM", - "HYPERV_NIC_VF", - "IFNET", - "INFINIBAND", - "KERNEL", - "nvme", - "PMU", - "RCTL", - "USB", - "VFS", - "VT", - "ZFS", -}; - bool devctl_process_running(void); void devctl_notify(const char *__system, const char *__subsystem, const char *__type, const char *__data); From nobody Thu Jun 8 17:32:49 2023 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 4QcWWQ2bHgz4c80J; Thu, 8 Jun 2023 17:32:50 +0000 (UTC) (envelope-from git@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 4QcWWQ1vCvz3pdv; Thu, 8 Jun 2023 17:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686245570; 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; bh=uMqn/lxf16T13ZDfqjUrZG5+z+gFOkXxZ4LQZtUV780=; b=rCWF6xN6nxe44JiFZ+rR4L+Ux/dJqB06aUxPXoaaVLKRbSkV/x/6dV9tWyPHkmsqeCuZ1U PWz1JDA57MMKW2TmP77s5To+rH/WbTqmHKNK3tYsMAy4G7fcNZ2uXfPzdSyj51X5W49Z7c MoBKIas1s0NT0fS9twgocM8so+GsAsP/yPC+ISR9uKEyBZotadTvAq4BHl2gJZ5mrXvdiH ZH75qOgi7jd42TgB2PArr6aod+hKO1Dx1vMeA19g8i9534Je8gS5ZxXzF06uFBUxPrmDSY PiUacF/CYVZE1eV/B3cphIr2oYREo10ulW7fOxGJdFsGVGOSYUfwfhPAFDx0ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686245570; 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; bh=uMqn/lxf16T13ZDfqjUrZG5+z+gFOkXxZ4LQZtUV780=; b=ik/9oZZeGxUFOSpd8ZkUrw7r1/iyZ3vkUD1ilAdhjnmwApTzRXR7i+sNCJXWl8FaALyfBd /WmwgB7cj11MRx6xfITf7j6Hx9umP+IpblvzTaeaCpJbx5ERS6gyDYxnctFDNMr0E6PKM5 rs/E0vcKd07lzgb4lj5xGZsx6cVGXaDXGVk0wAFnRpHALQ78d0f9mxbNtrUZG+L7Iyl/OY s/nNRpC5VbPtRHpxM2UDUlxViZXLb+0TPsnAm7NcSlljxhetcJhM/fRYicvTXhBlt2nzzK mva06nWFAQZYqKfVUroaqBT/mJMb1ONTq7cpmmqIS+PayiDqEBpa1duTuIdCBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686245570; a=rsa-sha256; cv=none; b=kiQ+IABDmeIZI9TAOgt+3D/z5DFvgnEfAd+OruvSG6NhcNb3+s2WSp1tL2pagn8Orf3xtI eYGwfxDPIe125tBFTkEA+0Grwzmq9HuXdYMaMf24YfwBFQBEknh5cpksTeX9Sj6j3b447+ NQGr37n0tvBqCYNlh69VcFepZMEGj7xRCgee+/cHtMJ3Dsi2QURVKX1XmYuL60r9vPnVJy yIkkME0JauOvTx3oHgGUDAe4EbBY/LEsy233sq119aQyq5Tr2mwoF4vliWz0MxJvoIsAH0 QG2R/RQUlqCAx1BRUzMrh89CZrMdV9n6AZZPNJvLmtbDYoaBVnS94I/mMGh60Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4QcWWQ0frbz12WB; Thu, 8 Jun 2023 17:32:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 358HWovm064923; Thu, 8 Jun 2023 17:32:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 358HWn5q064922; Thu, 8 Jun 2023 17:32:49 GMT (envelope-from git) Date: Thu, 8 Jun 2023 17:32:49 GMT Message-Id: <202306081732.358HWn5q064922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: ee67461e5682 - main - tpcdump: Update to 4.99.4 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee67461e56828dd1f8de165947ba83f6d9148a87 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=ee67461e56828dd1f8de165947ba83f6d9148a87 commit ee67461e56828dd1f8de165947ba83f6d9148a87 Merge: f40cd16bfda4 51a183021fce Author: Joseph Mingrone AuthorDate: 2023-06-08 17:30:54 +0000 Commit: Joseph Mingrone CommitDate: 2023-06-08 17:30:54 +0000 tpcdump: Update to 4.99.4 Local changes: - Update some local modifications to fix build - Synch config.h with upstream as much as possible Changelog: https://git.tcpdump.org/tcpdump/blob/55bc126b0216cfe409b8d6bd378f65679d136ddf:/CHANGES Reviewed by: emaste Obtained from: https://www.tcpdump.org/release/tcpdump-4.99.4.tar.gz Sponsored by: The FreeBSD Foundation contrib/tcpdump/CHANGES | 289 +- contrib/tcpdump/CMakeLists.txt | 1371 ++++++++ contrib/tcpdump/CONTRIBUTING | 151 - contrib/tcpdump/CONTRIBUTING.md | 191 ++ contrib/tcpdump/CREDITS | 149 +- contrib/tcpdump/{INSTALL.txt => INSTALL.md} | 61 +- contrib/tcpdump/LICENSE | 6 +- contrib/tcpdump/Makefile.in | 230 +- contrib/tcpdump/PLATFORMS | 16 - contrib/tcpdump/README | 1 - contrib/tcpdump/README.md | 100 +- contrib/tcpdump/VERSION | 2 +- contrib/tcpdump/addrtoname.c | 493 +-- contrib/tcpdump/addrtoname.h | 86 +- contrib/tcpdump/addrtostr.c | 12 +- contrib/tcpdump/af.c | 4 +- contrib/tcpdump/af.h | 2 +- contrib/tcpdump/ah.h | 46 +- contrib/tcpdump/appletalk.h | 60 +- contrib/tcpdump/ascii_strcasecmp.c | 6 +- contrib/tcpdump/atime.awk | 2 +- contrib/tcpdump/bpf_dump.c | 5 +- contrib/tcpdump/chdlc.h | 2 +- contrib/tcpdump/checksum.c | 10 +- contrib/tcpdump/cmake/Modules/FindCRYPTO.cmake | 24 + contrib/tcpdump/cmake/Modules/FindPCAP.cmake | 462 +++ contrib/tcpdump/cmake/Modules/FindSMI.cmake | 24 + contrib/tcpdump/cmake_uninstall.cmake.in | 21 + contrib/tcpdump/cmakeconfig.h.in | 290 ++ contrib/tcpdump/compiler-tests.h | 196 ++ contrib/tcpdump/config.guess | 1516 +++++---- contrib/tcpdump/config.h.in | 170 +- contrib/tcpdump/config.sub | 1705 +++++----- contrib/tcpdump/configure | 3794 +++++++++++---------- contrib/tcpdump/configure.ac | 508 +-- contrib/tcpdump/cpack.c | 103 +- contrib/tcpdump/cpack.h | 33 +- contrib/tcpdump/diag-control.h | 186 + contrib/tcpdump/doc/README.NetBSD.md | 22 + contrib/tcpdump/doc/README.Win32.md | 200 ++ contrib/tcpdump/doc/README.aix.md | 17 + contrib/tcpdump/doc/README.solaris.md | 41 + contrib/tcpdump/ethertype.h | 32 +- contrib/tcpdump/extract.h | 754 ++++- contrib/tcpdump/{ether.h => fptype.c} | 35 +- contrib/tcpdump/fptype.h | 34 + contrib/tcpdump/ftmacros.h | 127 + contrib/tcpdump/funcattrs.h | 110 +- contrib/tcpdump/getservent.h | 67 + contrib/tcpdump/gmpls.c | 4 +- contrib/tcpdump/gmt2local.c | 66 - contrib/tcpdump/gmt2local.h | 25 - contrib/tcpdump/in_cksum.c | 12 +- contrib/tcpdump/interface.h | 18 +- contrib/tcpdump/ip.h | 6 +- contrib/tcpdump/ip6.h | 91 +- contrib/tcpdump/ipproto.c | 10 +- contrib/tcpdump/ipproto.h | 15 +- contrib/tcpdump/l2vpn.c | 8 +- contrib/tcpdump/machdep.c | 24 +- contrib/tcpdump/missing/datalinks.c | 2 +- contrib/tcpdump/missing/dlnames.c | 5 +- contrib/tcpdump/missing/getopt_long.c | 30 +- contrib/tcpdump/{ => missing}/getopt_long.h | 6 +- contrib/tcpdump/missing/getservent.c | 143 + contrib/tcpdump/missing/pcap_dump_ftell.c | 46 + contrib/tcpdump/missing/snprintf.c | 119 +- contrib/tcpdump/missing/strlcat.c | 8 +- contrib/tcpdump/missing/strlcpy.c | 8 +- contrib/tcpdump/missing/strsep.c | 6 +- contrib/tcpdump/mkdep | 50 +- contrib/tcpdump/mpls.h | 6 +- contrib/tcpdump/nameser.h | 187 +- contrib/tcpdump/netdissect-alloc.c | 64 + contrib/tcpdump/netdissect-alloc.h | 32 + contrib/tcpdump/netdissect-ctype.h | 56 + contrib/tcpdump/netdissect-stdinc.h | 375 +- contrib/tcpdump/netdissect.c | 159 +- contrib/tcpdump/netdissect.h | 597 ++-- contrib/tcpdump/nfs.h | 169 +- contrib/tcpdump/nfsfh.h | 2 +- contrib/tcpdump/nlpid.c | 4 +- contrib/tcpdump/ntp.c | 74 + contrib/tcpdump/{vfprintf.c => ntp.h} | 58 +- contrib/tcpdump/openflow.h | 51 +- contrib/tcpdump/ospf.h | 154 +- contrib/tcpdump/oui.c | 33 +- contrib/tcpdump/oui.h | 32 +- contrib/tcpdump/parsenfsfh.c | 162 +- contrib/tcpdump/pcap_dump_ftell.c | 31 - contrib/tcpdump/pflog.h | 152 + contrib/tcpdump/ppp.h | 8 +- contrib/tcpdump/print-802_11.c | 1769 +++++----- contrib/tcpdump/print-802_15_4.c | 2603 +++++++++++++- contrib/tcpdump/print-ah.c | 57 +- contrib/tcpdump/print-ahcp.c | 283 +- contrib/tcpdump/print-aodv.c | 388 ++- contrib/tcpdump/print-aoe.c | 257 +- contrib/tcpdump/print-ap1394.c | 46 +- contrib/tcpdump/print-arcnet.c | 162 +- contrib/tcpdump/print-arista.c | 165 + contrib/tcpdump/print-arp.c | 261 +- contrib/tcpdump/print-ascii.c | 126 +- contrib/tcpdump/print-atalk.c | 462 +-- contrib/tcpdump/print-atm.c | 193 +- contrib/tcpdump/print-babel.c | 504 ++- contrib/tcpdump/print-bcm-li.c | 130 + contrib/tcpdump/print-beep.c | 23 +- contrib/tcpdump/print-bfd.c | 215 +- contrib/tcpdump/print-bgp.c | 4326 +++++++++++++----------- contrib/tcpdump/print-bootp.c | 569 ++-- contrib/tcpdump/print-brcmtag.c | 151 + contrib/tcpdump/print-bt.c | 44 +- contrib/tcpdump/print-calm-fast.c | 52 +- contrib/tcpdump/print-carp.c | 37 +- contrib/tcpdump/print-cdp.c | 596 ++-- contrib/tcpdump/print-cfm.c | 310 +- contrib/tcpdump/print-chdlc.c | 94 +- contrib/tcpdump/print-cip.c | 47 +- contrib/tcpdump/print-cnfp.c | 456 +-- contrib/tcpdump/print-dccp.c | 365 +- contrib/tcpdump/print-decnet.c | 680 ++-- contrib/tcpdump/print-dhcp6.c | 373 +- contrib/tcpdump/print-domain.c | 941 ++++-- contrib/tcpdump/print-dsa.c | 219 ++ contrib/tcpdump/print-dtp.c | 86 +- contrib/tcpdump/print-dvmrp.c | 341 +- contrib/tcpdump/print-eap.c | 277 +- contrib/tcpdump/print-egp.c | 224 +- contrib/tcpdump/print-eigrp.c | 472 +-- contrib/tcpdump/print-enc.c | 94 +- contrib/tcpdump/print-esp.c | 544 +-- contrib/tcpdump/print-ether.c | 496 ++- contrib/tcpdump/print-fddi.c | 93 +- contrib/tcpdump/print-forces.c | 761 ++--- contrib/tcpdump/print-fr.c | 386 +-- contrib/tcpdump/print-frag6.c | 38 +- contrib/tcpdump/print-ftp.c | 11 +- contrib/tcpdump/print-geneve.c | 81 +- contrib/tcpdump/print-geonet.c | 123 +- contrib/tcpdump/print-gre.c | 210 +- contrib/tcpdump/print-hncp.c | 331 +- contrib/tcpdump/print-hsrp.c | 88 +- contrib/tcpdump/print-http.c | 11 +- contrib/tcpdump/print-icmp.c | 523 +-- contrib/tcpdump/print-icmp6.c | 1383 ++++---- contrib/tcpdump/print-igmp.c | 232 +- contrib/tcpdump/print-igrp.c | 126 +- contrib/tcpdump/print-ip-demux.c | 231 ++ contrib/tcpdump/print-ip.c | 575 +--- contrib/tcpdump/print-ip6.c | 413 ++- contrib/tcpdump/print-ip6opts.c | 188 +- contrib/tcpdump/print-ipcomp.c | 31 +- contrib/tcpdump/print-ipfc.c | 50 +- contrib/tcpdump/print-ipnet.c | 51 +- contrib/tcpdump/print-ipoib.c | 125 + contrib/tcpdump/print-ipx.c | 193 +- contrib/tcpdump/print-isakmp.c | 1425 ++++---- contrib/tcpdump/print-isoclns.c | 2757 ++++++++------- contrib/tcpdump/print-juniper.c | 823 +++-- contrib/tcpdump/print-krb.c | 113 +- contrib/tcpdump/print-l2tp.c | 303 +- contrib/tcpdump/print-lane.c | 52 +- contrib/tcpdump/print-ldp.c | 304 +- contrib/tcpdump/print-lisp.c | 158 +- contrib/tcpdump/print-llc.c | 124 +- contrib/tcpdump/print-lldp.c | 651 ++-- contrib/tcpdump/print-lmp.c | 601 ++-- contrib/tcpdump/print-loopback.c | 81 +- contrib/tcpdump/print-lspping.c | 546 ++- contrib/tcpdump/print-lwapp.c | 172 +- contrib/tcpdump/print-lwres.c | 428 ++- contrib/tcpdump/print-m3ua.c | 96 +- contrib/tcpdump/print-macsec.c | 256 ++ contrib/tcpdump/print-medsa.c | 196 -- contrib/tcpdump/print-mobile.c | 35 +- contrib/tcpdump/print-mobility.c | 170 +- contrib/tcpdump/print-mpcp.c | 146 +- contrib/tcpdump/print-mpls.c | 108 +- contrib/tcpdump/print-mptcp.c | 279 +- contrib/tcpdump/print-msdp.c | 64 +- contrib/tcpdump/print-msnlb.c | 27 +- contrib/tcpdump/print-nflog.c | 177 +- contrib/tcpdump/print-nfs.c | 1419 ++++---- contrib/tcpdump/print-nsh.c | 233 +- contrib/tcpdump/print-ntp.c | 473 ++- contrib/tcpdump/print-null.c | 45 +- contrib/tcpdump/print-olsr.c | 285 +- contrib/tcpdump/print-openflow-1.0.c | 2478 ++++++-------- contrib/tcpdump/print-openflow-1.3.c | 1209 +++++++ contrib/tcpdump/print-openflow.c | 214 +- contrib/tcpdump/print-ospf.c | 773 ++--- contrib/tcpdump/print-ospf6.c | 515 ++- contrib/tcpdump/print-otv.c | 36 +- contrib/tcpdump/print-pflog.c | 188 +- contrib/tcpdump/print-pfsync.c | 136 +- contrib/tcpdump/print-pgm.c | 543 ++- contrib/tcpdump/print-pim.c | 667 ++-- contrib/tcpdump/print-pktap.c | 94 +- contrib/tcpdump/print-ppi.c | 108 +- contrib/tcpdump/print-ppp.c | 869 ++--- contrib/tcpdump/print-pppoe.c | 81 +- contrib/tcpdump/print-pptp.c | 731 ++-- contrib/tcpdump/print-ptp.c | 634 ++++ contrib/tcpdump/print-radius.c | 881 ++++- contrib/tcpdump/print-raw.c | 12 +- contrib/tcpdump/print-realtek.c | 248 ++ contrib/tcpdump/print-resp.c | 114 +- contrib/tcpdump/print-rip.c | 425 ++- contrib/tcpdump/print-ripng.c | 125 +- contrib/tcpdump/print-rpki-rtr.c | 147 +- contrib/tcpdump/print-rrcp.c | 129 - contrib/tcpdump/print-rsvp.c | 1179 ++++--- contrib/tcpdump/print-rt6.c | 96 +- contrib/tcpdump/print-rtsp.c | 11 +- contrib/tcpdump/print-rx.c | 1411 ++++---- contrib/tcpdump/print-sctp.c | 382 +-- contrib/tcpdump/print-sflow.c | 725 ++-- contrib/tcpdump/print-sip.c | 8 +- contrib/tcpdump/print-sl.c | 161 +- contrib/tcpdump/print-sll.c | 316 +- contrib/tcpdump/print-slow.c | 363 +- contrib/tcpdump/print-smb.c | 759 ++--- contrib/tcpdump/print-smtp.c | 11 +- contrib/tcpdump/print-snmp.c | 399 ++- contrib/tcpdump/print-someip.c | 142 + contrib/tcpdump/print-ssh.c | 99 + contrib/tcpdump/print-stp.c | 349 +- contrib/tcpdump/print-sunatm.c | 26 +- contrib/tcpdump/print-sunrpc.c | 85 +- contrib/tcpdump/print-symantec.c | 52 +- contrib/tcpdump/print-syslog.c | 72 +- contrib/tcpdump/print-tcp.c | 508 +-- contrib/tcpdump/print-telnet.c | 81 +- contrib/tcpdump/print-tftp.c | 71 +- contrib/tcpdump/print-timed.c | 111 +- contrib/tcpdump/print-tipc.c | 181 +- contrib/tcpdump/print-token.c | 94 +- contrib/tcpdump/print-udld.c | 115 +- contrib/tcpdump/print-udp.c | 563 +-- contrib/tcpdump/print-unsupported.c | 34 + contrib/tcpdump/print-usb.c | 186 +- contrib/tcpdump/print-vjc.c | 34 +- contrib/tcpdump/print-vqp.c | 107 +- contrib/tcpdump/print-vrrp.c | 101 +- contrib/tcpdump/print-vsock.c | 262 ++ contrib/tcpdump/print-vtp.c | 181 +- contrib/tcpdump/print-vxlan-gpe.c | 67 +- contrib/tcpdump/print-vxlan.c | 41 +- contrib/tcpdump/print-wb.c | 365 +- contrib/tcpdump/print-whois.c | 31 + contrib/tcpdump/print-zep.c | 181 + contrib/tcpdump/print-zephyr.c | 128 +- contrib/tcpdump/print-zeromq.c | 83 +- contrib/tcpdump/print.c | 411 ++- contrib/tcpdump/print.h | 5 +- contrib/tcpdump/rpc_auth.h | 11 +- contrib/tcpdump/rpc_msg.h | 24 +- contrib/tcpdump/rpl.h | 174 - contrib/tcpdump/setsignal.c | 90 - contrib/tcpdump/setsignal.h | 25 - contrib/tcpdump/signature.c | 26 +- contrib/tcpdump/slcompress.h | 4 +- contrib/tcpdump/smb.h | 6 +- contrib/tcpdump/smbutil.c | 535 +-- contrib/tcpdump/status-exit-codes.h | 32 + contrib/tcpdump/stime.awk | 2 +- contrib/tcpdump/strtoaddr.c | 20 +- contrib/tcpdump/tcp.h | 29 +- contrib/tcpdump/tcpdump.1.in | 364 +- contrib/tcpdump/tcpdump.c | 1232 +++++-- contrib/tcpdump/timeval-operations.h | 23 +- contrib/tcpdump/udp.h | 118 +- contrib/tcpdump/util-print.c | 614 ++-- contrib/tcpdump/varattrs.h | 59 + usr.sbin/tcpdump/tcpdump/Makefile | 25 +- usr.sbin/tcpdump/tcpdump/config.h | 208 +- 277 files changed, 47688 insertions(+), 32990 deletions(-) diff --cc contrib/tcpdump/CMakeLists.txt index 000000000000,9495b5d4c234..9495b5d4c234 mode 000000,100644..100644 --- a/contrib/tcpdump/CMakeLists.txt +++ b/contrib/tcpdump/CMakeLists.txt diff --cc contrib/tcpdump/CONTRIBUTING.md index 000000000000,000000000000..26f226ebd973 new file mode 100644 --- /dev/null +++ b/contrib/tcpdump/CONTRIBUTING.md @@@ -1,0 -1,0 +1,191 @@@ ++# Some Information for Contributors ++Thank you for considering to make a contribution to tcpdump! Please use the ++guidelines below to achieve the best results and experience for everyone. ++ ++## How to report bugs and other problems ++**To report a security issue (segfault, buffer overflow, infinite loop, arbitrary ++code execution etc) please send an e-mail to security@tcpdump.org, do not use ++the bug tracker!** ++ ++To report a non-security problem (failure to compile, incorrect output in the ++protocol printout, missing support for a particular protocol etc) please check ++first that it reproduces with the latest stable release of tcpdump and the latest ++stable release of libpcap. If it does, please check that the problem reproduces ++with the current git master branch of tcpdump and the current git master branch of ++libpcap. If it does (and it is not a security-related problem, otherwise see ++above), please navigate to the ++[bug tracker](https://github.com/the-tcpdump-group/tcpdump/issues) ++and check if the problem has already been reported. If it has not, please open ++a new issue and provide the following details: ++ ++* tcpdump and libpcap version (`tcpdump --version`) ++* operating system name and version and any other details that may be relevant ++ (`uname -a`, compiler name and version, CPU type etc.) ++* custom `configure`/`cmake` flags, if any ++* statement of the problem ++* steps to reproduce ++ ++Please note that if you know exactly how to solve the problem and the solution ++would not be too intrusive, it would be best to contribute some development time ++and to open a pull request instead as discussed below. ++ ++Still not sure how to do? Feel free to ++[subscribe to the mailing list](https://www.tcpdump.org/#mailing-lists) ++and ask! ++ ++ ++## How to add new code and to update existing code ++ ++0) Check that there isn't a pull request already opened for the changes you ++ intend to make. ++ ++1) [Fork](https://help.github.com/articles/fork-a-repo/) the Tcpdump ++ [repository](https://github.com/the-tcpdump-group/tcpdump). ++ ++2) The easiest way to test your changes on multiple operating systems and ++ architectures is to let the upstream CI test your pull request (more on ++ this below). ++ ++3) Setup your git working copy ++ ``` ++ git clone https://github.com//tcpdump.git ++ cd tcpdump ++ git remote add upstream https://github.com/the-tcpdump-group/tcpdump ++ git fetch upstream ++ ``` ++ ++4) Do a `touch .devel` in your working directory. ++ Currently, the effect is ++ * add (via `configure`, in `Makefile`) some warnings options (`-Wall`, ++ `-Wmissing-prototypes`, `-Wstrict-prototypes`, ...) to the compiler if it ++ supports these options, ++ * have the `Makefile` support `make depend` and the `configure` script run it. ++ ++5) Configure and build ++ ``` ++ ./configure && make -s && make check ++ ``` ++ ++6) Add/update tests ++ The `tests` directory contains regression tests of the dissection of captured ++ packets. Those captured packets were saved running tcpdump with option ++ `-w sample.pcap`. Additional options, such as `-n`, are used to create relevant ++ and reproducible output; `-#` is used to indicate which particular packets ++ have output that differs. The tests are run with the `TZ` environment ++ variable set to `GMT0`, so that UTC, rather than the local time where the ++ tests are being run, is used when "local time" values are printed. The ++ actual test compares the current text output with the expected result ++ (`sample.out`) saved from a previous version. ++ ++ Any new/updated fields in a dissector must be present in a `sample.pcap` file ++ and the corresponding output file. ++ ++ Configuration is set in `tests/TESTLIST`. ++ Each line in this file has the following format: ++ ``` ++ test-name sample.pcap sample.out tcpdump-options ++ ``` ++ ++ The `sample.out` file can be produced as follows: ++ ``` ++ (cd tests && TZ=GMT0 ../tcpdump -# -n -r sample.pcap tcpdump-options > sample.out) ++ ``` ++ ++ Or, for convenience, use `./update-test.sh test-name` ++ ++ It is often useful to have test outputs with different verbosity levels ++ (none, `-v`, `-vv`, `-vvv`, etc.) depending on the code. ++ ++7) Test using `make check` (current build options) and `./build_matrix.sh` ++ (a multitude of build options, build systems and compilers). If you can, ++ test on more than one operating system. Don't send a pull request until ++ all tests pass. ++ ++8) Try to rebase your commits to keep the history simple. ++ ``` ++ git fetch upstream ++ git rebase upstream/master ++ ``` ++ (If the rebase fails and you cannot resolve, issue `git rebase --abort` ++ and ask for help in the pull request comment.) ++ ++9) Once 100% happy, put your work into your forked repository using `git push`. ++ ++10) [Initiate and send](https://help.github.com/articles/using-pull-requests/) ++ a pull request. ++ This will trigger the upstream repository CI tests. ++ ++ ++## Code style and generic remarks ++* A thorough reading of some other printers code is useful. ++ ++* Put the normative reference if any as comments (RFC, etc.). ++ ++* Put the format of packets/headers/options as comments if there is no ++ published normative reference. ++ ++* The printer may receive incomplete packet in the buffer, truncated at any ++ random position, for example by capturing with `-s size` option. ++ If your code reads and decodes every byte of the protocol packet, then to ++ ensure proper and complete bounds checks it would be sufficient to read all ++ packet data using the `GET_*()` macros, typically: ++ ``` ++ GET_U_1(p) ++ GET_S_1(p) ++ GET_BE_U_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } ++ GET_BE_S_n(p), n in { 2, 3, 4, 5, 6, 7, 8 } ++ ``` ++ If your code uses the macros above only on some packet data, then the gaps ++ would have to be bounds-checked using the `ND_TCHECK_*()` macros: ++ ``` ++ ND_TCHECK_n(p), n in { 1, 2, 3, 4, 5, 6, 7, 8, 16 } ++ ND_TCHECK_SIZE(p) ++ ND_TCHECK_LEN(p, l) ++ ``` ++ For the `ND_TCHECK_*` macros (if not already done): ++ * Assign: `ndo->ndo_protocol = "protocol";` ++ * Define: `ND_LONGJMP_FROM_TCHECK` before including `netdissect.h` ++ * Make sure that the intersection of `GET_*()` and `ND_TCHECK_*()` is minimal, ++ but at the same time their union covers all packet data in all cases. ++ ++ You can test the code via: ++ ``` ++ sudo ./tcpdump -s snaplen [-v][v][...] -i lo # in a terminal ++ sudo tcpreplay -i lo sample.pcap # in another terminal ++ ``` ++ You should try several values for snaplen to do various truncation. ++ ++* Do invalid packet checks in code: Think that your code can receive in input ++ not only a valid packet but any arbitrary random sequence of octets (packet ++ * built malformed originally by the sender or by a fuzz tester, ++ * became corrupted in transit or for some other reason). ++ ++ Print with: `nd_print_invalid(ndo); /* to print " (invalid)" */` ++ ++* Use `struct tok` for indexed strings and print them with ++ `tok2str()` or `bittok2str()` (for flags). ++ ++* Avoid empty lines in output of printers. ++ ++* A commit message must have: ++ ``` ++ First line: Capitalized short summary in the imperative (50 chars or less) ++ ++ If the commit concerns a protocol, the summary line must start with ++ "protocol: ". ++ ++ Body: Detailed explanatory text, if necessary. Fold it to approximately ++ 72 characters. There must be an empty line separating the summary from ++ the body. ++ ``` ++ ++* Avoid non-ASCII characters in code and commit messages. ++ ++* Use the style of the modified sources. ++ ++* Don't mix declarations and code. ++ ++* Don't use `//` for comments. ++ Not all C compilers accept C++/C99 comments by default. ++ ++* Avoid trailing tabs/spaces diff --cc contrib/tcpdump/LICENSE index dea5f7d54d6b,000000000000..a10474d54aeb mode 100644,000000..100644 --- a/contrib/tcpdump/LICENSE +++ b/contrib/tcpdump/LICENSE @@@ -1,19 -1,0 +1,19 @@@ +License: BSD - ++ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: - ++ + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + 3. The names of the authors may not be used to endorse or promote + products derived from this software without specific prior + written permission. - ++ +THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --cc contrib/tcpdump/README.md index a1fba9bca6d4,000000000000..566b7b7a874f mode 100644,000000..100644 --- a/contrib/tcpdump/README.md +++ b/contrib/tcpdump/README.md @@@ -1,225 -1,0 +1,225 @@@ - # tcpdump ++# TCPDUMP 4.x.y by [The Tcpdump Group](https://www.tcpdump.org/) + - [![Build - Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump) - - To report a security issue please send an e-mail to security@tcpdump.org. ++**To report a security issue please send an e-mail to security@tcpdump.org.** + +To report bugs and other problems, contribute patches, request a - feature, provide generic feedback etc please see the file - CONTRIBUTING in the tcpdump source tree root. - - TCPDUMP 4.x.y - Now maintained by "The Tcpdump Group" - See www.tcpdump.org ++feature, provide generic feedback etc please see the ++[guidelines for contributing](CONTRIBUTING.md) in the tcpdump source tree root. + - Anonymous Git is available via: ++Anonymous Git is available via + - git clone git://bpf.tcpdump.org/tcpdump - - formerly from Lawrence Berkeley National Laboratory - Network Research Group - ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4) ++ https://github.com/the-tcpdump-group/tcpdump.git + +This directory contains source code for tcpdump, a tool for network - monitoring and data acquisition. This software was originally - developed by the Network Research Group at the Lawrence Berkeley - National Laboratory. The original distribution is available via - anonymous ftp to `ftp.ee.lbl.gov`, in `tcpdump.tar.Z`. More recent - development is performed at tcpdump.org, http://www.tcpdump.org/ ++monitoring and data acquisition. + ++Over the past few years, tcpdump has been steadily improved by the ++excellent contributions from the Internet community (just browse ++through the [change log](CHANGES)). We are grateful for all the input. ++ ++### Supported platforms ++In many operating systems tcpdump is available as a native package or port, ++which simplifies installation of updates and long-term maintenance. However, ++the native packages are sometimes a few versions behind and to try a more ++recent snapshot it will take to compile tcpdump from the source code. ++ ++tcpdump compiles and works on at least the following platforms: ++ ++* AIX ++* DragonFly BSD ++* FreeBSD ++* Haiku ++* HP-UX 11i ++* illumos (OmniOS, OpenIndiana) ++* GNU/Linux ++* {Mac} OS X / macOS ++* NetBSD ++* OpenBSD ++* OpenWrt ++* Solaris ++* Windows (requires WinPcap or Npcap, and Visual Studio with CMake) ++ ++### Dependency on libpcap +Tcpdump uses libpcap, a system-independent interface for user-level +packet capture. Before building tcpdump, you must first retrieve and - build libpcap, also originally from LBL and now being maintained by - tcpdump.org; see http://www.tcpdump.org/ . ++build libpcap. + +Once libpcap is built (either install it or make sure it's in - `../libpcap`), you can build tcpdump using the procedure in the `INSTALL.txt` - file. ++`../libpcap`), you can build tcpdump using the procedure in the ++[installation notes](INSTALL.md). + ++### Origins of tcpdump +The program is loosely based on SMI's "etherfind" although none of the +etherfind code remains. It was originally written by Van Jacobson as - part of an ongoing research project to investigate and improve tcp and - internet gateway performance. The parts of the program originally ++part of an ongoing research project to investigate and improve TCP and ++Internet gateway performance. The parts of the program originally +taken from Sun's etherfind were later re-written by Steven McCanne of +LBL. To insure that there would be no vestige of proprietary code in +tcpdump, Steve wrote these pieces from the specification given by the +manual entry, with no access to the source of tcpdump or etherfind. ++```text ++formerly from Lawrence Berkeley National Laboratory ++ Network Research Group ++ ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4) ++``` + - Over the past few years, tcpdump has been steadily improved by the - excellent contributions from the Internet community (just browse - through the `CHANGES` file). We are grateful for all the input. - ++### See also +Richard Stevens gives an excellent treatment of the Internet protocols +in his book *"TCP/IP Illustrated, Volume 1"*. If you want to learn more +about tcpdump and how to interpret its output, pick up this book. + - Some tools for viewing and analyzing tcpdump trace files are available - from the Internet Traffic Archive: - - * http://www.sigcomm.org/ITA/ - - Another tool that tcpdump users might find useful is tcpslice: - - * https://github.com/the-tcpdump-group/tcpslice - ++Another tool that tcpdump users might find useful is ++[tcpslice](https://github.com/the-tcpdump-group/tcpslice). +It is a program that can be used to extract portions of tcpdump binary - trace files. See the above distribution for further details and - documentation. - - Current versions can be found at www.tcpdump.org. - - - The TCPdump team - - original text by: Steve McCanne, Craig Leres, Van Jacobson ++trace files. + - ------------------------------------- ++### The original LBL README by Steve McCanne, Craig Leres and Van Jacobson +``` +This directory also contains some short awk programs intended as +examples of ways to reduce tcpdump data when you're tracking +particular network problems: + +send-ack.awk + Simplifies the tcpdump trace for an ftp (or other unidirectional + tcp transfer). Since we assume that one host only sends and + the other only acks, all address information is left off and + we just note if the packet is a "send" or an "ack". + + There is one output line per line of the original trace. + Field 1 is the packet time in decimal seconds, relative + to the start of the conversation. Field 2 is delta-time + from last packet. Field 3 is packet type/direction. + "Send" means data going from sender to receiver, "ack" + means an ack going from the receiver to the sender. A + preceding "*" indicates that the data is a retransmission. + A preceding "-" indicates a hole in the sequence space + (i.e., missing packet(s)), a "#" means an odd-size (not max + seg size) packet. Field 4 has the packet flags + (same format as raw trace). Field 5 is the sequence + number (start seq. num for sender, next expected seq number + for acks). The number in parens following an ack is + the delta-time from the first send of the packet to the + ack. A number in parens following a send is the + delta-time from the first send of the packet to the + current send (on duplicate packets only). Duplicate + sends or acks have a number in square brackets showing + the number of duplicates so far. + + Here is a short sample from near the start of an ftp: + 3.00 0.20 send . 512 + 3.20 0.20 ack . 1024 (0.20) + 3.20 0.00 send P 1024 + 3.40 0.20 ack . 1536 (0.20) + 3.80 0.40 * send . 0 (3.80) [2] + 3.82 0.02 * ack . 1536 (0.62) [2] + Three seconds into the conversation, bytes 512 through 1023 + were sent. 200ms later they were acked. Shortly thereafter + bytes 1024-1535 were sent and again acked after 200ms. + Then, for no apparent reason, 0-511 is retransmitted, 3.8 + seconds after its initial send (the round trip time for this + ftp was 1sec, +-500ms). Since the receiver is expecting + 1536, 1536 is re-acked when 0 arrives. + +packetdat.awk + Computes chunk summary data for an ftp (or similar + unidirectional tcp transfer). [A "chunk" refers to + a chunk of the sequence space -- essentially the packet + sequence number divided by the max segment size.] + + A summary line is printed showing the number of chunks, + the number of packets it took to send that many chunks + (if there are no lost or duplicated packets, the number + of packets should equal the number of chunks) and the + number of acks. + + Following the summary line is one line of information + per chunk. The line contains eight fields: + 1 - the chunk number + 2 - the start sequence number for this chunk + 3 - time of first send + 4 - time of last send + 5 - time of first ack + 6 - time of last ack + 7 - number of times chunk was sent + 8 - number of times chunk was acked + (all times are in decimal seconds, relative to the start + of the conversation.) + + As an example, here is the first part of the output for + an ftp trace: + + # 134 chunks. 536 packets sent. 508 acks. + 1 1 0.00 5.80 0.20 0.20 4 1 + 2 513 0.28 6.20 0.40 0.40 4 1 + 3 1025 1.16 6.32 1.20 1.20 4 1 + 4 1561 1.86 15.00 2.00 2.00 6 1 + 5 2049 2.16 15.44 2.20 2.20 5 1 + 6 2585 2.64 16.44 2.80 2.80 5 1 + 7 3073 3.00 16.66 3.20 3.20 4 1 + 8 3609 3.20 17.24 3.40 5.82 4 11 + 9 4097 6.02 6.58 6.20 6.80 2 5 + + This says that 134 chunks were transferred (about 70K + since the average packet size was 512 bytes). It took + 536 packets to transfer the data (i.e., on the average + each chunk was transmitted four times). Looking at, + say, chunk 4, we see it represents the 512 bytes of + sequence space from 1561 to 2048. It was first sent + 1.86 seconds into the conversation. It was last + sent 15 seconds into the conversation and was sent + a total of 6 times (i.e., it was retransmitted every + 2 seconds on the average). It was acked once, 140ms + after it first arrived. + +stime.awk +atime.awk + Output one line per send or ack, respectively, in the form +