From nobody Mon Mar 27 16:11:25 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Pld9Q1T6Tz41jvt; Mon, 27 Mar 2023 16:11:38 +0000 (UTC) (envelope-from melifaro@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pld9Q1Kcwz4HRX; Mon, 27 Mar 2023 16:11:38 +0000 (UTC) (envelope-from melifaro@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679933498; 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=eKz3UtOLQFcDr1puMu8EOCEO+tpQRGNiEAs/vPvBzkE=; b=UaiFNbgUdYUJD5ftStJJpA8Mf7BAAz8p/9HTuqsWYOmdxfRe0NSZfoZZrJPil5dXuoXXVV dRdPJqJNUbxEGxDjwebg7nWsXOVyE+nk2zRyvoevfam5I+c0yQ3J0FjQu2tday9+BeBSfe XwB3KcigRd3FMs+WqQFCisP7yIXAknp787bL6wvVVja/v+jdsFBK9cOh6OmQ8243wSNQUA Y5FDWzqI6rmSiTxtBMuYwhq5OwnxcItvDc9BnbIY453KWNr6ivJijSlcjoNBjlPDrZEFN3 la0BW5197LdnZDHCJcT65B4bmeqxd7TVAARByk7nDDAxtVhwqWQUpOLfK1UggA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679933498; 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=eKz3UtOLQFcDr1puMu8EOCEO+tpQRGNiEAs/vPvBzkE=; b=tDCv9WER4iVb7CcBuF+4wMIHtoUmcE3QPrLWAbXgv/uSzxr9DCiSG16eJKalNx7S5v6zWK e9hxGrSXw9SPe3Uf+EsayXVCXGZudA6Z80CeBPCRf87z1v0iPDnS2zAwdzhF+Rjs0Wy9oU v0Qq8liEXn3KNKgMIr/anUccmhTgEnJw/jskt2X2UVsPFjcaEYPnkQytwIde98e8jCbCn3 KN7XddQ4OFKbqzKWVWjU0bzID8WMEZVNzngl7RNAOQJchQVEZltPdvuFFO/cVj9FRynYyt +LAic5p7UIQdok7hME5OCjpvtQJHMNsCsFnyxPBRToLs0V0nUV7tJQo7ao/DjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679933498; a=rsa-sha256; cv=none; b=GJO2m1XciikefqwJtuK6vnZr8PUjqE5NBu4BASI1xZ+a8zDWhHw7fnXuzlfJm9D3NRK7h9 w1MqvBZ7NFG2UYChlQwfC0aWkp3egBe3z2HYotSF30DaRB1OB5zO0Y1Sy1l3mV0ItmRU0A Mjnyj0GeN5po09E4g5M1nwEAzG1PISEfka/QMsxSBpx2k46MlQgfMFQLjaJEo/g9PctI2c r/1U068NCFn4wu+5DF5zX4kTskuEd1wK1rzsnGs75eFkx/NQw5BrvJwFNkHfi79mqmTKvY g4cktCaSV/E+vdr8sGJglehBmpD7glUx9MFfwYWXDZHEaH/PYxu+AD39RwxS6Q== Received: from smtpclient.apple (unknown [IPv6:2a02:8084:d6bb:510:198e:52cc:ae4c:3466]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: melifaro/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Pld9P34DNzFtb; Mon, 27 Mar 2023 16:11:37 +0000 (UTC) (envelope-from melifaro@freebsd.org) From: Alexander Chernikov Message-Id: <4C61BC36-8977-48A6-9A51-EB6D415DB4CB@freebsd.org> Content-Type: multipart/alternative; boundary="Apple-Mail=_6EA743A0-4A9D-41C1-9DDD-C211E8A11347" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Re: git: 19e43c163c64 - main - netlink: add netlink KPI to the kernel by default Date: Mon, 27 Mar 2023 17:11:25 +0100 In-Reply-To: <20230327153934.6lghvi7cnqodhig3@mutt-hbsd> Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" To: Shawn Webb References: <202303271355.32RDtqJ9006858@gitrepo.freebsd.org> <20230327153934.6lghvi7cnqodhig3@mutt-hbsd> X-Mailer: Apple Mail (2.3731.400.51.1.1) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_6EA743A0-4A9D-41C1-9DDD-C211E8A11347 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 27 Mar 2023, at 16:39, Shawn Webb = wrote: >=20 > On Mon, Mar 27, 2023 at 01:55:52PM +0000, Alexander V. Chernikov = wrote: >> The branch main has been updated by melifaro: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D19e43c163c64636d2590dca006e22f18= d22f48b2 >>=20 >> commit 19e43c163c64636d2590dca006e22f18d22f48b2 >> Author: Alexander V. Chernikov >> AuthorDate: 2023-03-27 11:59:30 +0000 >> Commit: Alexander V. Chernikov >> CommitDate: 2023-03-27 13:55:44 +0000 >>=20 >> netlink: add netlink KPI to the kernel by default >>=20 >> This change does the following: >>=20 >> Base Netlink KPIs (ability to register the family, parse and/or >> write a Netlink message) are always present in the kernel. = Specifically, >> * Implementation of genetlink family/group registration/removal, >> some base accessors (netlink_generic_kpi.c, 260 LoC) are = compiled in >> unconditionally. >> * Basic TLV parser functions (netlink_message_parser.c, 507 LoC) = are >> compiled in unconditionally. >> * Glue functions (netlink<>rtsock), malloc/core sysctl definitions >> (netlink_glue.c, 259 LoC) are compiled in unconditionally. >> * The rest of the KPI _functions_ are defined in the = netlink_glue.c, >> but their implementation calls a pointer to either the stub = function >> or the actual function, depending on whether the module is loaded = or not. >>=20 >> This approach allows to have only 1k LoC out of ~3.7k LoC (current >> sys/netlink implementation) in the kernel, which will not grow = further. >> It also allows for the generic netlink kernel customers to load >> successfully without requiring Netlink module and operate = correctly >> once Netlink module is loaded. >>=20 >> Reviewed by: imp >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D39269 >> --- >> sys/conf/files | 4 +- >> sys/conf/options | 2 +- >> sys/modules/carp/Makefile | 2 +- >> sys/modules/netlink/Makefile | 6 +- >> sys/net/route.c | 19 --- >> sys/netinet/ip_carp.c | 2 + >> sys/netlink/netlink_ctl.h | 10 +- >> sys/netlink/netlink_domain.c | 24 --- >> sys/netlink/netlink_generic.c | 282 = +++-------------------------------- >> sys/netlink/netlink_generic_kpi.c | 279 = ++++++++++++++++++++++++++++++++++ >> sys/netlink/netlink_io.c | 2 + >> sys/netlink/netlink_message_writer.c | 22 +-- >> sys/netlink/netlink_message_writer.h | 86 +++++++++++ >> sys/netlink/netlink_module.c | 26 +++- >> sys/netlink/netlink_var.h | 44 ++++++ >> sys/netlink/route/iface.c | 2 + >> sys/netlink/route/neigh.c | 2 + >> sys/netlink/route/nexthop.c | 2 + >> sys/netlink/route/rt.c | 2 + >> 19 files changed, 497 insertions(+), 321 deletions(-) >>=20 >> diff --git a/sys/conf/files b/sys/conf/files >> index 629283f7c071..94cd7135b277 100644 >> --- a/sys/conf/files >> +++ b/sys/conf/files >> @@ -4424,10 +4424,12 @@ netipsec/xform_ipcomp.c optional = ipsec inet | ipsec inet6 >> netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ >> ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | = \ >> ipsec_support inet6 tcp_signature >> +netlink/netlink_generic_kpi.c standard >> +netlink/netlink_glue.c standard >=20 > It appears netlink/netlink_glue.c was missed from this commit: Sorry for the breakage, should be fixed in d3a49f62a284. >=20 > cc: error: no such file or directory: = '/usr/src/sys/netlink/netlink_glue.c' > cc: error: no input files >=20 > Thanks, >=20 > --=20 > Shawn Webb > Cofounder / Security Engineer > HardenedBSD >=20 > = https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03= A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --Apple-Mail=_6EA743A0-4A9D-41C1-9DDD-C211E8A11347 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

On 27 Mar 2023, at 16:39, Shawn Webb = <shawn.webb@hardenedbsd.org> wrote:

On Mon, Mar 27, 2023 at 01:55:52PM +0000, = Alexander V. Chernikov wrote:
The branch main = has been updated by melifaro:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3D19e43c163c64636d2590dca006e22f18= d22f48b2

commit = 19e43c163c64636d2590dca006e22f18d22f48b2
Author: =     Alexander V. Chernikov = <melifaro@FreeBSD.org>
AuthorDate: 2023-03-27 11:59:30 = +0000
Commit:     Alexander V. Chernikov = <melifaro@FreeBSD.org>
CommitDate: 2023-03-27 13:55:44 = +0000

   netlink: add netlink KPI to the kernel by = default

   This change does the = following:

   Base Netlink KPIs (ability to = register the family, parse and/or
    write a = Netlink message) are always present in the kernel. = Specifically,
   * Implementation of genetlink = family/group registration/removal,
     some = base accessors (netlink_generic_kpi.c, 260 LoC) are compiled = in
     unconditionally.
   = * Basic TLV parser functions (netlink_message_parser.c, 507 LoC) = are
     compiled in = unconditionally.
   * Glue functions = (netlink<>rtsock), malloc/core sysctl = definitions
    (netlink_glue.c, 259 LoC) are = compiled in unconditionally.
   * The rest of the KPI = _functions_ are defined in the = netlink_glue.c,
    but their implementation = calls a pointer to either the stub = function
    or the actual function, depending on = whether the module is loaded or not.

   This = approach allows to have only 1k LoC out of ~3.7k LoC = (current
    sys/netlink implementation) in the = kernel, which will not grow further.
   It also allows = for the generic netlink kernel customers to = load
    successfully without requiring Netlink = module and operate correctly
    once Netlink = module is loaded.

   Reviewed by: =    imp
   MFC after: =      2 weeks
   Differential = Revision: =  https://reviews.freebsd.org/D39269
---
sys/conf/files =             &n= bsp;         | =   4 +-
sys/conf/options =             &n= bsp;       |   2 = +-
sys/modules/carp/Makefile =            | =   2 +-
sys/modules/netlink/Makefile =         |   6 = +-
sys/net/route.c =             &n= bsp;        |  19 = ---
sys/netinet/ip_carp.c =             &n= bsp;  |   2 +
sys/netlink/netlink_ctl.h =            | =  10 +-
sys/netlink/netlink_domain.c =         |  24 = ---
sys/netlink/netlink_generic.c =        | 282 = +++--------------------------------
sys/netlink/netlink_generic_kpi.c =    | 279 = ++++++++++++++++++++++++++++++++++
sys/netlink/netlink_io.c =             | =   2 +
sys/netlink/netlink_message_writer.c |  22 = +--
sys/netlink/netlink_message_writer.h |  86 = +++++++++++
sys/netlink/netlink_module.c =         |  26 = +++-
sys/netlink/netlink_var.h =            | =  44 ++++++
sys/netlink/route/iface.c =            | =   2 +
sys/netlink/route/neigh.c =            | =   2 +
sys/netlink/route/nexthop.c =          |   2 = +
sys/netlink/route/rt.c =             &n= bsp; |   2 +
19 files changed, 497 insertions(+), 321 = deletions(-)

diff --git a/sys/conf/files = b/sys/conf/files
index 629283f7c071..94cd7135b277 100644
--- = a/sys/conf/files
+++ b/sys/conf/files
@@ -4424,10 +4424,12 @@ = netipsec/xform_ipcomp.c optional ipsec inet | ipsec = inet6
netipsec/xform_tcp.c optional ipsec inet tcp_signature = | \
=  ipsec inet6 = tcp_signature | ipsec_support inet tcp_signature | \
 ipsec_support inet6 = tcp_signature
+netlink/netlink_generic_kpi.c = standard
+netlink/netlink_glue.c standard

It appears netlink/netlink_glue.c was = missed from this commit:
Sorry for the breakage, = should be fixed in d3a49f62a284.

cc: error: no such file = or directory: '/usr/src/sys/netlink/netlink_glue.c'
cc: error: no input files

Thanks,

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_W= ebb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc

= --Apple-Mail=_6EA743A0-4A9D-41C1-9DDD-C211E8A11347--