From nobody Fri Mar 15 17:33:25 2024 X-Original-To: dev-commits-src-branches@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 4TxBDf6SCrz5Dpmc for ; Fri, 15 Mar 2024 17:33:38 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::1]) (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 "hmo.in-vpn.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TxBDd5kd6z4qHT for ; Fri, 15 Mar 2024 17:33:37 +0000 (UTC) (envelope-from freebsd@oldach.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=freebsd@oldach.net Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.18.1/8.18.1) with ESMTPS id 42FHXPMx046236 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 15 Mar 2024 18:33:25 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.18.1/8.18.1) id 42FHXPrI046235; Fri, 15 Mar 2024 18:33:25 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202403151733.42FHXPrI046235@nuc.oldach.net> Subject: Re: git: db4429d00f0d - stable/13 - linux: require vnet(9) context in ifname_bsd_to_linux_name() In-Reply-To: <202403111612.42BGCrZd000296@gitrepo.freebsd.org> from Gleb Smirnoff at "11 Mar 2024 16:12:53" To: glebius@FreeBSD.org (Gleb Smirnoff) Date: Fri, 15 Mar 2024 18:33:25 +0100 (CET) Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: freebsd@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Fri, 15 Mar 2024 18:33:25 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.976]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_NO_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[dev-commits-src-branches@FreeBSD.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[oldach.net]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4TxBDd5kd6z4qHT Gleb Smirnoff wrote on Mon, 11 Mar 2024 17:12:53 +0100 (CET): > The branch stable/13 has been updated by glebius: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddb4429d00f0d95a1532f8707f8= b828a744586dc7 >=20 > commit db4429d00f0d95a1532f8707f8b828a744586dc7 > Author: Gleb Smirnoff > AuthorDate: 2024-03-03 20:56:58 +0000 > Commit: Gleb Smirnoff > CommitDate: 2024-03-11 16:12:36 +0000 >=20 > linux: require vnet(9) context in ifname_bsd_to_linux_name() > =20 > This function is used by netlink(9) only. The netlink(9) taskqueue t= hread > runs in the vnet of the socket whose request the thread is processing > right now. This is a correct vnet and resetting it to vnet0 is incor= rect. > If the function is to be used by any other caller in addition to > netlink(9), it would be caller's responsiblity to provide correct vne= t(9). > =20 > Reviewed by: melifaro, dchagin > Differential Revision: https://reviews.freebsd.org/D44191 > PR: 277286 > =20 > (cherry picked from commit 2f5a315b307447f91891c96fb23c7333fa406f2f) > --- > sys/compat/linux/linux.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c > index 6191372b6312..141fa715c7c1 100644 > --- a/sys/compat/linux/linux.c > +++ b/sys/compat/linux/linux.c > @@ -250,14 +250,14 @@ ifname_bsd_to_linux_name(const char *bsdname, char = *lxname, size_t len) > struct ifnet *ifp; > int ret; > =20 > + CURVNET_ASSERT_SET(); > + > ret =3D 0; > - CURVNET_SET(TD_TO_VNET(curthread)); > NET_EPOCH_ENTER(et); > ifp =3D ifunit(bsdname); > if (ifp !=3D NULL) > ret =3D ifname_bsd_to_linux_ifp(ifp, lxname, len); > NET_EPOCH_EXIT(et); > - CURVNET_RESTORE(); > return (ret); > } This bails out when option VIMAGE is not included: =3D=3D=3D> linux (all) =3D=3D=3D> linux64 (all) =3D=3D=3D> linux_common (all) cc -target x86_64-unknown-freebsd13.3 --sysroot=3D/usr/obj/usr/src/amd64.am= d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common = -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -DKLD_TIED -nostdinc = -DHAVE_KERNEL_OPTION_HEADERS -i= nclude /usr/obj/usr/src/amd64.amd64/sys/HMO/opt_global.h -I. -I/usr/src/sys= -I/usr/src/sys/contrib/ck/include -fno-common -g -fno-omit-frame-pointer -= mno-omit-leaf-frame-pointer -fdebug-prefix-map=3D./machine=3D/usr/src/sys/a= md64/include -fdebug-prefix-map=3D.= /x86=3D/usr/src/sys/x86/include -I/usr/obj/usr/src/amd64.amd64/sys/HMO = -MD -MF.depend.linux.o -MTlinux.o -mcmodel=3Dkernel -mno-red-zone -mno-mmx= -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwr= apv -fstack-protector -Wall -Wstr= ict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wn= o-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -f= diagnostics-show-option -Wno-unknown-pragmas -Wno-error=3Dtautological-comp= are -Wno-error=3Dempty-body -Wno-er= ror=3Dparentheses-equality -Wno-error=3Dunused-function -Wno-error=3Dpointe= r-sign -Wno-error=3Dshift-negative-value -Wno-address-of-packed-member -Wno= -error=3Darray-parameter -Wno-error=3Ddeprecated-non-prototype -Wno-error= =3Dstrict-prototypes -Wno-error=3Dunused-but-se= t-variable -Wno-error=3Dunused-but-set-variable -Wno-format-zero-length -= mno-aes -mno-avx -std=3Diso9899:1999 -c /usr/src/sys/compat/linux/linux.c = -o linux.o /usr/src/sys/compat/linux/linux.c:253:2: error: call to undeclared function= 'CURVNET_ASSERT_SET'; ISO C99 and later do not support implicit function d= eclarations [-Werror,-Wimplicit-function-declaration] 253 | CURVNET_ASSERT_SET(); | ^ 1 error generated. *** Error code 1 Stop. make[4]: stopped in /usr/src/sys/modules/linux_common *** Error code 1 Stop. make[3]: stopped in /usr/src/sys/modules *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/HMO *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src IMHO same behaviour with 14. Kind regards Helge