From owner-freebsd-hackers@freebsd.org Sun Apr 18 08:17:15 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAD985DFD26 for ; Sun, 18 Apr 2021 08:17:15 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) (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 4FNN8p16yQz4sjK; Sun, 18 Apr 2021 08:17:13 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (v-critter.freebsd.dk [192.168.55.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by phk.freebsd.dk (Postfix) with ESMTPS id 472B78928F; Sun, 18 Apr 2021 08:17:06 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.16.1/8.16.1) with ESMTPS id 13I8H5hV076860 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 18 Apr 2021 08:17:06 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.16.1/8.16.1/Submit) id 13I8H33q076857; Sun, 18 Apr 2021 08:17:03 GMT (envelope-from phk) To: Enji Cooper cc: Gleb Popov , Yoshihiro Ota , freebsd-hackers Subject: Re: How do I write test cases for interactive commands? In-reply-to: From: "Poul-Henning Kamp" References: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <76855.1618733822.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Sun, 18 Apr 2021 08:17:03 +0000 Message-ID: <76856.1618733823@critter.freebsd.dk> X-Rspamd-Queue-Id: 4FNN8p16yQz4sjK X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of phk@critter.freebsd.dk designates 130.225.244.222 as permitted sender) smtp.mailfrom=phk@critter.freebsd.dk X-Spamd-Result: default: False [-1.99 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[phk]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.dk]; RBL_DBL_DONT_QUERY_IPS(0.00)[130.225.244.222:from]; SPAMHAUS_ZRD(0.00)[130.225.244.222:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.989]; RBL_SENDERSCORE_FAIL(0.00)[130.225.244.222:server fail]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:1835, ipnet:130.225.0.0/16, country:EU]; MIME_TRACE(0.00)[0:+]; FROM_NEQ_ENVFROM(0.00)[phk@phk.freebsd.dk,phk@critter.freebsd.dk]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 08:17:15 -0000 -------- Enji Cooper writes: > > Take a look at LLVM testing infrastructure and specifically the = > llvm-lit > > tool. > > Does their test infrastructure leverage GoogleTest? If so, then the bulk= = > majority of the work would just be integrating it into Kyua. > Cheers, > -Enji Given that pretty much any software to come out of Google is usually pretty overweight, in particular on dependencies: In the V(arnish)Test tool we built a facility for interactive and curses-based tests using teken, (which we got from FreeBSD): https://github.com/vtest/VTest The code for that sub-part lives in: https://github.com/vtest/VTest/blob/master/src/vtc_process.c Here is a typical test-case using it: https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishtest= /tests/u00008.vtc The verbose output from that test can be seen here: http://phk.freebsd.dk/misc/u00008.txt V(arnish)Test is a modular program, and if you leave out all the HTTP related modules, and substitute 'sbuf' for 'vsb', and "TAILQ" for "VT= AILQ" it would fit nicely into FreeBSD. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-freebsd-hackers@freebsd.org Sun Apr 18 10:47:12 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C68A65E48CF for ; Sun, 18 Apr 2021 10:47:12 +0000 (UTC) (envelope-from n7w@delta.emu.st) Received: from f3.bushwire.net (f3.bushwire.net [203.0.120.11]) by mx1.freebsd.org (Postfix) with ESMTP id 4FNRTq0pZvz3HJm for ; Sun, 18 Apr 2021 10:47:10 +0000 (UTC) (envelope-from n7w@delta.emu.st) Received: by f3.bushwire.net (Postfix, from userid 1001) id 8C2F33AE9B; Sun, 18 Apr 2021 20:47:00 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=emu.st; s=2019; t=1618742820; bh=qVlQ/V+rqEKcswlPgbYXfZYQLI8=; h=Comments:Received:From:Comments:Message-ID:Content-Type:To: Subject:Mime-Version:Content-Disposition:Date; b=KBsVxYGmyCNDHbFmEgtTHMGWdukDDOJqrgQYUbmQ5A3boXLMQmWu+dZbO59A44GuH WtOWefltdh2jpRsobwEkN9UZZo5h3Is+Wq54eOlEBmHJdIAnHfYTSUU9Y8s93ZOgLG zQB1Xsg93xYNV5YInCQ8X/rPJF8GN/1+iuyEVisI=EVisI= Comments: QMDA 0.3a Received: (qmail 42282 invoked by uid 1001); 18 Apr 2021 10:47:00 -0000 From: "Mark Delany" Comments: QMDASubmit submit() 0.2.0-final Message-ID: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> Content-Type: text/plain; charset=utf-8 To: freebsd-hackers@freebsd.org Subject: Various problems with 13.0 amd64 on vultr.com Mime-Version: 1.0 Content-Disposition: inline Date: Sun, 18 Apr 2021 10:47:00 +0000 X-Rspamd-Queue-Id: 4FNRTq0pZvz3HJm X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=emu.st header.s=2019 header.b=KBsVxYGm; dmarc=none; spf=pass (mx1.freebsd.org: domain of n7w@delta.emu.st designates 203.0.120.11 as permitted sender) smtp.mailfrom=n7w@delta.emu.st X-Spamd-Result: default: False [1.02 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[emu.st]; NEURAL_SPAM_MEDIUM(0.89)[0.892]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[203.0.120.11:from:127.0.2.255]; R_SPF_ALLOW(-0.20)[+ip4:203.0.120.0/24]; DKIM_TRACE(0.00)[emu.st:-]; NEURAL_HAM_SHORT(-0.07)[-0.071]; R_DKIM_REJECT(1.00)[emu.st:s=2019]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.0.120.11:from]; ASN(0.00)[asn:4764, ipnet:203.0.120.0/24, country:AU]; MAILMAN_DEST(0.00)[freebsd-hackers] X-Mailman-Approved-At: Sun, 18 Apr 2021 15:52:21 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 10:47:12 -0000 Hi all. I rarely if ever post here so if there's a better place, LMK. I've been running 12.2 on vultr.com instances for a long time without any issues. However I recently attempted an upgrade to 13.0 and the system now exhibits a number of issues. The most critical issue is that the system randomly wedged after running for a while (anywhere from 10 minutes to a couple of hours) requiring a reboot to recover. No console response or messages and limited network response (see below). No messages logged anywhere as best I can tell. The second issue is more annoying than critical: the system doesn't reboot with the reboot/shutdown commands. The shutdown sequence seems to complete but the reboot never occurs. I compiled and ran a "reboot(RB_AUTOBOOT | RB_VERBOSE)" but nothing interesting showed up. I have no idea whether the two issues are related excepting that neither occur with 12.2 Some details: - I first upgraded with freebsd-update and then tried with a fresh ISO image and completely overwrote the original file system. - I've tried both UFS and ZFS root file systems. - I tried with a fresh VM instance in case there was some sort of per-instance glitch - The system is 99% idle with no memory pressure. It normally runs nsd, openntpd and a few other processes installed via pkg, but nothing wierd as best I can tell. - it has no kernel modules manually loaded - It's configured with ipv4 and ipv6 and when it gets wedged I get a ping response from the ipv6 address, but not from ipv4. Furthermore, if I try a tcp connection to ipv6 I get a connection setup, but no data. - The VM is configured as a single-CPU system - I haven't raised the issue with vultr yet. Thought I'd see what the hive-mind thinks first. Not that it will surprise anyone, but I recently spun up 13.0 in Virtualbox on a lab machine as well as on a different VM provider without any problems, so it's probably something relatively unique to vultr. That this is a virtually idle system on a single CPU with no oddball or unusual kernel modules or network configs makes the situation surprising to me. There is no pattern that I'm yet able to discern. The main thing I have left to try is to boot the system without any networking activated, but apart from that I'm out of ideas in terms of identifying the root cause. So my questions are: 1. Anyone else having the same issue? Or not having the same issue? 2. Clues on how to diagnose? This is a non-critical system so I can try anything that anyone suggests but I'm not particularly familiar with kernel-level debugging so a bit of hand-holding might be needed if you have suggestions. For those unfamiliar with vultr's VMs, here's the first part of dmesg: FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) VT(vga): text 80x25 CPU: Intel Xeon Processor (Cascadelake) (2993.02-MHz K8-class CPU) Origin="GenuineIntel" Id=0x50656 Family=0x6 Model=0x55 Stepping=6 Features=0x783fbff Features2=0xfffa3203 AMD Features=0x2c100800 AMD Features2=0x21 Structured Extended Features=0xd18307a9 Structured Extended Features2=0x808 Structured Extended Features3=0xa4000000 XSAVE Features=0x1 IA32_ARCH_CAPS=0x2b Hypervisor: Origin = "KVMKVMKVM" real memory = 1073741824 (1024 MB) avail memory = 997744640 (951 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: random: registering fast source Intel Secure Key RNG random: fast provider: "Intel Secure Key RNG" random: unblocking device. ioapic0 irqs 0-23 Timecounter "TSC-low" frequency 1496510010 Hz quality 800 in case it shows up anything odd to those who can decode this sort of stuff. Mark. From owner-freebsd-hackers@freebsd.org Sun Apr 18 18:53:42 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 257035F16E1 for ; Sun, 18 Apr 2021 18:53:42 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNfH92rTQz4QmS for ; Sun, 18 Apr 2021 18:53:41 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: by mail-qk1-x72a.google.com with SMTP id d15so20899144qkc.9 for ; Sun, 18 Apr 2021 11:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:date:message-id :references:in-reply-to:subject:to; bh=a9aQygPswOhV2ki/fr+DPEd9kKYiqrpEUqLUp3yCyJU=; b=OK8qqrvh0Re9nDV/1pfThFIqluJCtXft1U37YZB6jQ8G6m5vyGreCaB8UsZkGmKWyK Km5UG452/z6KF2zCdqEW5keW6UOCl86WFejW9srQnrdyfuqfzSHzDwlw6Zt0Yj8Fe02f YwrxKJtVQqWQCw6WY9pmGyAAXPYAj9UuBeLQ18BCGx4WeEsQ1ujEhHW4rQwP9OFF/0GT aHkYQtWpCBZ2suKE43irzTOMadfIZhmrWkxR+5B9SHSq0oUGa+WIB44rIhW25O79JxwI MPsjPxgZRRDZ/Xk0JGbu9hA1Y/SOnjWlntu0plaJbHtEwUgIqVtbhr6AlX4miKYOGHob X3Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version:date :message-id:references:in-reply-to:subject:to; bh=a9aQygPswOhV2ki/fr+DPEd9kKYiqrpEUqLUp3yCyJU=; b=CdfwF+5FdYfZfFhVAdKjxxDKnPiUYZ0cXReJ6nEGfwF8+ZtY+e956jLdZVLZgmf+G3 eRe4p+2fNjeNW2J+SNe+4Bh1vHOwKQhxBMNgx6okQuHhcMinsqCGIZUGaVwV7BeZR75b MJXVH46CiIIuzkw+imaWR9hPoj166ezraYIt5aPpZ6FhODm1XyfPzSmVM3HmrNyKHvXN l/dfxmuKykaotvf/edDOEDPA6crXd9n6xn8iGL0KttA2eBshNnjbDsgw119yMBeB077F 9jsHJugmlb1eIkUlO9uORJxrorHoltom1ljzP8dLDvpGJRK4fJi5pF5uTKSPaSJJVto9 zaGg== X-Gm-Message-State: AOAM5331YTLIt7bsrSf1GqceZ4LysjIwOsj7AYU7bEEMS+ZicgHnaIQn nz7xXhUlSaRfzzABHQi0mCM5WumDPtU= X-Google-Smtp-Source: ABdhPJy8xtlZUjliqAFgrWd/Pp+WYmEfNHOjMVychA+kzhb4Dbneuy+LZP5oKVXe6ftuGE5GSG/lGg== X-Received: by 2002:a37:953:: with SMTP id 80mr8848700qkj.43.1618772020193; Sun, 18 Apr 2021 11:53:40 -0700 (PDT) Received: from ?IPv6:2804:389:1059:2519:10e0:67ed:2490:5874? ([2804:389:1059:2519:10e0:67ed:2490:5874]) by smtp.gmail.com with ESMTPSA id k26sm8420279qkg.120.2021.04.18.11.53.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Apr 2021 11:53:39 -0700 (PDT) From: =?utf-8?Q?Lucas_Nali_de_Magalh=C3=A3es?= Mime-Version: 1.0 (1.0) Date: Sun, 18 Apr 2021 15:53:37 -0300 Message-Id: <4AF3D639-FB07-46B5-9058-114576BD4EDB@gmail.com> References: In-Reply-To: Subject: Re: Debugging signal 11 To: freebsd-hackers@freebsd.org X-Mailer: iPhone Mail (18D70) X-Rspamd-Queue-Id: 4FNfH92rTQz4QmS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=OK8qqrvh; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rollingbits@gmail.com designates 2607:f8b0:4864:20::72a as permitted sender) smtp.mailfrom=rollingbits@gmail.com X-Spamd-Result: default: False [-2.68 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.80)[-0.804]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.62)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::72a:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::72a:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72a:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 18:53:42 -0000 Hi. There are a few problems after the end of your email. I inlined them. > On Apr 16, 2021, at 8:51 PM, Johannes Totz wrote: > My init(8) is crashing with a signal 11. Crossing with the end, init is the mother of all processes. A longer explanation is in the man page you cited, even. An explanation of signal 11 can be found by googling it and also in https://www.cyberciti.biz/tips/segmentation-fault-on-linux-unix.html a text I found googling. Short story: init is well tested, so it must be hardware f= ault. > I've added a breakpoint() in kern_sig.c: >=20 > static int > issignal(struct thread *td) > { > // [snip] >=20 > case (intptr_t)SIG_DFL: > /* > * Don't take default actions on system processes. > */ > if (p->p_pid <=3D 1) { > #ifdef DIAGNOSTIC > /* > * Are you sure you want to ignore SIGSEGV > * in init? XXX > */ > printf("Process (pid %lu) got signal %d\n", > (u_long)p->p_pid, sig); >=20 > breakpoint(); // added by me > #endif > break; /* =3D=3D ignore */ > } >=20 > // [snip] > } >=20 > That breaks to DDB where I can call dump. So far so good. This also isn't the usual. Debugging a running process is possible but the process you used is the wrong one. Debugging init, OTOH, is a completely different story: init is the first process and is the most important process of any unix. The actual command varies from debugger to debugger but in gdb, "attach pid" may do the trick for you. You will need to be extra cautious because of you are aiming init. Ideally, init is the process supposed to catch the signals and keep the system running. So a break into it may cause your system to crash. > But how do I get back to the stack(trace) and instruction that caused the s= egv? Either in DDB or KGDB? "bt" is a shortcut for "backtrace" and is the command to get a stack trace in gdb. BTW, "attach" and "bt" are two of the most basic debugger commands. --=20 rollingbits =E2=80=94 =F0=9F=93=A7 rollingbits@icloud.com =F0=9F=93=A7 rolli= ngbits@gmail.com =F0=9F=93=A7 rollingbits@yahoo.com =F0=9F=93=A7 rollingbits= @terra.com.br =F0=9F=93=A7 rollingbits@globo.com= From owner-freebsd-hackers@freebsd.org Sun Apr 18 19:18:04 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AA3215F1F45 for ; Sun, 18 Apr 2021 19:18:04 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound5c.ore.mailhop.org (outbound5c.ore.mailhop.org [54.244.192.240]) (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 4FNfqJ1H63z4RhK for ; Sun, 18 Apr 2021 19:18:03 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1618773483; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=MJc/Va5xdL2ZsZFriNSzFe4fvIUymmG87sTICKKssbBGklegvxDFs/eT3sZ/5j33FWLM94mEBW1vJ MCMlpZypU+OD1U0zLcjEr3uCL5dqaW5GMs0hw7d53A7tronJRPk8OcFxDg4VN2JarKrhYk8F6TZg/0 zoROZfswZDh0cJF0HH9k7CSeM3d7t8DHqcr9L3/xsSuReHisWwvRGK3chnLxJUTC97leMEvt/2pmLw CYoxLFNJyk/AasQUab5a6ZyEhrWHSZX3aQ3T2RD+hJQTOGkma/iRjh7DSguEDZ958EJ+AIG1VhGCGt eIQrcPK2kYmQzEWJKzzSQ6zAEOaL05w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=5TonFhlQAE37qSM/rJm5tddBGrmOCkiAgIamAXTGP4Q=; b=gSAsHz8r/eAdAQfSBkS2ukuRbvUD2eeu7aTDdQEXd174ojr7mLMw0lXK2BtA5xAA+xFZ2CacV+YZ1 0qJEkvccdzbhHXLxEzIXBHa4dhCv6bDtPnWZd3Dc9nwPV/ZxRET6fmJJzRApIyxntUHpi/LMov14jU peXpo9iZqpzuOEDDQrtoacZ+90d7On1VLRbyQ2/+KJkLi0KEo688W0U5fQ8uf6CB9GB8bh89Fx+Jyx CuS4q/btJiEJPx8Z+1bcE4uxgJ2RNgBm6DPRHVnS+dqQB8QLC6vfeYp9Pk/B1CGu9K2nND6CioD8U4 3UDp/UhLm3I6aZI/Cd9Ef8vAYo1efdg== ARC-Authentication-Results: i=1; outbound3.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=5TonFhlQAE37qSM/rJm5tddBGrmOCkiAgIamAXTGP4Q=; b=IJwjaIgNMAN+cHb+Z+Z5PKzE0R2Ds4CEuqVaZNhahA/WptCdUui7cD1mIRv+tXK6JS3vhQSbcIPQN KmeLbX4zXGWJO66a0Rd5Kpy8wyE6uEnxqnM7tUksf3F/xZQ2GeT9fdTajyBpYUmBtnMgw5HsFkU14o im2+PkLBl/spkqEBmN3x7g+Bl2UbGq4Q9VOMr2fbHybrN2Il8TL7nIiYr6q8qvdyK4a8ouuwR1vpcJ umjLgn43yNrqYO05mIv15XzWYkwjjDpCAj3epe3qOODIh96/VJ96CF32h2pBhI2NKAg0xwdessBjWg bPYJ31b58IogH439egEEf2nVdIU7InA== X-Originating-IP: 67.177.211.60 X-MHO-RoutePath: aGlwcGll X-MHO-User: ca52ff16-a07a-11eb-bcab-bf9d68d023b6 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound3.ore.mailhop.org (Halon) with ESMTPSA id ca52ff16-a07a-11eb-bcab-bf9d68d023b6; Sun, 18 Apr 2021 19:18:01 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 13IJI0DX040501; Sun, 18 Apr 2021 13:18:00 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> Subject: Re: Debugging signal 11 From: Ian Lepore To: Lucas Nali de =?ISO-8859-1?Q?Magalh=E3es?= , freebsd-hackers@freebsd.org Date: Sun, 18 Apr 2021 13:18:00 -0600 In-Reply-To: <4AF3D639-FB07-46B5-9058-114576BD4EDB@gmail.com> References: <4AF3D639-FB07-46B5-9058-114576BD4EDB@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FNfqJ1H63z4RhK X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.244.128.0/17, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 19:18:04 -0000 On Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalhães wrote: > This also isn't the usual. Debugging a running process is possible but > the process you used is the wrong one. Debugging init, OTOH, is a > completely different story: init is the first process and is the most > important process of any unix. The actual command varies from > debugger to debugger but in gdb, "attach pid" may do the trick for > you. You will need to be extra cautious because of you are aiming init. > Ideally, init is the process supposed to catch the signals and keep > the system running. So a break into it may cause your system to crash. Given that it is init that is segfaulting, how to you propose that the OP lauch gdb in order to do an attach to init? In other words: there is a reason the OP is trying to use the kernel debugger to examine what's going on here. -- Ian From owner-freebsd-hackers@freebsd.org Sun Apr 18 19:38:04 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F19685F2F8F for ; Sun, 18 Apr 2021 19:38:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNgGN17QYz4SkD for ; Sun, 18 Apr 2021 19:38:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x834.google.com with SMTP id h7so24678784qtx.3 for ; Sun, 18 Apr 2021 12:38:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=iupV75rehO0WDpVDNmJzzyu9LclZMqmuzYqLKVPBZ3E=; b=y0SZpzT84f3qmb7oIE+l5xkvV4eMRdOiPvL1HwWbjlMBMosVTqWZKWFlsNJrEP2vMX sErtuEriEVKre6TRcGutZZvp/jutDCQnGAFLchZTgBvmC2BhNNtRPITgMABaBrb7qLBr RdCOc2pTvgEbkCdwdVLnN3ZH4WMs7C0YTOW2h7SlccmGJlP4t7wsF6CuSWJtDvv18OiR zUCduJVvmlBMCHQAATJwdWaG2mK0b1uB6Fbd1O6XxAV60Xk7Ki5eKK7TNEQ3jN927LIO qlod6oMobuS+49K4rxf8hSoAkOwSZP/OIgIreO1M2/vBB5HNDMd8ZNUIUQw3QVpgnpft FKrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=iupV75rehO0WDpVDNmJzzyu9LclZMqmuzYqLKVPBZ3E=; b=ZzpwDJdw6ANDyEMoSmc4lHny3Gl8LvdBqAcwya8G7ORYXAnTZQKWEssBUsPsENvqOW Rv31vaBX2G43hgO+vTCFUZs+Lvh9h8KA8Utkt5FGegy7kntYVIVNf+eD3Ru9mnqhskC/ 467q5Bsyat/+pLqh18dTCa1ZmJaQnPgwlUOFXm1MU9sBqBtgrQ27H6cPJ5x93gdARzsE 73q2TZ4W100zSAgGX9RRRQp9BSp/OkwtB+aWxO7LycRL07cMDZ8OKMtZbYge4QSVQhBb u0Zs4KdTrfUGSMF6RJerFySmwIYxb+sP/Qgs3YIcUYuuVauZXaHvyrsj8oY335EbCCvY xpfA== X-Gm-Message-State: AOAM533iO/1F7KLSy8zzUdTsQQZCmOB++zvbBjuTYyO4qj2Ms3Bne31b WVNSK2rvLRmJg9E86me/M4h1fT2N4E3+7+FqI5J1iA== X-Google-Smtp-Source: ABdhPJx9UhaRhjNFZCgOkEJr4oEqJpUM4WV/ip3mhywJxjc70CpE+XVU4iXozmfJY5ZawI1rVbh5YqHa9YSeFEpGJBQ= X-Received: by 2002:a05:622a:1c5:: with SMTP id t5mr8389514qtw.49.1618774683069; Sun, 18 Apr 2021 12:38:03 -0700 (PDT) MIME-Version: 1.0 References: <4AF3D639-FB07-46B5-9058-114576BD4EDB@gmail.com> <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> In-Reply-To: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> From: Warner Losh Date: Sun, 18 Apr 2021 13:37:50 -0600 Message-ID: Subject: Re: Debugging signal 11 To: Ian Lepore Cc: =?UTF-8?Q?Lucas_Nali_de_Magalh=C3=A3es?= , FreeBSD Hackers X-Rspamd-Queue-Id: 4FNgGN17QYz4SkD X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=y0SZpzT8; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::834) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.17 / 15.00]; RBL_SENDERSCORE_FAIL(0.00)[2607:f8b0:4864:20::834:server fail]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.14)[-0.144]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::834:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.02)[-0.022]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::834:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::834:from]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 19:38:05 -0000 On Sun, Apr 18, 2021, 1:18 PM Ian Lepore wrote: > On Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalh=C3=A3es wrote: > > This also isn't the usual. Debugging a running process is possible but > > the process you used is the wrong one. Debugging init, OTOH, is a > > completely different story: init is the first process and is the most > > important process of any unix. The actual command varies from > > debugger to debugger but in gdb, "attach pid" may do the trick for > > you. You will need to be extra cautious because of you are aiming init. > > Ideally, init is the process supposed to catch the signals and keep > > the system running. So a break into it may cause your system to crash. > > Given that it is init that is segfaulting, how to you propose that the > OP lauch gdb in order to do an attach to init? In other words: there > is a reason the OP is trying to use the kernel debugger to examine > what's going on here. > Yea. I'm seeing this too on a new, lab machine. Not sure what is going on. Since it's a new machine, I'm working through other, higher priority tasks first. For me, it's only when I try a reboot -C that I see it... normal reboot doesn't trigger it. And I don't see it on other models... Warner -- Ian > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@freebsd.org Sun Apr 18 20:06:58 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6A6F5F36D8 for ; Sun, 18 Apr 2021 20:06:58 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FNgvj6njHz4TrS for ; Sun, 18 Apr 2021 20:06:57 +0000 (UTC) (envelope-from rollingbits@gmail.com) Received: by mail-qt1-x831.google.com with SMTP id m16so24055041qtx.9 for ; Sun, 18 Apr 2021 13:06:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:in-reply-to:to; bh=BFL+0RPZtMq8mOm4NrRshzGuhm6jGk5EtLHRsjmhG9k=; b=BIiikExlKRg911V9oTPfUqUcaRizqdAEjuLYqKsWJDlRqFe6+Te7CYcxYrRqzAb/MI ueievYJKyo4dxAlnb+54HtbYRGmu0YrJzbZcpa/s/z2jds8tRjOUsF7ndpKnmwCyuhyI jnU8f0J7x/OWFqLlnRx8sO4WX2EgrGc6slYm84hVMFEtCj1FDWP8sP7knzMv6metHx+c 3rLlyuR1sdwkLVbpdXtMxG2/2R76fYr3N8mR+1ZG9mv1v5bIOiCuVsa9SCtE421JXftg 9UBrLWw1oVFDvc21QA1VxseLJxMSkeHQjOKAyiHQM9PMUWeXxZ1M1cIKcAfR2IKVsi5J 5jng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:in-reply-to:to; bh=BFL+0RPZtMq8mOm4NrRshzGuhm6jGk5EtLHRsjmhG9k=; b=lcjlWFJz64zyXNR7PhSeGMlywRWP3iUdYsy0T46zEjH/YbHG8d3BsxPYOEVcaTzYAE SdXwIoZBO6XGtum7aC/BnaaJb/1rRrSgf90Q5NmA1hu1zFFp/+QH1qLY0OEZowOodttb /7pZxwiW2yGvJUaBOVVeK4a5WmTnwqzYFhmaF2StY5yUj12IiM1QKcrbrVkxbnyPgC0H e6f8d2eXZGWxnuNbPWtOab1ZM0/VcY4sYXzDi6gL9v4zwWj48jxj4zx45Kj/Ny+na7yS d91g/rOCThX/Rs60wc+7tSCV9s3rgNIOShetVDVUUvOHfNY4q8waTKkReSzeIjwXa1IG 7XZQ== X-Gm-Message-State: AOAM532fXOSdFDsSSgV0oJbrXUxXywHqAL0PZJE0EYX4JdanZuNSsVdD NZRSkSsbwIVtTi2G6gskh4lfjpUJ278= X-Google-Smtp-Source: ABdhPJzOuePzKr9yID6o04oQECylu3TM2oEre3HL4+2JezR1jaiAVPXUf6obu2JNl05cMDhrCn01WA== X-Received: by 2002:a05:622a:486:: with SMTP id p6mr8872776qtx.98.1618776416741; Sun, 18 Apr 2021 13:06:56 -0700 (PDT) Received: from ?IPv6:2804:389:1059:2519:10e0:67ed:2490:5874? ([2804:389:1059:2519:10e0:67ed:2490:5874]) by smtp.gmail.com with ESMTPSA id i10sm7988708qko.114.2021.04.18.13.06.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 18 Apr 2021 13:06:56 -0700 (PDT) From: =?utf-8?Q?Lucas_Nali_de_Magalh=C3=A3es?= Mime-Version: 1.0 (1.0) Subject: Re: Debugging signal 11 Date: Sun, 18 Apr 2021 17:06:54 -0300 Message-Id: References: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> In-Reply-To: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> To: freebsd-hackers@freebsd.org X-Mailer: iPhone Mail (18D70) X-Rspamd-Queue-Id: 4FNgvj6njHz4TrS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=BIiikExl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of rollingbits@gmail.com designates 2607:f8b0:4864:20::831 as permitted sender) smtp.mailfrom=rollingbits@gmail.com X-Spamd-Result: default: False [-2.75 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; MV_CASE(0.50)[]; TO_DN_NONE(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.87)[-0.875]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; R_MIXED_CHARSET(0.62)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::831:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::831:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::831:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Apr 2021 20:06:58 -0000 On Apr 18, 2021, at 4:18 PM, Ian Lepore wrote: >=20 > =EF=BB=BFOn Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalh=C3=A3es w= rote: >> This also isn't the usual. Debugging a running process is possible but >> the process you used is the wrong one. Debugging init, OTOH, is a >> completely different story: init is the first process and is the most >> important process of any unix. The actual command varies from >> debugger to debugger but in gdb, "attach pid" may do the trick for >> you. You will need to be extra cautious because of you are aiming init. >> Ideally, init is the process supposed to catch the signals and keep >> the system running. So a break into it may cause your system to crash. >=20 > Given that it is init that is segfaulting, how to you propose that the > OP lauch gdb in order to do an attach to init? In other words: there > is a reason the OP is trying to use the kernel debugger to examine > what's going on here. First the OP was able to modify init. Then it was asked the command to do a stack trace. Thus the OP clearly hasn't the full knowledge of the procedure and the risks. Besides this, kgdb is based on gdb. I thought they should know. --=20 rollingbits =E2=80=94 =F0=9F=93=A7 rollingbits@icloud.com =F0=9F=93=A7 rolli= ngbits@gmail.com =F0=9F=93=A7 rollingbits@yahoo.com =F0=9F=93=A7 rollingbits= @terra.com.br =F0=9F=93=A7 rollingbits@globo.com From owner-freebsd-hackers@freebsd.org Mon Apr 19 13:04:45 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBF935F136D for ; Mon, 19 Apr 2021 13:04:45 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FP6V50nhKz3tkr; Mon, 19 Apr 2021 13:04:44 +0000 (UTC) (envelope-from arichardson.kde@gmail.com) Received: by mail-ed1-f45.google.com with SMTP id s15so40609942edd.4; Mon, 19 Apr 2021 06:04:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=VVT2jP0pA2pQ3fgpV+Nhge1aIPqo7oG6VUp+Z2ueo54=; b=puaQ+ZC7XZ9Rtv2fXo/I7NwwBEbjUibafqHFROfvCQ8LTOHRkURdIO4Drrip8izqYH boZG5bwU5c29W4ilG0r9HlixstJGBSXuo/w7HdLtIJYJqJACHUuBWH1kHJgOkbTH6z7A 0ck4lX8gVMYXt95N5WVkFBLVa6yi4w/Ofn5l7QUw9xSkzZJUJETtnHR2rCxnrQnjZpTp etQsU2WA0/q8PvFk3Cflkv6uvjj5JgyirdP7dSUfVcaH5fK6MLQLe0H41smyLe2zjFlD jn95svFX90/lWmyxmsD/gg7Wsjbg5ElRRB9utlnpregFgtRdVUSott9ybT7rrfqg8PNk eKcg== X-Gm-Message-State: AOAM532siZP7ZYYGAcXZ1XMP2VoMyQfAOteWHWuKOafCu1DNZb5mrY23 KmjhrkwrQB6BPCGW5whOcMYW6Ea/k5eOIQ== X-Google-Smtp-Source: ABdhPJzG+mYKovqZjUCJAcMb+Z0nZtf2aUD5rqSCwa/3Q+V0Wr0Vaq1a7hMpM/1Sjyh3V9cm2ImOxQ== X-Received: by 2002:a05:6402:2807:: with SMTP id h7mr25184159ede.217.1618837483222; Mon, 19 Apr 2021 06:04:43 -0700 (PDT) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com. [209.85.128.53]) by smtp.gmail.com with ESMTPSA id t14sm10357254ejc.121.2021.04.19.06.04.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Apr 2021 06:04:42 -0700 (PDT) Received: by mail-wm1-f53.google.com with SMTP id w7-20020a1cdf070000b0290125f388fb34so18028149wmg.0; Mon, 19 Apr 2021 06:04:42 -0700 (PDT) X-Received: by 2002:a1c:6808:: with SMTP id d8mr21703594wmc.147.1618837482409; Mon, 19 Apr 2021 06:04:42 -0700 (PDT) MIME-Version: 1.0 References: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp> In-Reply-To: From: Alexander Richardson Date: Mon, 19 Apr 2021 14:04:31 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: How do I write test cases for interactive commands? To: Enji Cooper Cc: Gleb Popov , Yoshihiro Ota , freebsd-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4FP6V50nhKz3tkr X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of arichardsonkde@gmail.com designates 209.85.208.45 as permitted sender) smtp.mailfrom=arichardsonkde@gmail.com X-Spamd-Result: default: False [-0.03 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SENDERSCORE_FAIL(0.00)[209.85.208.45:server fail]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[arichardson@freebsd.org,arichardsonkde@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[arichardson@freebsd.org,arichardsonkde@gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.208.45:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_SPAM_SHORT(0.97)[0.970]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SUBJECT_ENDS_QUESTION(1.00)[]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.208.45:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.45:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.45:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 13:04:45 -0000 On Sat, 17 Apr 2021 at 17:14, Enji Cooper wrote: > > > > On Apr 14, 2021, at 10:40 PM, Gleb Popov wrote: > > =E2=80=A6 > > > Take a look at LLVM testing infrastructure and specifically the llvm-li= t > > tool. > > Does their test infrastructure leverage GoogleTest? If so, then the bulk = majority of the work would just be integrating it into Kyua. > Cheers, > -Enji > If you are interested in writing tests for llvm/clang/lldb those should be submitted upstream and not be part of the FreeBSD source tree. Therefore, Kyua is almost certainly not the right solution. https://www.llvm.org/docs/TestingGuide.html explains how to write tests for LLVM, however, it is quite stale. I would suggest looking at existing tests inside LLVM and adjusting those to match what you want to test. The FreeBSD src contrib/ import does not include the extensive LLVM testsuite, so you could start by looking at https://github.com/llvm/llvm-project/tree/main/clang/test for clang and https://github.com/llvm/llvm-project/tree/main/lldb/test for LLDB. I have never looked at the LLDB tests, but as far as I know there are tests that use python to drive the interaction. Alex From owner-freebsd-hackers@freebsd.org Mon Apr 19 19:44:31 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6B905FD798 for ; Mon, 19 Apr 2021 19:44:31 +0000 (UTC) (envelope-from kfv@kfv.io) Received: from mail.kfv.io (mail.kfv.io [95.217.128.176]) (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 "kfv.io", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPHMF6nLrz4nH5 for ; Mon, 19 Apr 2021 19:44:25 +0000 (UTC) (envelope-from kfv@kfv.io) Received: from x1 ( [37.156.51.115]) by srv.kfv.io (OpenSMTPD) with ESMTPSA id eb82c8ce (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 19 Apr 2021 19:44:16 +0000 (UTC) Date: Mon, 19 Apr 2021 19:44:13 +0000 From: Faraz Vahedi To: freebsd-hackers@FreeBSD.org Subject: Review Request for D25705 and D25711 Message-ID: <20210419194413.noxvxtmxzqzoh56i@x1> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6ctylrxccflpk4pt" Content-Disposition: inline X-Rspamd-Queue-Id: 4FPHMF6nLrz4nH5 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.56 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SENDERSCORE_FAIL(0.00)[95.217.128.176:query timed out]; R_SPF_ALLOW(-0.20)[+ip4:95.217.128.176]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[kfv.io:+]; DMARC_POLICY_ALLOW(-0.50)[kfv.io,reject]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[95.217.128.176:from]; ASN(0.00)[asn:24940, ipnet:95.217.0.0/16, country:DE]; RECEIVED_SPAMHAUS_PBL(0.00)[37.156.51.115:received]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[kfv.io:s=dkim]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[95.217.128.176:from:127.0.2.255]; NEURAL_SPAM_SHORT(0.04)[0.040]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 19:44:31 -0000 --6ctylrxccflpk4pt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Dear hackers and committers, I have sent two small patches on freebsd-version(1) and freebsd-update(8), D25705 and D25711 respectively, to add -j flag for supporting jails. I think they are both somewhat ready to either land or to get some notes for improvements. They have been open since July 2020, and I know everyone is too busy. I understand the situation, but I would be very grateful if anyone could give them a review and help. I hope you are all doing well. Stay safe. Yours faithfully, Faraz --6ctylrxccflpk4pt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEER72OR2ke+5+zBDNGxovV64RZlvEFAmB93YMACgkQxovV64RZ lvHWLwf+MK7yz2zHLtsnh+AHOCa3it8MQDhTSsuNKUQ83E4dLbEIY7TEPr+h6579 VjjbVHnUUatKY+AqKae1zbaDm9VHWMYlLlGdPufrttN7oVmk1OSe7PPCDfiY9DdG aQuIm6TFY9PZOoNEsWrFh9e/TPFe1W1KkdozVfELyybSisDn6ALY7HyQAnWib6Rl XLYfWx0lhq2FjoPbGHGAnUgZ5OGAKuU9XQDFVB60LwqJnkog7PF9yArY522HLiUs unXROL75s9ZnL4hAZK7EiuYn+D0Un96vRsPPTLo23p9WMNW5oZXsk5ymb5szKy7f BcsiicA4DlX33E+4aFrW063vYxVyrQ== =97wE -----END PGP SIGNATURE----- --6ctylrxccflpk4pt-- From owner-freebsd-hackers@freebsd.org Mon Apr 19 21:22:59 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A633E5FF742 for ; Mon, 19 Apr 2021 21:22:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPKXy1t2Wz4sds; Mon, 19 Apr 2021 21:22:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pj1-x1031.google.com with SMTP id kb13-20020a17090ae7cdb02901503d67f0beso222439pjb.0; Mon, 19 Apr 2021 14:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=nXvZXZfclQ+t0BD46L30g+bO4tW5bvofLcA7K1EJAK8=; b=m8NRyU1gLrnUdr/BjdhEaCBgHTJowvsLkPxUwmBscGqiomj0xdcXi/sTuAVFjRCfLt SFCQeu+KBfdjWFD2bUPi0lt7P+T0Jnz7kYZVPukbvipNre/aTybgGlti1jBEjcomYOMU 9N3oXHVxj6Rs0AU/MyDVV9BSZlFcsGstbDe8ofByWDzNGbCSJrSqwBIKauN8cge3rI+2 uDLtEYYtdNPKkoEjq6o9Mjw5abxFwnLP2UOod45SwT/dFfIStJHYjf8whgn+O0BjuuOO OoG/NFkpUiVjJlIeLmpT2aeW8rEweR7UaPVWJkO0F546y6AhK7qRh09jLVel/d6B/Vpp 5VNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=nXvZXZfclQ+t0BD46L30g+bO4tW5bvofLcA7K1EJAK8=; b=lC4F6r8AMiY4JdQKl6m3xvFknVlX+hzVFdVYE/J2W5UKc2Pf2wazY+7TDpvO4Jz74k JBNrV/GpryHhn5gDwkICIiwIqPRBlFXNm242W9KNeU++5jMWRviMgEdCvcN25E0F+Bkr mbPiCvRPfuIF+vScaRILX+MNDbQIquq3hfeZlXP1fUC0e/eHl/l+sW1mVQOsnWlGrPYg Xdo38fxRYgg5jUjUPuOhwXrxeC8o395RgjXQ3ErbcmRQDAnqeEpK8AwaKoxhUfh3CJJQ ykmJ5qm+WbCmcmoCczn3PzV9IB6K5kqLwCi5cHc8krd3g7wOeA2Ym0NHtBxOub2olpkv aneA== X-Gm-Message-State: AOAM531oniEzCjvV4IpxbHNt94kDT60HsukgmSTUzNLISRixV/4h0VKD 25CZP4LD7Lq8xDToK9JHukeXqUSS07UaY4UQ X-Google-Smtp-Source: ABdhPJzbgWVgubs7J5FxwPDRrk1Ewjb0tx1EmpmVgDF2agWDWZsfZR2Azv4IFuaHtFXRVsSikz5Wmw== X-Received: by 2002:a17:90b:714:: with SMTP id s20mr1179787pjz.62.1618867376786; Mon, 19 Apr 2021 14:22:56 -0700 (PDT) Received: from [192.168.20.29] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id t21sm3793017pfg.211.2021.04.19.14.22.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Apr 2021 14:22:56 -0700 (PDT) From: Enji Cooper Message-Id: <23AB05ED-BF78-47CD-82B1-2CB7EB65F6B2@gmail.com> Content-Type: multipart/signed; boundary="Apple-Mail=_3E326F09-A3D5-4F1B-AA50-AC100C313AA5"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: How do I write test cases for interactive commands? Date: Mon, 19 Apr 2021 14:22:54 -0700 In-Reply-To: Cc: Gleb Popov , Yoshihiro Ota , freebsd-hackers To: Alexander Richardson References: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FPKXy1t2Wz4sds X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=m8NRyU1g; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of yaneurabeya@gmail.com designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=yaneurabeya@gmail.com X-Spamd-Result: default: False [-4.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SENDERSCORE_FAIL(0.00)[2607:f8b0:4864:20::1031:server fail]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; HAS_ATTACHMENT(0.00)[]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::1031:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[73.19.52.228:received]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::1031:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::1031:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2021 21:22:59 -0000 --Apple-Mail=_3E326F09-A3D5-4F1B-AA50-AC100C313AA5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Apr 19, 2021, at 6:04 AM, Alexander Richardson = wrote: >=20 > On Sat, 17 Apr 2021 at 17:14, Enji Cooper = wrote: >>=20 >>=20 >>> On Apr 14, 2021, at 10:40 PM, Gleb Popov wrote: >>=20 >> =E2=80=A6 >>=20 >>> Take a look at LLVM testing infrastructure and specifically the = llvm-lit >>> tool. >>=20 >> Does their test infrastructure leverage GoogleTest? If so, then the = bulk majority of the work would just be integrating it into Kyua. >> Cheers, >> -Enji >>=20 >=20 > If you are interested in writing tests for llvm/clang/lldb those > should be submitted upstream and not be part of the FreeBSD source > tree. Therefore, Kyua is almost certainly not the right solution. > https://www.llvm.org/docs/TestingGuide.html explains how to write > tests for LLVM, however, it is quite stale. I would suggest looking at > existing tests inside LLVM and adjusting those to match what you want > to test. >=20 > The FreeBSD src contrib/ import does not include the extensive LLVM > testsuite, so you could start by looking at > https://github.com/llvm/llvm-project/tree/main/clang/test for clang > and https://github.com/llvm/llvm-project/tree/main/lldb/test for LLDB. > I have never looked at the LLDB tests, but as far as I know there are > tests that use python to drive the interaction. Hi Alex, My suggestion was more that kyua should be used to run/aggregate = the test information, not be the actual test = framework/infrastructure/payload. I really appreciate the references :). Cheers! -Enji --Apple-Mail=_3E326F09-A3D5-4F1B-AA50-AC100C313AA5 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----- iQIzBAEBCAAdFiEEtvtxN6kOllEF3nmX5JFNMZeDGN4FAmB99K4ACgkQ5JFNMZeD GN6eHhAAh9+0yoHta9uR6TU7HNqc81khBKHkdTgQzqBO56bqDzB3Lp9uWkreT05G 1eqATq/34x4+SV3pb5gjM+79UjwjtyRJ6UGdjpw5OKST4Qo/tvppPG+iFNbHIFgC rkyFsCNg5zFvk+S1gJ+OtE/8ppC5ytMNOa+DN05BgSdb/NFJHxkj5PMWO5xIbllV 5ut0IeHaksM8EVCPZnzmTgKDs1nyrl7g98unYOkv3k4ED0GmRo0+P9xAX0Twac8+ WE9RDeU3gOZt79EnsZ+rmL6RZTvPHZrgFY+6YQd02/XXU+A369UrE/E9TdAO7GKn UEPNL6LGFUYlF89wAcJjbrSTMnc6OriHtCIKqgw68H6101uvZGA3/86g4fsOmTwk 5LTLV7EKEq5ZCcXjJydKUcSKtHhgcHR6l54lU4H1LRhjciFfoxdH0eqP5ykFF+ij 63hT1cf7/DJlt56pabCiIvZNyH3fR5t/K5vtZ9NATUAxclsmBlB3aguv/yMD96wf cKQ2GA2HMZtv1AEVKE5ax2v2UTr0o+KQ916TzuWdM6J535msKXJMewlvfgzl2riW 3y8dyOZP46mJ5MtuGSFKA4Qf9uXsCxUn5Qct+0yYUUMAOBCNNLf4nJIr/jQaUyZv O2Vie2mN+zlmfX/a4EC94DD3M7fEynjjcGobCiey9JHpRdJk15o= =pnlE -----END PGP SIGNATURE----- --Apple-Mail=_3E326F09-A3D5-4F1B-AA50-AC100C313AA5-- From owner-freebsd-hackers@freebsd.org Tue Apr 20 00:54:05 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7EA165DD498 for ; Tue, 20 Apr 2021 00:54:05 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane-mx.org) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPQDX3Ynbz3Jvr for ; Tue, 20 Apr 2021 00:54:04 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane-mx.org) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lYeeJ-0002UB-TN for freebsd-hackers@freebsd.org; Tue, 20 Apr 2021 02:53:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Johannes Totz Subject: Re: Debugging signal 11 Date: Tue, 20 Apr 2021 01:53:44 +0100 Message-ID: References: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 In-Reply-To: Content-Language: en-GB X-Rspamd-Queue-Id: 4FPQDX3Ynbz3Jvr X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=jo-t.de (policy=none); spf=pass (mx1.freebsd.org: domain of freebsd-hackers@m.gmane-mx.org designates 116.202.254.214 as permitted sender) smtp.mailfrom=freebsd-hackers@m.gmane-mx.org X-Spamd-Result: default: False [0.10 / 15.00]; FORGED_MUA_THUNDERBIRD_MSGID_UNKNOWN(2.50)[]; ARC_NA(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[jo-t.de : SPF not aligned (relaxed), No valid DKIM,none]; RBL_SENDERSCORE_FAIL(0.00)[116.202.254.214:server fail]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[116.202.254.214:from]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[116.202.254.214:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; FORGED_SENDER(0.30)[johannes@jo-t.de,freebsd-hackers@m.gmane-mx.org]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:116.202.0.0/16, country:DE]; FROM_NEQ_ENVFROM(0.00)[johannes@jo-t.de,freebsd-hackers@m.gmane-mx.org]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 00:54:05 -0000 On 18/04/2021 21:06, Lucas Nali de Magalhães wrote: > On Apr 18, 2021, at 4:18 PM, Ian Lepore wrote: >> >> On Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalhães wrote: >>> This also isn't the usual. Debugging a running process is possible but >>> the process you used is the wrong one. Debugging init, OTOH, is a >>> completely different story: init is the first process and is the most >>> important process of any unix. The actual command varies from >>> debugger to debugger but in gdb, "attach pid" may do the trick for >>> you. You will need to be extra cautious because of you are aiming init. >>> Ideally, init is the process supposed to catch the signals and keep >>> the system running. So a break into it may cause your system to crash. >> >> Given that it is init that is segfaulting, how to you propose that the >> OP lauch gdb in order to do an attach to init? In other words: there >> is a reason the OP is trying to use the kernel debugger to examine >> what's going on here. > > First the OP was able to modify init. Then it was asked the command > to do a stack trace. Thus the OP clearly hasn't the full knowledge of > the procedure and the risks. Besides this, kgdb is based on gdb. I > thought they should know. Hi Lucas and others, thanks for responding. I didn't modify init, I've been messing around in the kernel. And that messing around makes init crash, so totally my own fault. But I would have liked it to work instead, thusly trying to debug why the crash happens. bt in kgdb gives me (beware of line break): __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 55 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct pcpu, (kgdb) bt #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 #1 doadump (textdump=0) at /usr/src/sys/kern/kern_shutdown.c:371 #2 0xffffffff804d700a in db_dump (dummy=, dummy2=, dummy3=, dummy4=) at /usr/src/sys/ddb/db_command.c:574 #3 0xffffffff804d6dcf in db_command (last_cmdp=, cmd_table=, dopager=1) at /usr/src/sys/ddb/db_command.c:481 #4 0xffffffff804d6b3d in db_command_loop () at /usr/src/sys/ddb/db_command.c:534 #5 0xffffffff804d9fc8 in db_trap (type=, code=) at /usr/src/sys/ddb/db_main.c:252 #6 0xffffffff80744106 in kdb_trap (type=3, code=0, tf=0xfffffe0021c75a20) at /usr/src/sys/kern/subr_kdb.c:693 #7 0xffffffff809d64a1 in trap (frame=0xfffffe0021c75a20) at /usr/src/sys/amd64/amd64/trap.c:583 #8 #9 0xffffffff806feb45 in issignal (td=0xfffff80002213740) at /usr/src/sys/amd64/include/cpufunc.h:65 #10 cursig (td=0xfffff80002213740) at /usr/src/sys/kern/kern_sig.c:599 #11 0xffffffff8075a428 in ast (framep=0xfffffe0021c75c00) at /usr/src/sys/kern/subr_trap.c:329 #12 0xffffffff809b2979 in doreti_ast () at /usr/src/sys/amd64/amd64/exception.S:1150 #13 0x0000000000000000 in ?? () ...which is the stacktrace of the fault handler, not the instruction/function that caused the fault. Select frame #11 and: p *framep and: disassemble tf_rip But that would have been too easy... From owner-freebsd-hackers@freebsd.org Tue Apr 20 02:13:27 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D241E5E02D5 for ; Tue, 20 Apr 2021 02:13:27 +0000 (UTC) (envelope-from mason@blisses.org) Received: from yangtze.blisses.org (yangtze.blisses.org [144.202.50.44]) (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 4FPS0700BCz3NZK for ; Tue, 20 Apr 2021 02:13:26 +0000 (UTC) (envelope-from mason@blisses.org) Received: from cocytus.blisses.org (cocytus.blisses.org [64.223.129.151]) by yangtze.blisses.org (Postfix) with ESMTP id 092F617711B; Mon, 19 Apr 2021 22:13:20 -0400 (EDT) Date: Mon, 19 Apr 2021 22:13:18 -0400 From: Mason Loring Bliss To: Mark Delany Cc: freebsd-hackers@freebsd.org Subject: Re: Various problems with 13.0 amd64 on vultr.com Message-ID: <20210420021318.GB18217@blisses.org> References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 4FPS0700BCz3NZK X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mason@blisses.org designates 144.202.50.44 as permitted sender) smtp.mailfrom=mason@blisses.org X-Spamd-Result: default: False [-5.39 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[blisses.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[144.202.50.44:from]; SPAMHAUS_ZRD(0.00)[144.202.50.44:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.99)[-0.991]; RCPT_COUNT_TWO(0.00)[2]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:20473, ipnet:144.202.48.0/20, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 02:13:27 -0000 --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Apr 18, 2021 at 10:47:00AM +0000, Mark Delany wrote: > The second issue is more annoying than critical: the system doesn't > reboot with the reboot/shutdown commands. I was curious about what you're describing, so I uploaded a 13.0 ISO and noted that this hang on reboot is there started at the very first reboot attempt, after booting from the ISO to install. Since FreeBSD lacks "dmesg -w" I'm tailing dmesg in a loop (2s delay between iterations) on the console to see if it catches anything funny. You could do this as well, and if you do it from the console it you could also test the system sans networking. I haven't seen a hang yet, but the test system hasn't been up much more than ten minutes, so I'll report back later. --=20 Mason Loring Bliss (( If I have not seen as far as others, it is because mason@blisses.org )) giants were standing on my shoulders. - Hal Abels= on --yNb1oOkm5a9FJOVX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEEXtBZz1axB5rEDCEnrJXcHbvJVUFAmB+OLsACgkQnrJXcHbv JVUM3g/+K6fxRZl5ZKSKKZZzq/P6PnmwjFyNKnJ76B4cSExR6pUNlcqsAdHcUC61 YV9Kvdf4W5j0Cwxt/0crBcjR/nC3yL4pW82D8YM7GNtdp+qzYNWrPvZ9eK2H2Kan 8IGzRAGzhDfY4QhkNn9kKih3TE2OiFgJJlyJCixUhg5jJFyHHpitWk9XLa2NUhcP TqBPz9QWh2XXlyRnoddTVqavzPGu4A39BYbVb4cIzq8p6+8FrLpuUr2K7pzne3GG UvG5mZba8qp4RilTKbHIou6qdS7yIegh2AXW9plvhSk8Pju62D8YU6+cSmub3yXI 71TvqruBwB+Nj9LEiTte3tHfAMRmZVU3i0qTIx/cI1Tr4NGgngBBsxAJntkq88ZH lD4EszB8VALHlO2KjqMnswtZ9kBD4Roa/4N6RUwqzH3FQsqlifISGLDzUdZqYd8f WwYIhx4mvEKubs/3Zal5Xi0vxPzT76wsML4EzsEtVD5taG/+WFkeFqANvvyXbfAM cCUdNlB2wUgLvfm90+aqc3Nb4NCrsUMR5ZveyE+Ol/+FovkMOsQtNO2c6Q4RDArz 7l/Z8j8ojQsr09mnUNdzdf18i45LQW/TVjxNuH5w4DPz3Dy6VganLt1XgiBgErdK oX1a9n7iQsC4b7a/qUrZsyA6HGIoZ1vnxba+Dx+ae20DqaayMXs= =lB1D -----END PGP SIGNATURE----- --yNb1oOkm5a9FJOVX-- From owner-freebsd-hackers@freebsd.org Tue Apr 20 02:32:15 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 640AC5E0E81 for ; Tue, 20 Apr 2021 02:32:15 +0000 (UTC) (envelope-from jon@brainville.io) Received: from brainville.io (mx.brainville.io [45.32.129.245]) (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 "*.brainville.io", Issuer "R3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPSPp1zcMz3PSZ for ; Tue, 20 Apr 2021 02:32:14 +0000 (UTC) (envelope-from jon@brainville.io) Received: from brainville.io (localhost [127.0.0.1]) by brainville.io (OpenSMTPD) with ESMTP id f7e01d10; Mon, 19 Apr 2021 17:45:24 -0700 (PDT) Received: (from jon@localhost) by brainville.io (8.16.1/8.16.1/Submit) id 13K0jNRa024614; Mon, 19 Apr 2021 17:45:23 -0700 (PDT) (envelope-from jon) Date: Mon, 19 Apr 2021 17:45:23 -0700 From: jon To: Mark Delany Cc: freebsd-hackers@freebsd.org Subject: Re: Various problems with 13.0 amd64 on vultr.com Message-ID: References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> X-Rspamd-Queue-Id: 4FPSPp1zcMz3PSZ X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.80 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FREEFALL_USER(0.00)[jon]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RBL_DBL_DONT_QUERY_IPS(0.00)[45.32.129.245:from]; SPAMHAUS_ZRD(0.00)[45.32.129.245:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[brainville.io,quarantine]; NEURAL_HAM_SHORT(-1.00)[-0.997]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:20473, ipnet:45.32.128.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 02:32:15 -0000 On Sun, Apr 18, 2021 at 10:47:00AM +0000, Mark Delany wrote: > Hi all. > > I rarely if ever post here so if there's a better place, LMK. > > I've been running 12.2 on vultr.com instances for a long time without any issues. However > I recently attempted an upgrade to 13.0 and the system now exhibits a number of issues. > > The most critical issue is that the system randomly wedged after running for a while > (anywhere from 10 minutes to a couple of hours) requiring a reboot to recover. No console > response or messages and limited network response (see below). No messages logged anywhere > as best I can tell. > > The second issue is more annoying than critical: the system doesn't reboot with the > reboot/shutdown commands. The shutdown sequence seems to complete but the reboot never > occurs. I compiled and ran a "reboot(RB_AUTOBOOT | RB_VERBOSE)" but nothing interesting > showed up. > > I have no idea whether the two issues are related excepting that neither occur with 12.2 > > > Some details: > > - I first upgraded with freebsd-update and then tried with a fresh ISO image and > completely overwrote the original file system. > > - I've tried both UFS and ZFS root file systems. > > - I tried with a fresh VM instance in case there was some sort of per-instance glitch > > - The system is 99% idle with no memory pressure. It normally runs nsd, openntpd and a few > other processes installed via pkg, but nothing wierd as best I can tell. > > - it has no kernel modules manually loaded > > - It's configured with ipv4 and ipv6 and when it gets wedged I get a ping response from > the ipv6 address, but not from ipv4. Furthermore, if I try a tcp connection to ipv6 I > get a connection setup, but no data. > > - The VM is configured as a single-CPU system > > - I haven't raised the issue with vultr yet. Thought I'd see what the hive-mind thinks > first. > > Not that it will surprise anyone, but I recently spun up 13.0 in Virtualbox on a lab > machine as well as on a different VM provider without any problems, so it's probably > something relatively unique to vultr. > > That this is a virtually idle system on a single CPU with no oddball or unusual kernel > modules or network configs makes the situation surprising to me. There is no pattern that > I'm yet able to discern. The main thing I have left to try is to boot the system without > any networking activated, but apart from that I'm out of ideas in terms of identifying the > root cause. > > > So my questions are: > > 1. Anyone else having the same issue? Or not having the same issue? > 2. Clues on how to diagnose? This is a non-critical system so I can try anything that > anyone suggests but I'm not particularly familiar with kernel-level debugging so a bit > of hand-holding might be needed if you have suggestions. > > For those unfamiliar with vultr's VMs, here's the first part of dmesg: > > FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021 > root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 > FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) > VT(vga): text 80x25 > CPU: Intel Xeon Processor (Cascadelake) (2993.02-MHz K8-class CPU) > Origin="GenuineIntel" Id=0x50656 Family=0x6 Model=0x55 Stepping=6 > Features=0x783fbff > Features2=0xfffa3203 > AMD Features=0x2c100800 > AMD Features2=0x21 > Structured Extended Features=0xd18307a9 > Structured Extended Features2=0x808 > Structured Extended Features3=0xa4000000 > XSAVE Features=0x1 > IA32_ARCH_CAPS=0x2b > Hypervisor: Origin = "KVMKVMKVM" > real memory = 1073741824 (1024 MB) > avail memory = 997744640 (951 MB) > Event timer "LAPIC" quality 600 > ACPI APIC Table: > random: registering fast source Intel Secure Key RNG > random: fast provider: "Intel Secure Key RNG" > random: unblocking device. > ioapic0 irqs 0-23 > Timecounter "TSC-low" frequency 1496510010 Hz quality 800 > > in case it shows up anything odd to those who can decode this sort of stuff. > Hello, I happen to be running FreeBSD 13.0-RELEASE on a Vultr instance as well, but haven't had any problems in the ~4 days since I updated from 12 RELEASE. My VM is a single CPU with 2G memory and UFS for a filesystem. I do see that our VMs have different CPUs listed. Here is the first part of my dmesg : FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) VT(vga): text 80x25 CPU: Intel Core Processor (Skylake, IBRS) (3792.08-MHz K8-class CPU) Origin="GenuineIntel" Id=0x506e3 Family=0x6 Model=0x5e Stepping=3 Features=0x783fbff Features2=0xfffa3203 AMD Features=0x28100800 AMD Features2=0x21 Structured Extended Features=0xfb9 Structured Extended Features3=0x84000000 XSAVE Features=0x1 Hypervisor: Origin = "KVMKVMKVM" real memory = 2147483648 (2048 MB) avail memory = 2047262720 (1952 MB) Event timer "LAPIC" quality 600 ACPI APIC Table: random: registering fast source Intel Secure Key RNG random: fast provider: "Intel Secure Key RNG" random: unblocking device. ioapic0 irqs 0-23 Timecounter "TSC-low" frequency 1896040542 Hz quality 800 KTLS: Initialized 1 threads - Jon From owner-freebsd-hackers@freebsd.org Tue Apr 20 07:03:28 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 65CB65E766B for ; Tue, 20 Apr 2021 07:03:28 +0000 (UTC) (envelope-from x9k@charlie.emu.st) Received: from f3.bushwire.net (f3.bushwire.net [203.0.120.11]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPZQh66zSz3sVt for ; Tue, 20 Apr 2021 07:03:24 +0000 (UTC) (envelope-from x9k@charlie.emu.st) Received: by f3.bushwire.net (Postfix, from userid 1001) id 35A593B01E; Tue, 20 Apr 2021 17:03:18 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=emu.st; s=2019; t=1618902198; bh=QBYkl8rs3KYrdJm5WIBVpK+Twvc=; h=Comments:Received:From:Comments:Message-ID:Content-Disposition: In-Reply-To:Subject:References:Mime-Version:Content-Type:Date:To; b=QhF2hwzZNDCFHFRMQV4zL4YWwn08YDn/Ojrk1sgbnWtDkY+fcbX8i5By/qmwfPGO9 O81NimlXPiYySirGELy4RUtSDRKrMiYlkd/a2AnKEEAym+oKIcVeq3jKglT2b3N7C+ xYpowG8K6aJcdheI+b8mYhG0KA3ul+1WfEVMX6Ec=MX6Ec= Comments: QMDA 0.3a Received: (qmail 62099 invoked by uid 1001); 20 Apr 2021 07:03:18 -0000 From: "Mark Delany" Comments: QMDASubmit submit() 0.2.0-final Message-ID: <0.2.0-final-1618902198.146-0x8beb07@qmda.emu.st> Content-Disposition: inline In-Reply-To: Subject: Re: Various problems with 13.0 amd64 on vultr.com References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> <20210420021318.GB18217@blisses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Date: Tue, 20 Apr 2021 07:03:18 +0000 To: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 4FPZQh66zSz3sVt X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=emu.st header.s=2019 header.b=QhF2hwzZ; dmarc=none; spf=pass (mx1.freebsd.org: domain of x9k@charlie.emu.st designates 203.0.120.11 as permitted sender) smtp.mailfrom=x9k@charlie.emu.st X-Spamd-Result: default: False [0.26 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.90)[-0.902]; NEURAL_SPAM_SHORT(0.96)[0.960]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[emu.st]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[203.0.120.11:from:127.0.2.255]; R_SPF_ALLOW(-0.20)[+ip4:203.0.120.0/24]; DKIM_TRACE(0.00)[emu.st:-]; R_DKIM_REJECT(1.00)[emu.st:s=2019]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.0.120.11:from]; ASN(0.00)[asn:4764, ipnet:203.0.120.0/24, country:AU]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 07:03:28 -0000 On 20Apr21, Mark Delany allegedly wrote: > On 19Apr21, Mason Loring Bliss allegedly wrote: > > > I haven't seen a hang yet, but the test system hasn't been up much more > > than ten minutes, so I'll report back later. > > I think I've isolated it to natd traffic. And for what it's worth I was able to reproduce the problem on a completely different VPS provider. So I don't think it's specific to vultr.com any more. I guess I should raise a PR or move on over to freebsd-net. Is that the right thing to do? Mark. From owner-freebsd-hackers@freebsd.org Tue Apr 20 05:02:41 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F59D5E404A for ; Tue, 20 Apr 2021 05:02:41 +0000 (UTC) (envelope-from n7w@delta.emu.st) Received: from f3.bushwire.net (f3.bushwire.net [203.0.120.11]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPWlM45xlz3mLh for ; Tue, 20 Apr 2021 05:02:38 +0000 (UTC) (envelope-from n7w@delta.emu.st) Received: by f3.bushwire.net (Postfix, from userid 1001) id 7B1323B201; Tue, 20 Apr 2021 15:02:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=emu.st; s=2019; t=1618894949; bh=Ui1sLoSmGQT+xasYV/AJ0FDAmNY=; h=Comments:Received:From:Comments:Message-ID:To:References: Mime-Version:Content-Type:Content-Disposition:In-Reply-To:Date: Subject; b=Kw/ea7EtYeyG5DnVCACpkm+Ns4UXEdtOwWjLt7kOxAmEXHWigUxa2H5CsidEHtZZF o5+u6Wv+x11fdK8kYrPPhQ/ZJ0fDjHjDzaPtnY7kGuvWTh9RumowswWBTwRQPdqboZ ErQQZDh4cmpwOu92TomDMPiJw0J+dKhVw9iyj8v4=iyj8v4= Comments: QMDA 0.3a Received: (qmail 61048 invoked by uid 1001); 20 Apr 2021 05:02:29 -0000 From: "Mark Delany" Comments: QMDASubmit submit() 0.2.0-final Message-ID: <0.2.0-final-1618894949.426-0x84a560@qmda.emu.st> To: jon via freebsd-hackers References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Date: Tue, 20 Apr 2021 05:02:29 +0000 Subject: Re: Various problems with 13.0 amd64 on vultr.com X-Rspamd-Queue-Id: 4FPWlM45xlz3mLh X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=emu.st header.s=2019 header.b=Kw/ea7Et; dmarc=none; spf=pass (mx1.freebsd.org: domain of n7w@delta.emu.st designates 203.0.120.11 as permitted sender) smtp.mailfrom=n7w@delta.emu.st X-Spamd-Result: default: False [0.20 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_SPAM_SHORT(1.00)[0.999]; RBL_SENDERSCORE_FAIL(0.00)[203.0.120.11:server fail]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:203.0.120.0/24]; DMARC_NA(0.00)[emu.st]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[203.0.120.11:from:127.0.2.255]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[emu.st:-]; R_DKIM_REJECT(1.00)[emu.st:s=2019]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.0.120.11:from]; ASN(0.00)[asn:4764, ipnet:203.0.120.0/24, country:AU]; MAILMAN_DEST(0.00)[freebsd-hackers] X-Mailman-Approved-At: Tue, 20 Apr 2021 07:34:23 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 05:02:41 -0000 On 19Apr21, jon via freebsd-hackers allegedly wrote: > On Sun, Apr 18, 2021 at 10:47:00AM +0000, Mark Delany wrote: > I happen to be running FreeBSD 13.0-RELEASE on a Vultr instance as well, > but haven't had any problems in the ~4 days since I updated from > 12 RELEASE. My VM is a single CPU with 2G memory and UFS for a > filesystem. Ahh. Good to know, thanks for that. Does /sbin/reboot work for you? I think I've isolated the hangs, see my other post. Mark. From owner-freebsd-hackers@freebsd.org Tue Apr 20 05:32:54 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49C5C5E4D58 for ; Tue, 20 Apr 2021 05:32:54 +0000 (UTC) (envelope-from n7w@delta.emu.st) Received: from f3.bushwire.net (f3.bushwire.net [203.0.120.11]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPXQD5bjJz3nXN for ; Tue, 20 Apr 2021 05:32:52 +0000 (UTC) (envelope-from n7w@delta.emu.st) Received: by f3.bushwire.net (Postfix, from userid 1001) id B65D03B01E; Tue, 20 Apr 2021 15:32:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=emu.st; s=2019; t=1618896757; bh=33m+Zct+szHUCMmtvxynV39nl/0=; h=Comments:Received:From:Comments:Message-ID:In-Reply-To:Date:To: Subject:References:Mime-Version:Content-Type:Content-Disposition; b=brKKwt/qyeGMCWxUO81E46jm97L5AunmsBNWPRDM5rbzg8qD+bjN/OgulZ0GDZIHZ s1uBj6p9Kw5G4acXsrI6/JJEnf9d1enZ2JSZcdJTPsHoKRyhGRqqYIHKyyy2iygxFy YiFgyqoY71wJ8zOd/yszOQPWf/HztRA8Plgagt2k=agt2k= Comments: QMDA 0.3a Received: (qmail 61241 invoked by uid 1001); 20 Apr 2021 05:32:37 -0000 From: "Mark Delany" Comments: QMDASubmit submit() 0.2.0-final Message-ID: <0.2.0-final-1618896757.688-0xb6a34e@qmda.emu.st> In-Reply-To: <20210420021318.GB18217@blisses.org> Date: Tue, 20 Apr 2021 05:32:37 +0000 To: freebsd-hackers@freebsd.org Subject: Re: Various problems with 13.0 amd64 on vultr.com References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> <20210420021318.GB18217@blisses.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Queue-Id: 4FPXQD5bjJz3nXN X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=emu.st header.s=2019 header.b=brKKwt/q; dmarc=none; spf=pass (mx1.freebsd.org: domain of n7w@delta.emu.st designates 203.0.120.11 as permitted sender) smtp.mailfrom=n7w@delta.emu.st X-Spamd-Result: default: False [0.09 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991]; NEURAL_SPAM_SHORT(0.88)[0.881]; RBL_SENDERSCORE_FAIL(0.00)[203.0.120.11:server fail]; FROM_HAS_DN(0.00)[]; R_DKIM_REJECT(1.00)[emu.st:s=2019]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[emu.st]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[203.0.120.11:from:127.0.2.255]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[emu.st:-]; R_SPF_ALLOW(-0.20)[+ip4:203.0.120.0/24]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.0.120.11:from]; ASN(0.00)[asn:4764, ipnet:203.0.120.0/24, country:AU]; MAILMAN_DEST(0.00)[freebsd-hackers] X-Mailman-Approved-At: Tue, 20 Apr 2021 07:34:46 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 05:32:54 -0000 On 19Apr21, Mason Loring Bliss allegedly wrote: > I haven't seen a hang yet, but the test system hasn't been up much more > than ten minutes, so I'll report back later. I think I've isolated it to natd traffic. The system stays up reliably with natd disabled but hangs within a couple of minutes of an inbound ipv4 traffic. If I just run with the ipfw rule and the divert kernel module, then no problem the system runs albeit without any real ipv4 traffic working for obvious reasons. But I can happily do anything I like in ipv6 and it runs fine. But as soon as natd is run with inbound traffic such as an ssh session, then the system mostly hangs and according to the vultr console, it's spinning at 100% CPU. I say "mostly hangs" because I have now caused at least one core dump while ostensibly reproducing the hang. Here is a snippet of crashinfo data. Happy to provide more to anyone but it's 90K so I didn't think it appropriate to post it here. ... Unread portion of the kernel message buffer: panic: sbappendaddr_locked cpuid = 0 time = 1618895504 KDB: stack backtrace: #0 0xffffffff80c57345 at kdb_backtrace+0x65 #1 0xffffffff80c09d21 at vpanic+0x181 #2 0xffffffff80c09b93 at panic+0x43 #3 0xffffffff80ca51e0 at sbappendaddr_locked_internal+0 #4 0xffffffff827eafd0 at divert_packet+0x1a0 #5 0xffffffff827a2c81 at ipfw_check_packet+0x2c1 #6 0xffffffff80d41f87 at pfil_run_hooks+0x97 #7 0xffffffff80db2d71 at ip_output+0xb61 #8 0xffffffff80dc94b4 at tcp_output+0x1b04 #9 0xffffffff80dcf973 at tcp_ctlinput+0x313 #10 0xffffffff80daf105 at icmp_input+0x795 #11 0xffffffff80dafc15 at ip_input+0x125 #12 0xffffffff80d3fa7b at swi_net+0x12b #13 0xffffffff80bcae5d at ithread_loop+0x24d #14 0xffffffff80bc7c5e at fork_exit+0x7e #15 0xffffffff8106282e at fork_trampoline+0xe Uptime: 11m13s Dumping 123 out of 982 MB:..13%..26%..39%..52%..65%..78%..91% __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 55 /usr/src/sys/amd64/include/pcpu_aux.h: No such file or directory. (kgdb) #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 #1 doadump (textdump=) at /usr/src/sys/kern/kern_shutdown.c:399 #2 0xffffffff80c09916 in kern_reboot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:486 #3 0xffffffff80c09d90 in vpanic (fmt=, ap=) at /usr/src/sys/kern/kern_shutdown.c:919 #4 0xffffffff80c09b93 in panic (fmt=) at /usr/src/sys/kern/kern_shutdown.c:843 #5 0xffffffff80ca51e0 in sbappendaddr_locked (sb=0xfffff800069b4c58, asa=0xfffffe00491bcd00, m0=0xfffff80006b7a000, control=0x0) at /usr/src/sys/kern/uipc_sockbuf.c:1198 #6 0xffffffff827eafd0 in divert_packet (m=0xfffff80006b7a000, incoming=) at /usr/src/sys/netinet/ip_divert.c:285 #7 0xffffffff827a2c81 in ipfw_divert (m0=0xfffffe00491bcf58, args=0xfffffe00491bcd70, tee=) at /usr/src/sys/netpfil/ipfw/ip_fw_pfil.c:525 #8 ipfw_check_packet (m0=0xfffffe00491bcf58, ifp=0xfffff8000358a000, flags=131072, ruleset=, inp=0xfffff80006f92000) at /usr/src/sys/netpfil/ipfw/ip_fw_pfil.c:283 #9 0xffffffff80d41f87 in pfil_run_hooks (head=, p=..., ifp=0xfffff8000358a000, flags=flags@entry=131072, inp=inp@entry=0xfffff80006f92000) at /usr/src/sys/net/pfil.c:187 #10 0xffffffff80db2d71 in ip_output_pfil (mp=0xfffffe00491bcf58, ifp=0xfffff8000358a000, flags=0, inp=0xfffff80006f92000, dst=0xfffff80006f921a8, fibnum=, error=) at /usr/src/sys/netinet/ip_output.c:130 #11 ip_output (m=0x0, m@entry=0xfffff80006b7a000, opt=, ro=, flags=0, imo=imo@entry=0x0, inp=) at /usr/src/sys/netinet/ip_output.c:705 #12 0xffffffff80dc94b4 in tcp_output (tp=0xfffffe008b5e1c48) at /usr/src/sys/netinet/tcp_output.c:1492 #13 0xffffffff80dcf973 in tcp_ctlinput (cmd=, cmd@entry=, sa=, sa@entry=, vip=0xfffff80006b511ac, vip@entry=) at /usr/src/sys/netinet/tcp_subr.c:2544 #14 0xffffffff80daf105 in icmp_input (mp=0xfffffe00491bd300, mp@entry=, offp=0xfffffe00491bd2fc, offp@entry=, proto=, proto@entry=) at /usr/src/sys/netinet/ip_icmp.c:571 #15 0xffffffff80dafc15 in ip_input (m=0x0) at /usr/src/sys/netinet/ip_input.c:829 #16 0xffffffff80d3fa7b in netisr_process_workstream_proto ( nwsp=, proto=1) at /usr/src/sys/net/netisr.c:919 #17 swi_net (arg=) at /usr/src/sys/net/netisr.c:966 #18 0xffffffff80bcae5d in intr_event_execute_handlers (p=, ie=0xfffff8000332bc00) at /usr/src/sys/kern/kern_intr.c:1168 #19 ithread_execute_handlers (p=, ie=0xfffff8000332bc00) at /usr/src/sys/kern/kern_intr.c:1181 #20 ithread_loop (arg=arg@entry=0xfffff8000332fe00) at /usr/src/sys/kern/kern_intr.c:1269 #21 0xffffffff80bc7c5e in fork_exit ( callout=0xffffffff80bcac10 , arg=0xfffff8000332fe00, frame=0xfffffe00491bd480) at /usr/src/sys/kern/kern_fork.c:1069 #22 (kgdb) ... Happy to provide further info and run anything that folk think might help provide more useful diagnostic info. Oh, the interface, if it's relevant, is: vtnet0: on virtio_pci0 Mark. From owner-freebsd-hackers@freebsd.org Tue Apr 20 07:40:53 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6474E5E8FAA for ; Tue, 20 Apr 2021 07:40:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPbFw1rvzz3v8r for ; Tue, 20 Apr 2021 07:40:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 13K7eYTU082351 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 20 Apr 2021 10:40:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 13K7eYTU082351 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 13K7eXpR082350; Tue, 20 Apr 2021 10:40:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Apr 2021 10:40:33 +0300 From: Konstantin Belousov To: Johannes Totz Cc: freebsd-hackers@freebsd.org Subject: Re: Debugging signal 11 Message-ID: References: <9d3b5c0cc7051f410fd04ff9ffba8aa0b5b32167.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4FPbFw1rvzz3v8r X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-0.99 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; NEURAL_HAM_MEDIUM(-0.99)[-0.987]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:d5e7:1::1:from]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_SHORT(1.00)[1.000]; SPAMHAUS_ZRD(0.00)[2001:470:d5e7:1::1:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 07:40:53 -0000 On Tue, Apr 20, 2021 at 01:53:44AM +0100, Johannes Totz wrote: > On 18/04/2021 21:06, Lucas Nali de Magalhães wrote: > > On Apr 18, 2021, at 4:18 PM, Ian Lepore wrote: > > > > > > On Sun, 2021-04-18 at 15:53 -0300, Lucas Nali de Magalhães wrote: > > > > This also isn't the usual. Debugging a running process is possible but > > > > the process you used is the wrong one. Debugging init, OTOH, is a > > > > completely different story: init is the first process and is the most > > > > important process of any unix. The actual command varies from > > > > debugger to debugger but in gdb, "attach pid" may do the trick for > > > > you. You will need to be extra cautious because of you are aiming init. > > > > Ideally, init is the process supposed to catch the signals and keep > > > > the system running. So a break into it may cause your system to crash. > > > > > > Given that it is init that is segfaulting, how to you propose that the > > > OP lauch gdb in order to do an attach to init? In other words: there > > > is a reason the OP is trying to use the kernel debugger to examine > > > what's going on here. > > > > First the OP was able to modify init. Then it was asked the command > > to do a stack trace. Thus the OP clearly hasn't the full knowledge of > > the procedure and the risks. Besides this, kgdb is based on gdb. I > > thought they should know. > > Hi Lucas and others, > thanks for responding. > > I didn't modify init, I've been messing around in the kernel. And that > messing around makes init crash, so totally my own fault. But I would have > liked it to work instead, thusly trying to debug why the crash happens. > > bt in kgdb gives me (beware of line break): > > __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > 55 __asm("movq %%gs:%P1,%0" : "=r" (td) : "n" (offsetof(struct > pcpu, > (kgdb) bt > #0 __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55 > #1 doadump (textdump=0) at /usr/src/sys/kern/kern_shutdown.c:371 > #2 0xffffffff804d700a in db_dump (dummy=, > dummy2=, dummy3=, dummy4=) > at /usr/src/sys/ddb/db_command.c:574 > #3 0xffffffff804d6dcf in db_command (last_cmdp=, > cmd_table=, dopager=1) at /usr/src/sys/ddb/db_command.c:481 > #4 0xffffffff804d6b3d in db_command_loop () at > /usr/src/sys/ddb/db_command.c:534 > #5 0xffffffff804d9fc8 in db_trap (type=, code= out>) at /usr/src/sys/ddb/db_main.c:252 > #6 0xffffffff80744106 in kdb_trap (type=3, code=0, tf=0xfffffe0021c75a20) > at /usr/src/sys/kern/subr_kdb.c:693 > #7 0xffffffff809d64a1 in trap (frame=0xfffffe0021c75a20) at > /usr/src/sys/amd64/amd64/trap.c:583 > #8 > #9 0xffffffff806feb45 in issignal (td=0xfffff80002213740) at > /usr/src/sys/amd64/include/cpufunc.h:65 > #10 cursig (td=0xfffff80002213740) at /usr/src/sys/kern/kern_sig.c:599 > #11 0xffffffff8075a428 in ast (framep=0xfffffe0021c75c00) at > /usr/src/sys/kern/subr_trap.c:329 > #12 0xffffffff809b2979 in doreti_ast () at > /usr/src/sys/amd64/amd64/exception.S:1150 > #13 0x0000000000000000 in ?? () > > ...which is the stacktrace of the fault handler, not the > instruction/function that caused the fault. > > Select frame #11 and: > p *framep > > and: > disassemble tf_rip > > But that would have been too easy... > There is a tunable/sysctl machdep.uprintf_signal which makes kernel print some information on trap, either on console or ctty. At least, it will give you the $pc at the time of crash. Intent of the functionality is exactly to get some data from trap when debugger cannot be attached. From owner-freebsd-hackers@freebsd.org Tue Apr 20 16:39:34 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82A3D5DE8FA for ; Tue, 20 Apr 2021 16:39:34 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPqCT5MfFz3DL6 for ; Tue, 20 Apr 2021 16:39:33 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-qv1-xf2c.google.com with SMTP id x27so18916141qvd.2 for ; Tue, 20 Apr 2021 09:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E5167jgn1vEgb/7m4o/WTc56mdpvrlrUIUEe198IVkM=; b=ZNR21sR52DmQZHqo/7shTGjlkskkHVPc7SLwr5uGMbsxC+7OMA9H0WvPVFIyPq5jRR 6hshDgpDIqZrTbd6AlIp/zKzpJqNbGxx0k/gPpszxA9/voSgcpzsWkqLYijG28MYA1m3 3jX98/kLVGLJQlTl1UPXjBDsr7PkplciwUamTZSHYvCPjxtdCuRzyFhaUTka5EQ2+86h ObPLTalkfAN+slAZyxVynmb62/YS8ICoZyjvV7Pp9AYGrgSHErBFFKWOnC5IaaqzEJSk 3SRDFpRNCoHl7aGeCYsFNlS5YA6hKvuzSLzaTS088a3BAMU+rcVXSKguLWcx/+1ATD3O 5XoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E5167jgn1vEgb/7m4o/WTc56mdpvrlrUIUEe198IVkM=; b=g4UMOuMzOCQs5H7SLLJuALfIK4qkUlhN0gaamHdble40rHKq44KG+4p6lQnhpr/j+5 eSK3HqVYInlb31Cq3HXb10c0RcjpMNkWd6L5zzBygr38U80eiUmnhvm/EjAv9ksAL6/k mEtgg8I0UGPpn34Fdzr6RA4kkmfuLuM8pLEX5OslhIRQSA44TYGumBvvogATP49zMz8U s22U7wIiGXbkb+nc7+0kWE9yeV4GdQlK28Yl/W1512wMzs6amqR0KHPHYdPp4yqfptBh wx53Rv5gJ2S9FxUfhA1lz2sHHWSCb1NEEaH10te4BFm5Nn2PWt47l2/7SQAL3zdV5gO8 Ij0Q== X-Gm-Message-State: AOAM531m3E6ufUBv7XytFPKookxn01eJRpCBNojCUcvAYjyL3Lmla6NB Q6oeq0YGrS5wvi+kIQ2enUxZu60rIWwvVrddC9avg1WM X-Google-Smtp-Source: ABdhPJws04f9NlGVS1UJSAPjpqTECOk67r2LFAkvRKrNEGqmgWGcqOSm/8cieFBNSTeXqMaKPLhXIan4zhdXua8TpSw= X-Received: by 2002:a05:6214:b08:: with SMTP id u8mr28075795qvj.9.1618936772580; Tue, 20 Apr 2021 09:39:32 -0700 (PDT) MIME-Version: 1.0 References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> <20210420021318.GB18217@blisses.org> <0.2.0-final-1618896757.688-0xb6a34e@qmda.emu.st> In-Reply-To: <0.2.0-final-1618896757.688-0xb6a34e@qmda.emu.st> From: Freddie Cash Date: Tue, 20 Apr 2021 09:39:21 -0700 Message-ID: Subject: Re: Various problems with 13.0 amd64 on vultr.com To: Mark Delany Cc: FreeBSD Hackers X-Rspamd-Queue-Id: 4FPqCT5MfFz3DL6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=ZNR21sR5; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of fjwcash@gmail.com designates 2607:f8b0:4864:20::f2c as permitted sender) smtp.mailfrom=fjwcash@gmail.com X-Spamd-Result: default: False [-2.47 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::f2c:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.53)[0.528]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::f2c:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2c:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 16:39:34 -0000 On Tue, Apr 20, 2021 at 12:34 AM Mark Delany wrote: > On 19Apr21, Mason Loring Bliss allegedly wrote: > > > I haven't seen a hang yet, but the test system hasn't been up much more > > than ten minutes, so I'll report back later. > > I think I've isolated it to natd traffic. > > The system stays up reliably with natd disabled but hangs within a couple > of minutes of an > inbound ipv4 traffic. > > If I just run with the ipfw rule and the divert kernel module, then no > problem the system > runs albeit without any real ipv4 traffic working for obvious reasons. But > I can happily > do anything I like in ipv6 and it runs fine. > > But as soon as natd is run with inbound traffic such as an ssh session, > then the system > mostly hangs and according to the vultr console, it's spinning at 100% CPU. > If you re-write your rules to use the in-kernel libalias support instead of divert sockets sending traffic to natd, does it stay up while passing IPv4 traffic? That would help narrow it down even further to natd issues. -- Freddie Cash fjwcash@gmail.com From owner-freebsd-hackers@freebsd.org Tue Apr 20 19:12:58 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7F085E4502 for ; Tue, 20 Apr 2021 19:12:58 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPtcV3z5lz3McF for ; Tue, 20 Apr 2021 19:12:58 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mailman.nyi.freebsd.org (Postfix) id 883895E430B; Tue, 20 Apr 2021 19:12:58 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87FF85E4580 for ; Tue, 20 Apr 2021 19:12:58 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-qk1-x72f.google.com (mail-qk1-x72f.google.com [IPv6:2607:f8b0:4864:20::72f]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPtcT4Wnlz3MfP for ; Tue, 20 Apr 2021 19:12:57 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-qk1-x72f.google.com with SMTP id o5so40558988qkb.0 for ; Tue, 20 Apr 2021 12:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=/GRFx3gTW278E0l+jZqtXfAB4orsiAHzkgAo20FXsY4=; b=NEdupQfpN0jc6FI3Ps/+RyvbYysy2wM0YG1Vg/IMP5LJIAqytVO9YrqNlVATQixx// B/xhXBOp94qH3TH1L2kNbvXRW65R5byOSg4eI+dAzOgCa4V2AbdIee86RwA/I8IvT6dB vYGjHuOQeuema5WIvnyXYlEPwaGwx4UqiMAlqF1K5dMYtpyPrPFELtcB+2fhtKZF+ewD qZaOV2jh/Y1DTii//ufogW2tnfTvfcL6FN7kWAe+0FD9YovNEzfNxDULjpsbM1uwC7pI 8LgI/ifJhkZcdCZpAJYC7fMzWMPz7nKw+BGjeCkrtfb0Ff9D0LthxO7paQ4q12824oMB Irfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/GRFx3gTW278E0l+jZqtXfAB4orsiAHzkgAo20FXsY4=; b=mfIS+rjUEsDMjMFJQG6/6j9zQw7DbOZqeXdqsOxf/XcKsYFAfPQQrOa0vWzzGkiqVG PzhRgPjmhJmOH9wFSSxTrxg/2BTOUDpxlzsJ9/fA5/iU1EdlwsOn4TUpi5AzR1QCl8Zf arf1YPFkiXYFUOTynPqltQDP8xpm11LVR4+5zlECjfJ1caOgTg+ZDsURuc7RZLn/4Leb pYfTntlLOc4/E/rjMPycmQyLqntf7opPf/3nEVG9895nK+fTKgSnnKA8EGWdmwpfqVUg C4DQZVXf8slOZnu0v+vjlYv8BwpaRLiJsxfoMLA8nNjwHO0sj9YQNeRR6XXEvY6ASv/C 97Bw== X-Gm-Message-State: AOAM531204jgIrSQtpOI8fxmdKamnbIS5FEggG46bPByXD2Tmmvz2mTJ ecwv0bgMXAe6PJ0c7tJRj5f3vwVEfli9HkPZpG1c/zbIJliJ/vtK X-Google-Smtp-Source: ABdhPJxKQ2WSazqvl9K4ElhV9LCRetFhqZablNimTTi8rcA69BuSSoPFmDLu661ULKqVTFHJ5PqvH+9qFU5YRspZy5g= X-Received: by 2002:a05:620a:16db:: with SMTP id a27mr3767832qkn.251.1618945976278; Tue, 20 Apr 2021 12:12:56 -0700 (PDT) MIME-Version: 1.0 From: Mark Saad Date: Tue, 20 Apr 2021 15:12:46 -0400 Message-ID: Subject: IFconfig libxo support To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FPtcT4Wnlz3MfP X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=longcount.org header.s=google header.b=NEdupQfp; dmarc=none; spf=pass (mx1.freebsd.org: domain of nonesuch@longcount.org designates 2607:f8b0:4864:20::72f as permitted sender) smtp.mailfrom=nonesuch@longcount.org X-Spamd-Result: default: False [-1.54 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[longcount.org:s=google]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; DMARC_NA(0.00)[longcount.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::72f:from:127.0.2.255]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[longcount.org:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72f:from]; NEURAL_SPAM_SHORT(0.96)[0.962]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::72f:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 19:12:58 -0000 Hi All Does anyone know if there is any work on getting ifconfig to emit output via libxo ? I am trying to simplify some code I have to audit configs. Libxo here would help. -- mark saad | nonesuch@longcount.org From owner-freebsd-hackers@freebsd.org Tue Apr 20 19:24:53 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ADA815E4BB5 for ; Tue, 20 Apr 2021 19:24:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPttF3Wwdz3NHg for ; Tue, 20 Apr 2021 19:24:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 790735E4D1C; Tue, 20 Apr 2021 19:24:53 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78D105E4E85 for ; Tue, 20 Apr 2021 19:24:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPttF2wX8z3NWZ for ; Tue, 20 Apr 2021 19:24:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f47.google.com with SMTP id 65-20020a9d03470000b02902808b4aec6dso32068194otv.6 for ; Tue, 20 Apr 2021 12:24:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bYsVvuHROLnjtG3gf4m+gD6GTkYP9MiXSALpxbOWwJM=; b=tr93eHGVx63Pc+Q9kQngs15/pKOSOwR5ELrpc8vpXqByM4LK9N5DcwZatDGGZUpTvl PzO1GTN0C0XzZIUGkB4R1Jdizqn88Ae9ZVBOMN7uXjm6ocpsyxfWuZgEQxtAwWePoEI8 tQg0uk6qF+Sg0dPm6snlJCcBOdvMzaEeNnVHpsXv5YuPBDQNQgrSrLXucjt4eBiOdoF/ yECNk3yzHzqgMVV2l49i7qpkB0MQUlUPn8M8exhiF4tlCXtaiLVTaXOY/bXwsJLl9Pha TUxmv3lEtTWeI6EvVmH0gqGGe7CPn8pDVDyO1G7i6XTtl8m24IKc5tdbf+x4r3qxgK28 ssVw== X-Gm-Message-State: AOAM531Fo4498iWOuY6Yt8XQzqLlismilp8R+nqjattWbmvkCLtA17qe OwB6pxtud9r1j3W1Ytopng7gnwPYs2B5OWAOYN43XE0m X-Google-Smtp-Source: ABdhPJy92ioauQUlVFzgN+qA5baiNeKDbM6JYCZRvJVjuBKz+LoKp1Kt0SRvEx9UPRdg4nIDp8wsYbht7xQ669vIY2E= X-Received: by 2002:a9d:6846:: with SMTP id c6mr20881711oto.251.1618946692094; Tue, 20 Apr 2021 12:24:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Tue, 20 Apr 2021 13:24:41 -0600 Message-ID: Subject: Re: IFconfig libxo support To: Mark Saad Cc: "freebsd-hackers@freebsd.org" X-Rspamd-Queue-Id: 4FPttF2wX8z3NWZ X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 19:24:53 -0000 I don't think so. But libifconfig might help you. On Tue, Apr 20, 2021 at 1:13 PM Mark Saad wrote: > Hi All > Does anyone know if there is any work on getting ifconfig to emit > output via libxo ? > I am trying to simplify some code I have to audit configs. Libxo here > would help. > > -- > mark saad | nonesuch@longcount.org > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Tue Apr 20 19:26:11 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 677015E4EED for ; Tue, 20 Apr 2021 19:26:11 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPtvl1BB2z3NXS for ; Tue, 20 Apr 2021 19:26:11 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mailman.nyi.freebsd.org (Postfix) id 28A065E50A3; Tue, 20 Apr 2021 19:26:11 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 286965E502A for ; Tue, 20 Apr 2021 19:26:11 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPtvl0ZlCz3NdW for ; Tue, 20 Apr 2021 19:26:10 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mail-oi1-x22b.google.com with SMTP id v6so12248984oiv.3 for ; Tue, 20 Apr 2021 12:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixsystems.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FVKQZMHn8fWhObZ18LGPehDcWYVCSz2MPr0YegyF7c0=; b=koqEMpH2RwdaqLrmv+5JAQ7ASSGYbvezLiJQl7ZF+JiQovppYF1ZWWUgzLiPx9ZNQc P89h6tf+mlWhP3B2GkYP4TQmbJRuTw1+pwM5rYokZacCuEYOyZ6eON3eSaD3K5XldhGc l/Fi2vq4Um7XH+AgGRctrZUrejT9TfxQBfBcXx48yN2Kfs8we04Qdht9s5zNw409mWHD coEhYXIGYsm1PFsjGO2zNiBUPM5NZTcmboOtGOLSvks2K9iJup49vjvjwf+KL5Nu4IHC y2ryAqeo5M0VBCBaZ5Ip9y7PXyLGEn1knzPVuryiJZduiNBqmiII+qlvz4t2sJGYsn03 A4Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FVKQZMHn8fWhObZ18LGPehDcWYVCSz2MPr0YegyF7c0=; b=ig4TnjySmJrlD5D0GAb9RBf4o6EMtiXa79MB8+iK4f0IOfN6RkQd8+atdiCzhdCedL H8Yw/uHF/z2DN3Uc9T799gWX2OHIuI1KvLVOhmdPss45W6yvYJcaiF4f5ig6INggkUIj 8QlfqRheBcmZd7KEPfLxpWVYeJANrNice9n+IXV+OuEeIE0W4QtCkjbJQb00MKZkZkYB y1ZqwBAYvtfK43RJjJAEY0X7CVRmLqqGwpsTWwyACKMzxznZm5dGHJXHmij9UGisiA3V Nfyf/kjm8wjhj8nxPOg+nj+ckeQ0/J+aGdnxMjFGvcfhtWKGhhHNgxqyn7MoJjfcmf7a vKRw== X-Gm-Message-State: AOAM533s1JG8N0KPlzbt9TXvVvOcLOn/caCoOZxiRiROfKOeVWECm36r /189+etk0Z3xrZGk/uTMQC1yIAZrz7jTV5lb1d0Y11zHezI= X-Google-Smtp-Source: ABdhPJytEgp9JENUQptg6j6ZuppzYxQP0HR5LTR+gyAkbGk27xaJK1tgA9i2J20Ebmxjaw9iCLRRLQZcnvddjE3Cg9U= X-Received: by 2002:aca:6749:: with SMTP id b9mr1486730oiy.128.1618946769681; Tue, 20 Apr 2021 12:26:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ryan Moeller Date: Tue, 20 Apr 2021 15:25:59 -0400 Message-ID: Subject: Re: IFconfig libxo support To: Mark Saad Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FPtvl0ZlCz3NdW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 19:26:11 -0000 There is no work to that end that I'm aware of, but there is some info available via libifconfig and flua. See /usr/share/examples/flua/libifconfig.lua for sample code that will dump a good amount of ifconfig state to json. On Tue, Apr 20, 2021 at 3:13 PM Mark Saad wrote: > > Hi All > Does anyone know if there is any work on getting ifconfig to emit > output via libxo ? > I am trying to simplify some code I have to audit configs. Libxo here > would help. > > -- > mark saad | nonesuch@longcount.org > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Ryan Moeller iXsystems, Inc. OS Developer Email: ryan@iXsystems.com From owner-freebsd-hackers@freebsd.org Tue Apr 20 19:29:47 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4ED395E578F for ; Tue, 20 Apr 2021 19:29:47 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPtzt6v36z3P8k for ; Tue, 20 Apr 2021 19:29:46 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mailman.nyi.freebsd.org (Postfix) id EC9405E580A; Tue, 20 Apr 2021 19:29:46 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC5C25E5900 for ; Tue, 20 Apr 2021 19:29:46 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPtzt0fPjz3P0M for ; Tue, 20 Apr 2021 19:29:45 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mail-ot1-x329.google.com with SMTP id d3-20020a9d29030000b029027e8019067fso34914094otb.13 for ; Tue, 20 Apr 2021 12:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixsystems.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GhNJLUKtOEqIDLv5pI1ANi8UNn5pA7H/v+0WECqy660=; b=LNb6GRwgRKulw8jFoWItw57r2KYKvTvdBoaDdQeuVzfTi/TFLSSybIJ5mdl3uZr4Nh sNcdi218XZXqpW2gYOrCC0D0mCcEPJFCz3f/CsnlCslap899yljFX5j2ChAfjOa84x0X 40jclLM63ZrDQ+Hmcf2s/9TupcDiRI3YZVnUlS4JxDv5rqmpo0qbUl9iUt/42izGY/fj YgcdCJGLv9RRA9H9aw7FEOxEBbW0u7YYb9egqFUCa1xix2LU+/zlfFGay28/gPTIEd27 w3rBuQnWlCHectXE1zEvViUHmv3PxKz0i9SM8eGeHEUbhkiUDJ/BH0ZoYEltthCUQlzo PCrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GhNJLUKtOEqIDLv5pI1ANi8UNn5pA7H/v+0WECqy660=; b=d/Scih8C7Cv+EIbBTPxD16tVkSVBCWSHltdZTUaVAnb1EsL2XrcUNYwrLVOZNOi0JG zVekrfuKjF2DttssKaBz/ag6hFvPWse+jMMjtww5gZHZ9SObOndAJ1uFy8rDl2bl5Npv +HRI9+glo9bWX6hwqHEbcywgzCwDqbeLdI8l6WSRGhTpeDgthoqjPu0whUsGO+BylxUI axiQdYICTZ/FHhKu03Iuv7AaxVxnKtRFpxBy/NgzMXxwz/7O83As11rOr0gEOv5WpfiA /Ww4VgAU9XTl6LwBhy85FFNDqC2ZNGvdCJcxVT0N5ofhzVLS4MvQQKeurhQE6lbzsWSh wFvg== X-Gm-Message-State: AOAM532EEl4/RA2NGLXWLq/birvQYiUFxw+1N3VSS9FNmpbzTJ6W7KW/ 2keNlUddVxJdWdB2TR+YUdDJ7Ezm1olZkMLjmDC3bQ== X-Google-Smtp-Source: ABdhPJxXIfTRdp6lyx5c11U/qq7zU5VAehXxripau8vu57g3446tq+aCHwRq+GQ3YfWu30rYhq/39r08zcj/uiXLpv8= X-Received: by 2002:a9d:61d0:: with SMTP id h16mr9344547otk.363.1618946984751; Tue, 20 Apr 2021 12:29:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ryan Moeller Date: Tue, 20 Apr 2021 15:29:33 -0400 Message-ID: Subject: Re: IFconfig libxo support To: Mark Saad Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FPtzt0fPjz3P0M X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ixsystems.com header.s=google header.b=LNb6GRwg; dmarc=pass (policy=none) header.from=ixsystems.com; spf=pass (mx1.freebsd.org: domain of ryan@ixsystems.com designates 2607:f8b0:4864:20::329 as permitted sender) smtp.mailfrom=ryan@ixsystems.com X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[ixsystems.com:s=google]; FREEFALL_USER(0.00)[ryan]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RBL_SENDERSCORE_FAIL(0.00)[2607:f8b0:4864:20::329:server fail]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::329:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[ixsystems.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::329:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[ixsystems.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::329:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 19:29:47 -0000 Haha nevermind, that has not been committed yet. Here's the raw code here for now: - https://gitlab.com/freqlabs/lua-libifconfig - https://reviews.freebsd.org/D25447 On Tue, Apr 20, 2021 at 3:25 PM Ryan Moeller wrote: > > There is no work to that end that I'm aware of, but there is some info > available via libifconfig and flua. See > /usr/share/examples/flua/libifconfig.lua for sample code that will > dump a good amount of ifconfig state to json. > > On Tue, Apr 20, 2021 at 3:13 PM Mark Saad wrote: > > > > Hi All > > Does anyone know if there is any work on getting ifconfig to emit > > output via libxo ? > > I am trying to simplify some code I have to audit configs. Libxo here > > would help. > > > > -- > > mark saad | nonesuch@longcount.org > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > -- > Ryan Moeller > iXsystems, Inc. > OS Developer > Email: ryan@iXsystems.com -- Ryan Moeller iXsystems, Inc. OS Developer Email: ryan@iXsystems.com From owner-freebsd-hackers@freebsd.org Tue Apr 20 19:35:00 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A61285E59CC for ; Tue, 20 Apr 2021 19:35:00 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPv5w25L8z3PTP for ; Tue, 20 Apr 2021 19:35:00 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mailman.nyi.freebsd.org (Postfix) id 47BF45E5CB7; Tue, 20 Apr 2021 19:35:00 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4785E5E5A3F for ; Tue, 20 Apr 2021 19:35:00 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPv5v3swYz3PYh for ; Tue, 20 Apr 2021 19:34:58 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-qk1-x72e.google.com with SMTP id q136so19643401qka.7 for ; Tue, 20 Apr 2021 12:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=NCq2b1jGlJfo+bmvsDj3ENH2FKb8BJNY7VoCRTZGhL8=; b=eA18wOsdNpwvCar2jkxaUKBJfrc8BWJBVx+c8UnOXLNSzRxxz2pqOiwXVrFCv8qXyC UJ3tbpWEK/mBaOX1uVwIJWh3k3dGY9t7lVjJ9DdEnQy1U8DTEAh/PARwLwJVkY8a1XGn rMaeZL5iXuCfv7X82aA/m8L6TfeMbDZtYkhG7pB6ojos5Kk2UOGoMF1mRvyWQHicvgJ7 UP1ZKvFc3FH+q3E13XIhAV0NkQ0fpx1yreBReDxp3vFt+oAvQD9pjRGRfcnwWj0vgLAG o+hWzDi2uigBLJR85GyZJkw1htAAXT2VtC0Zc9rDM7GNuLb2EFcaeiuQJu9NF9KZDMdY FmcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=NCq2b1jGlJfo+bmvsDj3ENH2FKb8BJNY7VoCRTZGhL8=; b=bMPnAciDqbQk32sGxXVjRdmJd1yhnb7d1Z9lRuKbwk1taU58H+e/Wfq/4wwqRvZRXZ TgAg9udHXLH5ONqFEDwhffUpEjyRTocjca/DqfFBgv0SKIn6Yq/Jb6TkcIyXv/F8cNdT Ed9TUH8qry/1Qgr0X5HYB4vYUmWbayOVy2agnu3eFHt1DY2KHYzNNcZCbk7lrHlX2Pjq 2TmUh+sohNkuR8BmYt9bxKAetioFC3vf489M8SxTkLX0peHbrk/jt6Z/OnyUcibCJOmH 8AT7cGROB3S6q5KyGJHlUA3kRymHf/ivKPtdROVGZRw1neU1C9VE76ZTmoJGHA0N+S8O zxhw== X-Gm-Message-State: AOAM531sQxa5Gs2tATZG3IYENmqked1fLU7ZfKoBQWINlP7XI+zmrA9U YcPddZt7xhEjOGfqDMnolVxDnizfYtLR/e/Ck/rUJaGCKUXZvE3D X-Google-Smtp-Source: ABdhPJw/Ut2zEfHt0CJS7SAzGly/7xKl4MMclEt3Ep0hFGEYMiwFnQdNZyOvZvyFVEtcXKHa7Rn7wf4IBLMqGNTaUOU= X-Received: by 2002:a05:620a:b0a:: with SMTP id t10mr18637303qkg.103.1618947297913; Tue, 20 Apr 2021 12:34:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Mark Saad Date: Tue, 20 Apr 2021 15:34:47 -0400 Message-ID: Subject: Re: IFconfig libxo support To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FPv5v3swYz3PYh X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=longcount.org header.s=google header.b=eA18wOsd; dmarc=none; spf=pass (mx1.freebsd.org: domain of nonesuch@longcount.org designates 2607:f8b0:4864:20::72e as permitted sender) smtp.mailfrom=nonesuch@longcount.org X-Spamd-Result: default: False [-3.50 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[longcount.org:s=google]; RBL_SENDERSCORE_FAIL(0.00)[2607:f8b0:4864:20::72e:server fail]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[hackers@freebsd.org]; DMARC_NA(0.00)[longcount.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::72e:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[longcount.org:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72e:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::72e:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 19:35:00 -0000 On Tue, Apr 20, 2021 at 3:29 PM Ryan Moeller wrote: > > Haha nevermind, that has not been committed yet. Here's the raw code > here for now: > - https://gitlab.com/freqlabs/lua-libifconfig > - https://reviews.freebsd.org/D25447 > So any reason that ifconfig is going this way over how say netstat has --libxo as an output option ? > On Tue, Apr 20, 2021 at 3:25 PM Ryan Moeller wrote: > > > > There is no work to that end that I'm aware of, but there is some info > > available via libifconfig and flua. See > > /usr/share/examples/flua/libifconfig.lua for sample code that will > > dump a good amount of ifconfig state to json. > > > > On Tue, Apr 20, 2021 at 3:13 PM Mark Saad wrote: > > > > > > Hi All > > > Does anyone know if there is any work on getting ifconfig to emit > > > output via libxo ? > > > I am trying to simplify some code I have to audit configs. Libxo here > > > would help. > > > > > > -- > > > mark saad | nonesuch@longcount.org > > > _______________________________________________ > > > freebsd-hackers@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > > > > > > -- > > Ryan Moeller > > iXsystems, Inc. > > OS Developer > > Email: ryan@iXsystems.com > > > > -- > Ryan Moeller > iXsystems, Inc. > OS Developer > Email: ryan@iXsystems.com -- mark saad | nonesuch@longcount.org From owner-freebsd-hackers@freebsd.org Tue Apr 20 20:23:41 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE1DD5E7744 for ; Tue, 20 Apr 2021 20:23:41 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FPwB53KyLz3hjV for ; Tue, 20 Apr 2021 20:23:41 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mailman.nyi.freebsd.org (Postfix) id 722145E7673; Tue, 20 Apr 2021 20:23:41 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71B635E7A93 for ; Tue, 20 Apr 2021 20:23:41 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FPwB52FHDz3hjS for ; Tue, 20 Apr 2021 20:23:40 +0000 (UTC) (envelope-from ryan@ixsystems.com) Received: by mail-oi1-x229.google.com with SMTP id x20so6464985oix.10 for ; Tue, 20 Apr 2021 13:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixsystems.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jYY05URjjl0GSCELLPjTXv6RjOfW6GlUglJCi2S8q0M=; b=K4ejtfC6NGsE2uPdycdqrCub6Z0k97HfBEAqxk3tRZ9HtfEyeC8r+tjUKVpWhQur9C gHon86VM+ERqtzvPSn/ZkohhakmkH37W0VY2lHjDYMpQmiyDZhWmrKMP9PGdYBPKM9pY jl5yA+esUwv49x326ZVYFvkfx4ptmKqoje5kNr3+WpxDXffzd6jzPST2KYPL5v96+4cu JpNIwt/YI5u6oaPbwVuX0a8d6fwePOCN5H6CXXlUnfxqZyCJLviPDxsxHTZCaQgdcKjd X0CvfAm35AXte2wMRk6m2xbAz33Ynx3GsL+df6/OuqEM7AOpTnv8rZRFNTpk2B2Zjqvj mNfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jYY05URjjl0GSCELLPjTXv6RjOfW6GlUglJCi2S8q0M=; b=irj4lBFYx176pMO5hi4eUr/r/d4Mt+ZelNBVEc54ugqi9nAqlV6Vp5kcv6p8zL8VGm CxySTfPZCuLB6VCi3XmxIy9I1MlMlxgkW8/jh72R8lM7S9WC/HSwMpuXjNmb9nlj4QOB +SOTTEcF8BSNdvo3C0OLEFZvuW1Gxg8TQN2RI8zvw3S61TNvP7Hn4xAME0hIX053UpNR qaOfhN7+pGP0tgETjJ/YeW5c5optBzIq1d+aD+UnNT/51aaYM8VLTrmREYwA7G6NXgDd 6u+veLqlWlZoUNeFXGul67zwQQXwYzCWPHIIFD/GRq0jwQ2m2qtezB1JMY/fJfMxpyUm g4Fw== X-Gm-Message-State: AOAM530zPI8tuwLdvw2RgQHqT5vd3j0qNP+bqL6oS07dVH+kD1FVZpn6 xfx4lRkdEtqRlR9MCEr+n8aQPZ2ycFZ8DvtG/axGRw== X-Google-Smtp-Source: ABdhPJwWDc+qKaxjzYtYPHG1h0uQ3PmllB+w7fUJqDv4UxZExiqEW5kMsfYwIBVyI6Iz4gnPPhKcXFNew4U7ptzXWYA= X-Received: by 2002:aca:dd86:: with SMTP id u128mr4316676oig.155.1618950219053; Tue, 20 Apr 2021 13:23:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ryan Moeller Date: Tue, 20 Apr 2021 16:23:28 -0400 Message-ID: Subject: Re: IFconfig libxo support To: Mark Saad Cc: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FPwB52FHDz3hjS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 20:23:41 -0000 On Tue, Apr 20, 2021 at 3:35 PM Mark Saad wrote: > So any reason that ifconfig is going this way over how say netstat has > --libxo as an output option ? They're not mutually exclusive. libifconfig handles the low level information gathering, and ifconfig formats it for output to the user. One could still make ifconfig use libxo for formatting the output. I just happen to be working on libifconfig lately and am using the flua binding for testing. Outputting JSON for the available configuration information is simply a practical demonstration of the flua binding, it's not the end goal. -- Ryan Moeller iXsystems, Inc. OS Developer Email: ryan@iXsystems.com From owner-freebsd-hackers@freebsd.org Wed Apr 21 07:16:13 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 164535F9D33 for ; Wed, 21 Apr 2021 07:16:13 +0000 (UTC) (envelope-from x9k@charlie.emu.st) Received: from f3.bushwire.net (f3.bushwire.net [203.0.120.11]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQBfy4HPDz4k2H for ; Wed, 21 Apr 2021 07:16:10 +0000 (UTC) (envelope-from x9k@charlie.emu.st) Received: by f3.bushwire.net (Postfix, from userid 1001) id E4A813AD3A; Wed, 21 Apr 2021 17:15:50 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=emu.st; s=2019; t=1618989350; bh=9LXM67p2KnyQfF1j+gEb3He2+y4=; h=Comments:Received:From:Comments:Message-ID:References: Mime-Version:Content-Type:In-Reply-To:To:Subject: Content-Disposition:Date; b=i4fDKMQ6Guoo06pj+F6x/h2sB86WHHiGbb+0SGzbUo9fOgQM6DpPvDR+HXUeqQOiP XD49T313QnwRo+vPRL6lC7Y0Nx+VBjHdFPk9XFPdVUCt4afERpFm2LGz6SviUpb/IV gvccqxfEPDao2P2nefD5fRufmbVDIvIFX0VCLOz0=VCLOz0= Comments: QMDA 0.3a Received: (qmail 72042 invoked by uid 1001); 21 Apr 2021 07:15:50 -0000 From: "Mark Delany" Comments: QMDASubmit submit() 0.2.0-final Message-ID: <0.2.0-final-1618989350.827-0x8feb00@qmda.emu.st> References: <0.2.0-final-1618742820.474-0x878fa2@qmda.emu.st> <20210420021318.GB18217@blisses.org> <0.2.0-final-1618896757.688-0xb6a34e@qmda.emu.st> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: To: FreeBSD Hackers Subject: Re: Various problems with 13.0 amd64 on vultr.com Content-Disposition: inline Date: Wed, 21 Apr 2021 07:15:50 +0000 X-Rspamd-Queue-Id: 4FQBfy4HPDz4k2H X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=fail (headers rsa verify failed) header.d=emu.st header.s=2019 header.b=i4fDKMQ6; dmarc=none; spf=pass (mx1.freebsd.org: domain of x9k@charlie.emu.st designates 203.0.120.11 as permitted sender) smtp.mailfrom=x9k@charlie.emu.st X-Spamd-Result: default: False [0.17 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.97)[0.971]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:203.0.120.0/24]; DMARC_NA(0.00)[emu.st]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[203.0.120.11:from:127.0.2.255]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[emu.st:-]; R_DKIM_REJECT(1.00)[emu.st:s=2019]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.0.120.11:from]; ASN(0.00)[asn:4764, ipnet:203.0.120.0/24, country:AU]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 07:16:13 -0000 On 20Apr21, Freddie Cash allegedly wrote: > If you re-write your rules to use the in-kernel libalias support instead of > divert sockets sending traffic to natd, does it stay up while passing IPv4 > traffic? > > That would help narrow it down even further to natd issues. I've not used the in-kernel NAT support before so it'll take me a little while, but I'll give it a shot and report back. Mark. From owner-freebsd-hackers@freebsd.org Wed Apr 21 08:36:32 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B94095FCC94 for ; Wed, 21 Apr 2021 08:36:32 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQDRh4dn2z4pNt for ; Wed, 21 Apr 2021 08:36:32 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.nyi.freebsd.org (Postfix) id 9F0CB5FCC93; Wed, 21 Apr 2021 08:36:32 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9ED115FCB3E for ; Wed, 21 Apr 2021 08:36:32 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQDRZ3qkdz4pNs for ; Wed, 21 Apr 2021 08:36:24 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=To:Date:Message-Id:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From; bh=E13jbSs8pwA6UNrvZJUEjFTqqLKbwVaNzTMJ/sEhuwc=; b=C8SGiJ4dfsrGM7gRjy2tZA5l2ZD5eB42qvGJdM1XmH5K8z6iuDmjle8o0MT6NjyNZIMo8Y1ShJLZC7JySbm5RxrUBSHGe+rUMZTvJfYAZ8wCZoDYQgXZo9QM0lPhVgj0WtcIB52mkCF71aC5AtYldGr5//BJ07mX5deqEQyounSIA94hAnUtObqw3wTx4a5k/rdh6Obh6NUt+0lXpw/3fNceqxxv/ygzoNMMoVlLSkfEEdB2sUv8NomR9mpv84zk7rPnEbe5mAb8E+0+Sf43z8N0qcfPWFCpZPP+e4aq7ckJGyvTlRVtOiQJZvq/rsGM/DColtd9rG+gzgeExy6nHQ==; Received: from bach.cs.huji.ac.il ([132.65.80.20]) by kabab.cs.huji.ac.il with esmtp id 1lZ8LG-0005dp-Jk for hackers@freebsd.org; Wed, 21 Apr 2021 11:36:14 +0300 From: Daniel Braniss Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: autofs/auto_master Message-Id: Date: Wed, 21 Apr 2021 11:36:14 +0300 To: "freebsd-hackers@freebsd.org" X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FQDRZ3qkdz4pNs X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=C8SGiJ4d; dmarc=pass (policy=none) header.from=huji.ac.il; spf=none (mx1.freebsd.org: domain of danny@cs.huji.ac.il has no SPF policy when checking 132.65.116.210) smtp.mailfrom=danny@cs.huji.ac.il X-Spamd-Result: default: False [-1.67 / 15.00]; RBL_SENDERSCORE_FAIL(0.00)[132.65.116.210:query timed out]; MV_CASE(0.50)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; DMARC_POLICY_ALLOW(-0.50)[huji.ac.il,none]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[132.65.116.210:from]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:IL]; MID_RHS_MATCH_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_SPACES(0.50)[]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; FREEFALL_USER(0.00)[danny]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.13)[0.129]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[132.65.116.210:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 08:36:32 -0000 hi, after changing auto_master, is there a less violent way than reboot to have it reloaded? thanks, danny From owner-freebsd-hackers@freebsd.org Wed Apr 21 10:50:35 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 384815E048D for ; Wed, 21 Apr 2021 10:50:35 +0000 (UTC) (envelope-from manav1811kumar@gmail.com) Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQHQL4Ff2z3C8y for ; Wed, 21 Apr 2021 10:50:34 +0000 (UTC) (envelope-from manav1811kumar@gmail.com) Received: by mail-pg1-x52d.google.com with SMTP id m12so8693019pgr.9 for ; Wed, 21 Apr 2021 03:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=tQNBiYQFMKXvw+kvPzknFaT69WqH9/ql++NO7uzBBtI=; b=Oiq7SRHgrblziJVIy4ydjGA1qqhoBon5qjUAM0K8g+7ej0De9sQmLQUSRNcmozOqjt aNahDojeuMoGnU3EkCT/vt5M2cKhBlhrlgk4QPZzAL2ntfbMqO2BkO3TYy3lpk8AbMI2 m+yzNFJWAJ4MqhGbF+pS8ZDwf9hFSLict3tm3QVDH1eN/UHlKvucUh/yOEBQWIjwgCi4 XmsFrIlDDGwfiDZShOEjTbELJnU9TvoVkTnwDjl7zPYK9Jmsd2iDF+FT/P8aF1uTyH9/ JdWK0GWBGjALElOVBo2WrN4lYhmxnqKVvRp6aL85cA08v1sRlb/+iPhy5phyIamIpC2d Acmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=tQNBiYQFMKXvw+kvPzknFaT69WqH9/ql++NO7uzBBtI=; b=UNyYMXEBJWHJeXvh1oHNQsejSuQ70FpPPY3tLv2uFvZxBMIePpjJ5963d7U/v/2ojb dvp4R8e82VNHiYEK5pOOGb2DBT0QDV6uoGc40l4FX7tR+LO9gCu5A9mnTXrqKjKBH3uh GvmANna9Fp7YOiI3/yFY4+n32Da7RqahSKbZT69dDIdtnJsZul6Cf3/duC6MskqDIzx5 f5hkAFYoITJyoMDd1vKqegwsmZZ2UvpaUU/7wy6QhroNx9/P5fu1LevZbUiu4ZG0yNFZ 1M/w459X/QAqOhjagP51QFSLBSovDamtD089HGeWW0NkSQel7Kl3HhfjQwyugWdKXRwP 4Kwg== X-Gm-Message-State: AOAM531Bw/h+JCmYuyjwpHCy0PV66p2YhvF3PliuS12pH8K85XvW2k3x P0sKreFJLa8Ru3oz3Dpsh/TYIUKo208cVQ== X-Google-Smtp-Source: ABdhPJxAatDV4CRZi8ylZ8P/vOWJzBRGjZAFzMeKgkzyDGqwd2q7TQeNUSxWJi7Jii2IEWaOY4K5aw== X-Received: by 2002:a17:90a:a604:: with SMTP id c4mr9134211pjq.81.1619002232841; Wed, 21 Apr 2021 03:50:32 -0700 (PDT) Received: from [192.168.18.46] ([49.156.92.59]) by smtp.gmail.com with ESMTPSA id r3sm1532023pgn.82.2021.04.21.03.50.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Apr 2021 03:50:32 -0700 (PDT) From: MANAV KUMAR Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: How to start contributing Message-Id: Date: Wed, 21 Apr 2021 16:20:29 +0530 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.3445.104.11) X-Rspamd-Queue-Id: 4FQHQL4Ff2z3C8y X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Oiq7SRHg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of manav1811kumar@gmail.com designates 2607:f8b0:4864:20::52d as permitted sender) smtp.mailfrom=manav1811kumar@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_SENDERSCORE_FAIL(0.00)[2607:f8b0:4864:20::52d:server fail]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; MV_CASE(0.50)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::52d:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; SUBJECT_ENDS_SPACES(0.50)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[49.156.92.59:received]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::52d:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52d:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 10:50:35 -0000 Hello All, I=E2=80=99m final year cse undergrad, looking to work in core OS = technologies. Can somebody please give me a quick start about ongoing = freebsd projects.=20 And I have shortage of space and computation power, is there any = alternative to generate the build without me purchasing new machine.=20 Thanks Manav= From owner-freebsd-hackers@freebsd.org Wed Apr 21 12:28:41 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5FAB15E3E23 for ; Wed, 21 Apr 2021 12:28:41 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from mail.rlwinm.de (mail.rlwinm.de [138.201.35.217]) (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 4FQKbX4NQkz3J8L for ; Wed, 21 Apr 2021 12:28:40 +0000 (UTC) (envelope-from crest@rlwinm.de) Received: from alteisen.local (200116b86422710008495ec6effb296d.dip.versatel-1u1.de [IPv6:2001:16b8:6422:7100:849:5ec6:effb:296d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.rlwinm.de (Postfix) with ESMTPSA id 7768525A09 for ; Wed, 21 Apr 2021 12:28:33 +0000 (UTC) Subject: Re: How to start contributing To: freebsd-hackers@freebsd.org References: From: Crest Message-ID: <3aef766a-3457-6fdf-8df5-cae87dc4655a@rlwinm.de> Date: Wed, 21 Apr 2021 14:28:30 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 4FQKbX4NQkz3J8L X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of crest@rlwinm.de designates 138.201.35.217 as permitted sender) smtp.mailfrom=crest@rlwinm.de X-Spamd-Result: default: False [-1.76 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[138.201.35.217:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RBL_SENDERSCORE_FAIL(0.00)[138.201.35.217:server fail]; SPAMHAUS_ZRD(0.00)[138.201.35.217:from:127.0.2.255]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.45)[0.451]; NEURAL_HAM_LONG(-0.99)[-0.987]; DMARC_NA(0.00)[rlwinm.de]; NEURAL_HAM_MEDIUM(-0.92)[-0.921]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:138.201.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[2001:16b8:6422:7100:849:5ec6:effb:296d:received] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 12:28:41 -0000 On 21.04.21 12:50, MANAV KUMAR wrote: > Hello All, > I’m final year cse undergrad, looking to work in core OS technologies. Glad to hear you're interested in hacking on FreeBSD. > Can somebody please give me a quick start about ongoing freebsd projects. Someone already collected a list of low hanging fruits in FreeBSD that could be improved: https://wiki.freebsd.org/Networking#Low_hanging_userland_fruit > And I have shortage of space and computation power, is there any alternative to generate the build without me purchasing new machine. How low are we talking about. The FreeBSD build system can help speed up incremental builds enormously with the make meta mode (see man src-env.conf). Even my old dual core Thinkpad X220 can build FreeBSD (world and kernel) in <10 minutes with meta mode enabled unless a lot has changed. From owner-freebsd-hackers@freebsd.org Wed Apr 21 14:31:57 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E9515E76AD for ; Wed, 21 Apr 2021 14:31:57 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQNKm6sqKz3Q2M for ; Wed, 21 Apr 2021 14:31:56 +0000 (UTC) (envelope-from se@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id EBD4C5E76AC; Wed, 21 Apr 2021 14:31:56 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB9FC5E75CF for ; Wed, 21 Apr 2021 14:31:56 +0000 (UTC) (envelope-from se@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 4FQNKm6CfZz3PtJ; Wed, 21 Apr 2021 14:31:56 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-449.fritz.box (p200300cd5f190e000c2716ac575e1ce0.dip0.t-ipconnect.de [IPv6:2003:cd:5f19:e00:c27:16ac:575e:1ce0]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 5C0C2278C3; Wed, 21 Apr 2021 14:31:56 +0000 (UTC) (envelope-from se@freebsd.org) To: Daniel Braniss References: From: Stefan Esser Cc: "freebsd-hackers@freebsd.org" Subject: Re: autofs/auto_master Message-ID: <6e092d75-bcb6-e522-e723-74b0a14a3143@freebsd.org> Date: Wed, 21 Apr 2021 16:31:53 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EfpzmMxpwtYZeTr5caKwcS3o8rhDoea5o" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 14:31:57 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EfpzmMxpwtYZeTr5caKwcS3o8rhDoea5o Content-Type: multipart/mixed; boundary="NAlJSyOFfsyEK2xerUGetlskFbdAq6psb"; protected-headers="v1" From: Stefan Esser To: Daniel Braniss Cc: "freebsd-hackers@freebsd.org" Message-ID: <6e092d75-bcb6-e522-e723-74b0a14a3143@freebsd.org> Subject: Re: autofs/auto_master References: In-Reply-To: --NAlJSyOFfsyEK2xerUGetlskFbdAq6psb Content-Type: text/plain; charset=windows-1252 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable Am 21.04.21 um 10:36 schrieb Daniel Braniss: > hi, > after changing auto_master, is there a less violent way than reboot to > have it reloaded? # automount -c Perhaps also: # automount -u See "man automount" ... Regards, STefan --NAlJSyOFfsyEK2xerUGetlskFbdAq6psb-- --EfpzmMxpwtYZeTr5caKwcS3o8rhDoea5o Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wsB5BAABCAAjFiEEo3HqZZwL7MgrcVMTR+u171r99UQFAmCAN1kFAwAAAAAACgkQR+u171r99USD mAf/YUNZmgpkumfjMnoZJbh6pYueSV9vxffU/kAowONn+MvLVAiPO2UrCRgk5AGvxT86WIQ2Rvih v6Dq/iOTOAzYVBIp0RjrCH20gQURXXP3Tx3ZbgDa3pXDAIcRhyJ7rA503mGsAU1bIgX/vDfBH470 fkRtzt6xVBVyrqlFSOiAFbcWT1GW+l9UZ/y3iuxQ1gBsd6IdnPJ48YiyQocHuq7T2V8M5lpZt6gb 0Yvj/Vt6/F3mILPgs1JPcvy9R+VrhheywDIUXxk58IucsP9cuGYEXEv1MU+DWUQ2N+3BhyWVaEIk PFstV8omajfq6vM93AKW27oBhkp5y2wa8vmG8ghL5g== =Wf4/ -----END PGP SIGNATURE----- --EfpzmMxpwtYZeTr5caKwcS3o8rhDoea5o-- From owner-freebsd-hackers@freebsd.org Wed Apr 21 17:08:55 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63F125EBAC6 for ; Wed, 21 Apr 2021 17:08:55 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQRpv1PMgz3nR8 for ; Wed, 21 Apr 2021 17:08:55 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 2E4705EBAC5; Wed, 21 Apr 2021 17:08:55 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E0D05EBC14 for ; Wed, 21 Apr 2021 17:08:55 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQRpv0cxYz3nZ8; Wed, 21 Apr 2021 17:08:54 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-ej1-x62c.google.com with SMTP id x12so43826157ejc.1; Wed, 21 Apr 2021 10:08:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TPOS0nyx8e3M/kGQnX33hq0tb2nJEbCnC9N0a6cQJyM=; b=OAAoPsK9sPUjWI4pi7WA/Acg2wNnM9AmsaXtf9Li4ggA4dnWjcWcowAtgRGIUISyVo HZgJ+J75tYapZL6SvTI5QV6z/BuoLpRLNpmswnSthcXA6FUkhxNhkExvM9Ge2MJy/Xoz cokDFrdeIqxyWP+EsC2yGIrtBWXnBdcl6ApAolfKz6Ut12+IhSV8irolqQORrTEXEuUH cEnmGLGtZc9ZRHPYyk5ZUQ6Gw/oRYX95Scj7MRVL6lbd9iQA8TR2kYDEUqCKDupvLujC Q8xN8y8O/Zbiqs2L+WFifHI+OOBAu07dYYphHqUaGSPRkrU15/zrfOloyyjihAGOr4wT SLnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=TPOS0nyx8e3M/kGQnX33hq0tb2nJEbCnC9N0a6cQJyM=; b=jB24nPjkqELY1cP8doDtKMO2Ic6lsofDiVUoggbdUwQWhYcFrvTs0Q3MJQpGaz5tBt BqpeWinermQ2FUswTheTi42oj+Iet03cOEzyN2eip02UUrmajap19uA//izz8Nme4jLg WxhuHK7QERsWK1vpAwLGFDQrGFbVvCKKaz1yY//zVWVrzj7+eIyise0PMiYsfSQeZ4sn QmDr16fMeJQfwt0uuGbG2GvNmewaBlP8JuU2qkTro62itPy0VtdtU+UVupgz8mmsTGIJ KrgI12iC42WDuedIJP0HhY8YlK1mfboeV/cbA807pNVbFwmLzVVLXRaf9hH6KhZNzpGb 0mYQ== X-Gm-Message-State: AOAM532YOq6kw3VkUqTqgoJI31aEQMH9b17DVWLRG+lDee4DFQ1eajfZ PvhGI095NDppMw0fyeUp41UudswBvJY= X-Google-Smtp-Source: ABdhPJxiFqJjLiussGfGU1buTby9LCUUBfRIKwHgfWzdGq+XzE6lCloB+NBVL21d8cB3Jm5jqpYIAA== X-Received: by 2002:a17:906:ae84:: with SMTP id md4mr34444897ejb.432.1619024933220; Wed, 21 Apr 2021 10:08:53 -0700 (PDT) Received: from brick (cpc159423-cmbg20-2-0-cust338.5-4.cable.virginm.net. [86.7.147.83]) by smtp.gmail.com with ESMTPSA id gn6sm66654ejc.83.2021.04.21.10.08.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 10:08:52 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Wed, 21 Apr 2021 18:08:50 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Stefan Esser Cc: Daniel Braniss , "freebsd-hackers@freebsd.org" Subject: Re: autofs/auto_master Message-ID: References: <6e092d75-bcb6-e522-e723-74b0a14a3143@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e092d75-bcb6-e522-e723-74b0a14a3143@freebsd.org> X-Rspamd-Queue-Id: 4FQRpv0cxYz3nZ8 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 17:08:55 -0000 On 0421T1631, Stefan Esser wrote: > Am 21.04.21 um 10:36 schrieb Daniel Braniss: > > hi, > > after changing auto_master, is there a less violent way than reboot to > > have it reloaded? > > # automount -c > > Perhaps also: > > # automount -u Actually, just 'automount', as root, should be enough. You can use 'automount -v' to see what it's doing. From owner-freebsd-hackers@freebsd.org Wed Apr 21 17:48:15 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9A4A5ED423 for ; Wed, 21 Apr 2021 17:48:15 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQShH4WK2z3qnY for ; Wed, 21 Apr 2021 17:48:15 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.nyi.freebsd.org (Postfix) id 9AE4C5ED502; Wed, 21 Apr 2021 17:48:15 +0000 (UTC) Delivered-To: hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AA495ED326 for ; Wed, 21 Apr 2021 17:48:15 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQShH32K8z3qqS; Wed, 21 Apr 2021 17:48:14 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=I24NbHQdJk8F28qJydusKYSCbvQQylA72d5Q2b8nMzg=; b=VHquH3FDFhe5NXH47tqiLhboyshuiiDquuKFh+5IPstiwGtTdcb53cWMNa7n+JnwqOr0WutK+I7FBNCDgsjuM7cygoujtsrgBEl3F9ubctVt20SQXvBogMs6ZXBxrlMqHV+dCkb2N6FJzVkwvN9i7HG/qLnb/sl0jl56yxskBRwB1CIvljkxlwo53GHT9C7/xwhR4HC8ABObEUWCd5Bs3fz2ZjokvYa6LEC29phNCSmBFqnXdeBCRFFTwC6dmOWd6fxLI/J8L99IRwEhcHlaEgLvuxzPoZRhAkjgxM8xZmrk/CCZESMkMokOzX+ND7y7UuU6LWcg04ZslxQ1VkRwSQ==; Received: from mbpro2.bk.cs.huji.ac.il ([132.65.179.20] helo=smtpclient.apple) by kabab.cs.huji.ac.il with esmtp id 1lZGxP-0009Yt-7Q; Wed, 21 Apr 2021 20:48:11 +0300 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.41\)) Subject: Re: autofs/auto_master From: Daniel Braniss In-Reply-To: Date: Wed, 21 Apr 2021 20:48:11 +0300 Cc: Stefan Esser , "freebsd-hackers@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <2EAA9C6B-5F34-4430-B3EB-A4AECA286A06@cs.huji.ac.il> References: <6e092d75-bcb6-e522-e723-74b0a14a3143@freebsd.org> To: =?utf-8?Q?Edward_Tomasz_Napiera=C5=82a?= X-Mailer: Apple Mail (2.3654.80.0.2.41) X-Rspamd-Queue-Id: 4FQShH32K8z3qqS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 17:48:15 -0000 actually =E2=80=98automount=E2=80=99 did the trick, may the source be = with you :-) btw, mount -LL is a bit buggy. thanks, danny > On 21 Apr 2021, at 20:08, Edward Tomasz Napiera=C5=82a = wrote: >=20 > On 0421T1631, Stefan Esser wrote: >> Am 21.04.21 um 10:36 schrieb Daniel Braniss: >>> hi, >>> after changing auto_master, is there a less violent way than reboot = to >>> have it reloaded? >>=20 >> # automount -c >>=20 >> Perhaps also: >>=20 >> # automount -u >=20 > Actually, just 'automount', as root, should be enough. You can use > 'automount -v' to see what it's doing. >=20 From owner-freebsd-hackers@freebsd.org Wed Apr 21 18:28:19 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1ECBA5EE70F for ; Wed, 21 Apr 2021 18:28:19 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQTZT64nbz3sfP for ; Wed, 21 Apr 2021 18:28:17 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f46.google.com with SMTP id r128so41254126lff.4 for ; Wed, 21 Apr 2021 11:28:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F8Vy80g0s6H1EJTeHmeN3w10XqqeDlsfyYv4KSBdS9U=; b=YjFxF95DjLUZguJ/dT6IbJ6IKF8D10lZjq9xyDrMyjUemAeBBSD4jgShhs+SaUJEZC /Oh0FYE2VDv02J+jHK40Ev5WeeJAjQAj3j/7UN9EgvgpyKBreEt/oy5OADFFuNj1TAnz 4wY+XD1mIoA3EJlacZOZVMl/b1PwN2AVWTlzGMc/SWAlaOHOl3J0B1sh84ZADPMdnLdh mYXycfu2k4/NVv1CXR1945mVS/mujoZJm7LNowKs+T03VtaBphqEepHKktoi0tfDLhOW EX7HxrLQrth8dKY+lC0iYtOTokeWns2oI5T3wvEmghj3l3EOM4LXt3u2rSr7fgT2KkvV 5mAQ== X-Gm-Message-State: AOAM532fTeZWSliskcmen0aNeo/Gf9izkKS5snXERHP5W4SYk7/bPLdD 9Uznh4LCEOvUuBJY9yqGQmkwgq5NNK5YGw== X-Google-Smtp-Source: ABdhPJy2s3n6fvfPl8nSM2/SxtnXv4ObVjS6ybbEfk4ls+Wb6VSAg6xMMuCkQ83fhZac5XbQ+rI38g== X-Received: by 2002:a05:6512:3306:: with SMTP id k6mr19706122lfe.599.1619029695849; Wed, 21 Apr 2021 11:28:15 -0700 (PDT) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com. [209.85.208.172]) by smtp.gmail.com with ESMTPSA id r17sm34170lfr.18.2021.04.21.11.28.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Apr 2021 11:28:15 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id a5so11846425ljk.0 for ; Wed, 21 Apr 2021 11:28:15 -0700 (PDT) X-Received: by 2002:a2e:b175:: with SMTP id a21mr19390277ljm.248.1619029694891; Wed, 21 Apr 2021 11:28:14 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Gleb Popov Date: Wed, 21 Apr 2021 21:27:48 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? To: Mark Millard Cc: freebsd-hackers X-Rspamd-Queue-Id: 4FQTZT64nbz3sfP X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.46 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[yahoo.com]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.46:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.46:from:127.0.2.255]; SUBJECT_ENDS_QUESTION(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.46:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.46:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 18:28:19 -0000 On Thu, Apr 15, 2021 at 10:58 PM Mark Millard wrote: > The way I read the above quote and your code and > related documentation: s2 after the accept4 assignment > is specific to the client's specific connect and > will give access to the connected user's credentials > --but s is not specific to the specific connect in > question (after that assignment or later) and would > not give the information that you indicate that you > want: you need a connection-specific identifier. > > In other words, it looks to me like what you quoted > agrees with what Konstantin reported. > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > This makes sense, thanks. However, this code works on Linux and seems to return credentials of the user that started the process. I actually stumbled upon this when porting this code: https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L805 Would it make sense if FreeBSD followed Linux semantics in this case? If not, what are my options for porting the software? From owner-freebsd-hackers@freebsd.org Wed Apr 21 18:30:31 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A9E95EE6C9 for ; Wed, 21 Apr 2021 18:30:31 +0000 (UTC) (envelope-from amshafer64@gmail.com) Received: from mail-qv1-xf36.google.com (mail-qv1-xf36.google.com [IPv6:2607:f8b0:4864:20::f36]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQTd22DNcz3sLs for ; Wed, 21 Apr 2021 18:30:30 +0000 (UTC) (envelope-from amshafer64@gmail.com) Received: by mail-qv1-xf36.google.com with SMTP id h15so10985646qvu.4 for ; Wed, 21 Apr 2021 11:30:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=vEKKeWMZGhs38b1wS9FriKHMgV3Ed7iLnm1mGAE3RSY=; b=sJPib/HEfel4iPdmVTGVjeapQOHCBgtdBjeGW0d6n6T/goozfgd9HRtn3kqcMexOan uVrBLpFwHp2UEWv3aGv+F1OJWXrCdsOAE6cengoFbkYSZUg7a7LSkTEbyzC+b2qof82h RuwLBvxFppwS/KAb6AQ2zb1eL7LmtNImO/axEWEeFC943xC2U7/rOscEKuNL1PXCJEOB Jv1oIB0bT9yFHmuMUEpHl1Q8YTgmw4cyDbuxYjtfW3L063wQyWWtSopZivvjgDa9IwwS GUwoyJcPOUdsFhwgkrL+J71LDx061oHH2QEFPJ6prD47xFbyj+Kea093IhY53pHbFrzO Kw5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=vEKKeWMZGhs38b1wS9FriKHMgV3Ed7iLnm1mGAE3RSY=; b=ekx7XPIFivBtK7iXj73eFFGyzYSiFSNVPCD99p7v5G0j0axKhuv9j6dK6QHWp8/0lD J5YIJb469JEE4HiO9CV398sniljjWMG9GQ/EW/3OUpq2gAEg5+CGJ7n9oHF/AvFizTDq 66mtfk1jZEaWazUo6lgUA7oT/cPRIKPbLcrnvKUI+cxS80VN6xIpgTF68u7K+BaABarz +gFVoozpiYdMc9ChrFQr4M2PoHmUTPXFPka6JPoUqZ3tOfNqDgAqsJSdC1InHdbgqeg8 w1GQvH2gfMYb4qTlYJXqjLKwjXjybDg8buHPI7m/BouKRT/smS7rSDb7Hv+r3c0wnGML hXOw== X-Gm-Message-State: AOAM531nms3BSjfUJS8DTdQCIfqOMMrR2WgfYI3rFfkuJx/pfi10FP6o srVbxy85UInDWI9HJk4DIfgMSMgfkqsSQA== X-Google-Smtp-Source: ABdhPJwZpZfJKmDookdqrIf3pXjeI9YGPo5BJFy/kq6X7TzA5Kk900cTOKBr7lFcRXrWLgjB9VWUcQ== X-Received: by 2002:ad4:444f:: with SMTP id l15mr34497673qvt.0.1619029829569; Wed, 21 Apr 2021 11:30:29 -0700 (PDT) Received: from localhost ([2600:1700:e71:d230:2daf:aa80:a133:2bb5]) by smtp.gmail.com with ESMTPSA id n6sm260131qtx.22.2021.04.21.11.30.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 11:30:29 -0700 (PDT) From: Austin Shafer To: MANAV KUMAR , freebsd-hackers@freebsd.org Subject: Re: How to start contributing In-Reply-To: References: Date: Wed, 21 Apr 2021 14:30:28 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4FQTd22DNcz3sLs X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=sJPib/HE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of amshafer64@gmail.com designates 2607:f8b0:4864:20::f36 as permitted sender) smtp.mailfrom=amshafer64@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::f36:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::f36:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f36:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 18:30:31 -0000 Someone in another thread was just asking if there are plans to add libxo support to ifconfig, to make ifconfig pretty-print in json. You could be that plan? There are a number of people in the freebsd discord, many of which work on porting projects. I'm sure they would appreciate help and/or testers. There's also the google summer of code ideas. > I=E2=80=99m final year cse undergrad, looking to work in core OS technolo= gies. Can somebody please give me a quick start about ongoing freebsd proje= cts.=20 You should pick an area/subject you use daily, and try to make it work on freebsd. When I was in a similar situation I had some fun with helping with the intel/amd graphics drivers. It mostly involved importing code from linux, making some trivial changes to the linuxkpi, and testing it. > And I have shortage of space and computation power, is there any alternat= ive to generate the build without me purchasing new machine.=20 Honestly you may have to rent the cheapest freebsd instance you can on aws/digitalocean/ramnode/whatever and build there. The meta-mode route also works but I'm guessing low-end hardware is going to run into trouble building llvm if you don't have much RAM. I say give it a go on your machine and see what happens. If you're only working on kernel stuff, you could just build the kernel (which literally any machine is capable of) and install it without building world. YMMV Just keep in mind people like that you want to contribute, but absolutely nobody is going to hold your hand and tell you how to do stuff. You just gotta dive in headfirst and you'll get your legs under you soon :) Again, the discord is active and people are very helpful there. Good luck! Austin From owner-freebsd-hackers@freebsd.org Wed Apr 21 22:00:30 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8144E5F3604 for ; Wed, 21 Apr 2021 22:00:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQZHK3CZwz4Wy3 for ; Wed, 21 Apr 2021 22:00:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619042426; bh=kaj+6OLiGwCdr+0JDRYuFUta6xBFs6EC1YKruxrvoGO=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=f9dHLlnugRbQF53pfIir3KaI9NWEzI9xeeWlOVx2mpKfz+6v2v7z+I973KQKU8EbWXm1LZ6Cpv6n2t5IiZfQqjhBORmXE3WeUWiv9LKYGxs4DZp/P641WMUcWq8by3yYuu05MPKrpQc6VTB/N4qAs+qavTxD5irs/b81nk/PeFshLRNd1Me0IUWJm5gyi3aoQ7p2DhTr7ja1E4YLI/FwXMiB6XA7rQLrBXWiV3nBUviQ+nzs/NzFGKf3Um7TVsv3MnWsVo0bp4bUazwSb8oZn8SwdjA885RFRnRDiLhvuPaPL+pdAb2X677ULkQzPjJ6HcLovL26Dklwdbw3Gjo7VQ== X-YMail-OSG: 49VzoYoVM1knf_yDduduqzwhefD757MDG6Bx3ZVl7GzGZc2NbEcH.Mn8B3zWoZI OqE6HBDZz1ugHdXuQgCN650rObDWfKSXZJvD_4w1dXPqWMQTICsHROYsj2bzbiv84QIfjURtOku5 0FNsKlMb8INs7NvN45NLgXICYkoZlkpcGz6C47u8CynCxEfyu4OM9wE3yMgK0l5dIG2i11qQg9I6 vTzT.qHP1q7ZKdpkvFO59ZJgT72hv_8OhFfSCLSTfM5jVyPD.d2dYs.Vd1SDdMRvuoIZC9WKIL2j zPmiBSmth6x7iiYgylIbrQ_drhomMatscpVaA4gmYQnkbZVwZ7moVlQAn_NhoyWECNhSK_PFZ2kH YySt7.._Ras2SLusAylO0WEUH4S7fD7ub0zt99Os5GqGptfXmkOsUVBbWZujEgk6RBybNG8vFZ.Y FlLag6wCiy069pFdxVtVMnVQDc3vPmPmWMcoxlUt8FXJBalLTRpbwY8ojz70vnVKfVYnJ_q8pSVl bPwzBBmg70vDG4.YXtkNpEBkRGRrkRslOP0SiT7zmQEEQ0kpnsAY2qNdPLc1UvRDz2pkr0scy2_e HwDtfD2iQ3t7oNn9HF5IBUIIsffYGYvn2HpK9SOPVl0TASZX1r5VHdbbUSkSZGjF4eMhPJmPFvBw jMCiekMTlkNPyNgoZN6vfZdNHS.wQamGwrvNZtysoon4nx2iAvbvzyAXABz85yQt1I9cQTstNE0g HglA376ehjvdUdfIEt1O3xUgQdeDfq2ev1g9TBYiz36i8JS2vAxBWc7y9yTholIkoPdgD_YmTRAZ eETLLFAxHc76N3Ojn_K6XOolSAEy_5O2.7u7nLz_5FVIBqGB01jY0g.my8kO_0MRU33urxNufu_0 x4eGa58V69uhvvE_VyF12MgfYFLlf.JsbBcZ_OnPWfDGgWj8oZj0FhyLREl9BNI1vD6qW.jzGBi0 CeBCSiGnqCIgvuN2SH1G73uO7XWFOmDZxZkbWdoozpyEF2DOfFVTaJkrdnEE6LMfwUbbrKqutqQ. 1y59z7Qppk.wSCx4DkivNU3xb0eJMMGDEyPAKP.ij9pbIEC7pUkIa7ju__Rz60dxjhbs9j_GOgco Pu1mhXRMP7WU6mvaHeQWjeMQ8FA.FehGgr2U.5APIcYMvaUl8KItJvjrxGbU6Sko9HPSm43j7Hir 6MlnsdSjk2.ttQP8kCMVoO2W3Pucte45kMHbDdJZb_OKPGJq95MO7cy_jnjwVPsWCk3TzNCnHBgX 0HiiH.6shuZuGJSFTrILXqohUDe2u1n9LkEAOduloZDOOEv.u1typAwVEoue.pdylFPc_m4zxct. h2GDQyTwirJATgAFe2nigkG7HhJFF9w2ulw_17XxXmX8ApQhC.lE20G7xBYFZqcWH9RsEPv4V_Km CpwD77nXJDxVoo7m6G.AzgRKCRa7J6eN_8OINt1IVsdge5VJNVOSzsk1ru_LCodEV73l.TcU9i6I YuXNdlsdIbwXUsBUKVeWfEVBfrz1FjUMDiGAD5zy__jG93kBmVBamwJkgfKmXYo6tCCRX0w3QwCJ vt5c.yNgPsf7rJXRADl2QDba5pVGo_IlBcuAI1rv2dWq_HoddbKTf7uV2Z1UjEvlQkQrazw47akN cghhRMKk_MwCFFr3fGrdXNSOaiVbKZyLZmDWV0gBnzTkxIvQNAHGtSFhU7cgODfHI4.LErIoM7oH qvb0bXgBe2dxduNTD.heqsD44ZfC9kjPLLq5KOmBPifROFSBQfX3B.S4B2WVl3oiwZEQni6HyAnQ lpSS7e1yR9joH1npVdnmORodzZInvh9qdWKGmGea9vfyuNDJrRJoZnmRRr3Wc7Z0rua3IBtiT1z0 8SN1aKlcqky8ZRRDjSlqrrMkBIOeILOY_rL2clL_IRjm5c_GmSbz4tED4_L7cYANDv9Jc9NAmCtv Ed9rrxxrG3bZ5VGeBLtQGtc9ldt6cZOiDii6bOVHE9DOQgRRWiEN8SWsEZ4zzkkOQnxb00uZyWU_ CfIWO1T6eLTX0HnE7ezo1Li8Q77LSOHM3EOkDpLI5r6Y2FP5NbM0AWnUVd6ng0DsPHO50Lv8BDO. Ed7rm4W0zNQPBbkSkGqR5XNwQUbTNS01lurQniVh.UMjqc_v_JBtexmWjsrcinqRi.o17HM1yK.j 21NfxVGfYQb5G_OGr1ckrYkX6YzimnyQD8AgXU1zKJjKFUK0Km9FySUnTgcHngSIKtHusEmHMaEm dLE8.BhTKcCaoSKWfGUDo_w_d5E6rYPIWCT9n6bxvcH.P6KmriHibiwGVW_zlwOkUlUkJI.Ip0Eg GtwcTwdvat9aAJnBA.49utfflPz4jlH32ScNfOAzuIclxnQ8a2e49a98ItALdIIqbg8XvoBvikhW jn7znrlAWp.eejDLWo7E9w8jf0a0XHitgIx6q8_S_rGgl.OBURHUmhmuG_pe5d1xXPmi5ewJB_OZ jp4TWgteQMnfr0PxCY7hWUWl_Vq1k9TBEttg2B3trIfGNc1Qiaj5DzgIdABkBgq0RO85qg2WQj7l ntOVju.MOjUDvZ2EyLuhLgNtLCQZGQW7C5Y0H8PWxe.uymuzuKvqq3_Pfcyltm74NxAXqm_KzlDc - X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Wed, 21 Apr 2021 22:00:26 +0000 Received: by kubenode532.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 134b7ff00c4cde3e58b8cbceaa42ff8b; Wed, 21 Apr 2021 22:00:23 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: Date: Wed, 21 Apr 2021 15:00:21 -0700 Cc: freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> References: To: Gleb Popov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FQZHK3CZwz4Wy3 X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.148:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.148:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.148:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.148:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 22:00:30 -0000 On 2021-Apr-21, at 11:27, Gleb Popov wrote: >> On Thu, Apr 15, 2021 at 10:58 PM Mark Millard = wrote: >> The way I read the above quote and your code and >> related documentation: s2 after the accept4 assignment >> is specific to the client's specific connect and >> will give access to the connected user's credentials >> --but s is not specific to the specific connect in >> question (after that assignment or later) and would >> not give the information that you indicate that you >> want: you need a connection-specific identifier. >>=20 >> In other words, it looks to me like what you quoted >> agrees with what Konstantin reported. >>=20 >> . . . >=20 >=20 > This makes sense, thanks. >=20 > However, this code works on Linux and seems to return credentials of = the user that started the process. I actually stumbled upon this when = porting this code: = https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L805 >=20 > Would it make sense if FreeBSD followed Linux semantics in this case? = If not, what are my options for porting the software? =46rom what I can tell . . . FreeBSD defines LOCAL_PEERCRED and what goes with its use, not linux. Linux defines SO_PEERCRED and what goes with its use, not FreeBSD. If I understand right, your code is incompatible with the referenced CollaboraOnline code from just after the #else (so __FreeBSD__ case, not the linux case): getsockopt(getFD(), 0, LOCAL_PEERCRED, &creds, &credSize) vs. your: getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &creds, &credSize) Note the 0 vs. the SOL_LOCAL. Your code is a mix of Linux and FreeBSD code when it should not be. See also the following that involved replacing a SOL_LOCAL with a 0 for getsockopt used with LOCAL_PEERCRED: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234722 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Wed Apr 21 22:54:01 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 494FF5F4594 for ; Wed, 21 Apr 2021 22:54:01 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-to1can01on0601.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5d::601]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQbT41nBbz4ZLS for ; Wed, 21 Apr 2021 22:53:59 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mBsImncUpUtn5/YnBiptmP5mYQiToyUuXUsacJarib4PPUA6TislTss8HavBV6r5ea7tuIVxWC5byaydqZ55Xu3sjlRaUSNmJigqCF7qXMV1CSbDLfmvdWJjsAJuM3s229hN32RoKcUmeNpV1BfYiY643qFs7+/TQWXicBCYqP945/ySAGgnn367jWTsCkuxjaH3Ew1Ewi1kdA7dgGkaP2JFmuoQnVygtpXs9I4qu/u0yQ7ieH3DL2Qw7rW7ecfZEsvfuX3glMtWrBIWNGYmH+jEy5wSqNiJZJm8VYFeU1t4uKR0XXpi6SiwUt5U9AuxBiwpc4P/bWevLWtyyMBmag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fjUS5ruSpVRYOHDzl5CBY+Mx4Eep0LLD11gf5V/O3ZA=; b=CWAVjQCY33uJl0XoYywojAPixwMo7Uol8mkOGbkaljK5IjPTyQcFRWuXzTmZapRy4Kj5P8UL/DNIEIZi1b5tLgCqsRC7mhFLRuPGpEKPHJkI7BuacZ9ZBSmAPR41FDrcQZIWgaZFYHdlhXiitz16ymOMJGfpwQ383OT7bcAoqt68FJ2dVuaPFN0dxd4dTN8Y1eUlb7GBMnJXA7dgTcMY40bHCxzehPR4dHygQnrmXwcskXgB2OhjwnMvoX7iSXa+RQFxPeQ1lu3t59YTESYpuYWERpU40G2W++RSLY1G+k6m2reWFGqI75CAJaBdaaF7vtpguVb8yIVZIGuFqfqTwQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uoguelph.ca; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fjUS5ruSpVRYOHDzl5CBY+Mx4Eep0LLD11gf5V/O3ZA=; b=q7iuEEvc5t0WjRgw1wZI13xIABMNzg3Wa5FV9p8oQBQhFETRnSkG17fjAcu+sZqhHz4nKZHGZVlI328rNMSUQojmGdAUyjosrbXoGCTPTwgBNHVR5r0eE+Q4luM8uan2F1LOlReve16noSCjqbupGECCndmEOAwgsiy/B+vY8C195oBzRbhEsa4UVAESlCLSLc5ufWRrb0YEeAu789YbymTA5PeKP4Vv5Q15UoXX/fg9JrPQds7Ip6JMiWZq5kI62Vm2oOJM5V1T3/ThEQydbxuXtstbxQYD4f+NG+JH136sLk9QK+bgFkxCL6NgZXmg2F+9ZNJERA9Rjw1XRituiw== Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:19::29) by QB1PR01MB3761.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:32::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.24; Wed, 21 Apr 2021 22:53:58 +0000 Received: from YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::1c05:585a:132a:f08e]) by YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM ([fe80::1c05:585a:132a:f08e%4]) with mapi id 15.20.3999.038; Wed, 21 Apr 2021 22:53:58 +0000 From: Rick Macklem To: Austin Shafer , MANAV KUMAR , "freebsd-hackers@freebsd.org" Subject: Re: How to start contributing Thread-Topic: How to start contributing Thread-Index: AQHXNtxsAp6wCirnQUup44a8SlDX8aq/i6Hl Date: Wed, 21 Apr 2021 22:53:58 +0000 Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9a9333f3-82de-400a-816b-08d90518592a x-ms-traffictypediagnostic: QB1PR01MB3761: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jjAz1U4b/3omUOUlpgs0vt8st1pC2Wsxo9/opGLxEyZW78prpa7sJEplo4b8jb187LI4lOUd6KWx0OPq2brkFO/D5RRy7PYUghhqpmFbKKrlsUHGr5lKxJN1kSWtOq70Nr3kPt6KgK0hQRYU16wyyZHin48pdyHA3ZaChuYvFcPM55HrB+rBSJXhyUmu8Hs2t/qmjFaUjMzgJgF4lqBVsoiB44ns3GgIWeBQ1gAcuQPscUgw3B5AdVNZLYxgtnr4YTWqQ+O69kjj9ytPf/sRzCzH/Hz03tQ4bmcbSPbOSQJJhgXpLFWG7bki4yAoCPuvuc8P7VcMnYlwL0OsTmJV9y+tIY+WbxSmpZau/52NxvSSV3PpzMdujt1uanHFZzemY/UGGE+vxqVfvQOPTrBF6YW1OtQ5o3Tc/fadjH18G9LnUnKaghdEyUz2vuBqhI6M0gc+nnqtZZWd6mxyHlxWUqBsAtesYtiUuH1sOje50trtw7umA+lCyEpTxTm2ivhkiNdHxi6vYugUFoPfsRNys3WI+mbMZQeZeSMkIg5x05km0SxmAQZKgjBQAtVeqQWQb3Eq+ZpoEH8NA6gq+dsQREw3ANWsP236BAbqJfvo+tUJBDacdWQzlZ7LJKu8RL1xt8l4efOaXn/TDf/2ycv+z8COpzoIsNwpNKwS9/Yveyg= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(136003)(376002)(346002)(39850400004)(396003)(366004)(66946007)(66556008)(33656002)(76116006)(6506007)(91956017)(786003)(83380400001)(110136005)(186003)(316002)(55016002)(9686003)(8676002)(8936002)(966005)(66476007)(64756008)(86362001)(7696005)(38100700002)(122000001)(71200400001)(5660300002)(66446008)(52536014)(3480700007)(478600001)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?iso-8859-1?Q?oHDKv/4XFRxWm17Gv2SzUDksAASRQ3MqgrxkF895u9FI93mQn0jP+ACep4?= =?iso-8859-1?Q?qoLJN/jVspQI13YLBYWotGuxaVDD0yGZJkEXYSWeMZ6y8or1BuN5DHSr+k?= =?iso-8859-1?Q?ClhaH8kCUseT2u/GriXQC+nfkdaQ9TIvElzFOryMVF7p/bcbUfuDcKu2oh?= =?iso-8859-1?Q?aAbDJ1yGnHPeIWutjT7nhID1quhg7M4oAY/WbRQQV6BKIcqetRgZwenr+P?= =?iso-8859-1?Q?axUUtHTKQaivXExhovEzyXb3GKiN2drJ60Py/hzw+6dxRMMPHrnQJxZn96?= =?iso-8859-1?Q?6lGOJnyT/UdVpyN3b0gMq3QP/qo+rU3DOiz3fGqZ7GAHgfmMRs04TSQZ9U?= =?iso-8859-1?Q?cP6jX5+ddCJH+ziBJShOQDHc13cuujQV1Bet0IyqxkzRrH/0uSCcAdJC7w?= =?iso-8859-1?Q?0Lem89t3fTBAXbeS+Wx9pUk/cRZka3mWmrYe55QFnHVvhUVvmdIQs1M1Kt?= =?iso-8859-1?Q?wKNwSPgYz1BkqbNGRuJsCjM/Cc+QtepxyLen+0StHDQmM79ViN7d16QNii?= =?iso-8859-1?Q?iQsZHBTBSk7FvW0PTKyRNErC0JL/JhAGcS6vwwbnFJmXc+nozXEseEH1u0?= =?iso-8859-1?Q?fQ+joJa6PPtGlLsn/csWoTkdM8xJtMSWDGVsqSmjdL7wDK9r6A3N4XMV8f?= =?iso-8859-1?Q?OWVKPQl7ObmXEJV1nTHfc5Y4bDDywWqxA/OQEqPtZmb8iB69VFQ29RtLpf?= =?iso-8859-1?Q?0EimshtHgxS0uzQ1nT6Lhm1c4U1yOOaxpGuHjBDZVIzwzYj703I1+vQd6o?= =?iso-8859-1?Q?R/BgV5k8pJtoiQvyiWc40VzW3pYTiAfVbTCAomDh+Oa0xtCgktgkCF32PV?= =?iso-8859-1?Q?y9PXnvoGJU/cJPA906vnYq4KOAhwoBvap6/vYmE2aOs589ku8rZhXd0oqr?= =?iso-8859-1?Q?4F3GSe0JgX1bWciWf8zjqnK+Du5/1FvMNPp1yHPfxNx4d34v9DOOVPJzlK?= =?iso-8859-1?Q?bD0i/W250B4rSO2iLcMyBqB3nHrJ4ZCMn3zyZMgwzS7MC6pv9/VoTpS6Xu?= =?iso-8859-1?Q?UafsTg/Cl+dnO0VdECry9BvwvjqF/aUuouZ5PI3Op18PijLILtReYc9OT9?= =?iso-8859-1?Q?haKVAXejYJUeaSrACBqAmLQnStGWwhv6mjWd6aXVkFpDTqljPSdlzV8tW7?= =?iso-8859-1?Q?uSS/2FVglkdVaY5uhe6YwY9OdnEmZvJktHpCGTOkEO1Twz/mE3F1DKqYbO?= =?iso-8859-1?Q?iezvCXXI+pFWTaDVLaCDXQLlf4AHsu5S0pwg1BIcSlxWK8rhjlVtDysBto?= =?iso-8859-1?Q?+e02ryLE4dnENywJbBxniSjI0qEzynyqbdf3v9KbwF1D/UHCU4J5Vx14sh?= =?iso-8859-1?Q?Rf/dnB/a0zU7UYOkKcdEQC0TH+RzcqM9PSTQV5Ada0RjBCW7MuUjh0lbS+?= =?iso-8859-1?Q?frFDYbHwm4IR+HZmZ3545Vn3PI2KswOLp4A6eNnmflC3WCifg9//k=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 9a9333f3-82de-400a-816b-08d90518592a X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Apr 2021 22:53:58.2208 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FoNmEmMSO8TB/eI7nHhWpEt2jQ/d6UPf/ceR9PUZTdQEDY7f0wEygTZN9xvJezgP2e2PtWJAsmtnyQI8Bafe7A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: QB1PR01MB3761 X-Rspamd-Queue-Id: 4FQbT41nBbz4ZLS X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=uoguelph.ca header.s=selector1 header.b=q7iuEEvc; arc=pass (microsoft.com:s=arcselector9901:i=1); dmarc=pass (policy=none) header.from=uoguelph.ca; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 2a01:111:f400:fe5d::601 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-6.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:111:f400:fe5d::601:from]; R_DKIM_ALLOW(-0.20)[uoguelph.ca:s=selector1]; FREEFALL_USER(0.00)[rmacklem]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f400::/48]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; SPAMHAUS_ZRD(0.00)[2a01:111:f400:fe5d::601:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DWL_DNSWL_LOW(-1.00)[uoguelph.ca:dkim]; DKIM_TRACE(0.00)[uoguelph.ca:+]; DMARC_POLICY_ALLOW(-0.50)[uoguelph.ca,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2021 22:54:01 -0000 Austin Shafer wrote:=0A= > Manav Kumar wrote:=0A= [stuff snipped]=0A= >> And I have shortage of space and computation power, is there any alterna= tive to generate the build without me purchasing new machine.=0A= >=0A= >Honestly you may have to rent the cheapest freebsd instance you can on=0A= >aws/digitalocean/ramnode/whatever and build there. The meta-mode route=0A= >also works but I'm guessing low-end hardware is going to run into=0A= >trouble building llvm if you don't have much RAM. I say give it a go on=0A= >your machine and see what happens.=0A= Yes, a "make buildworld" can be painfully slow, but can finish in a day or= =0A= so on pretty well anything with a x86-64 cpu and a few Gbytes of RAM.=0A= =0A= However, depending on what you are working, you may rarely need to=0A= do so. Until about 1 year ago, my main FreeBSD development system was=0A= a Pentium4 (x86-32 or i386 in FreeBSD lingo) with 256Mbytes (yes, M, not G)= =0A= of RAM and 40Gbytes of disk.=0A= (I never was crazy enough to "make buildworld" om this system,=0A= but I'm mostly a kernel guy;-)=0A= FreeBSD is rapidly moving away from x86-32, so I would recommend=0A= something that is x86-64 (amd64 in FreeBSD speak).=0A= You can dual boot with Windows or Linux, but installation can be interestin= g=0A= and a little scary if you don't want to lose the other OS.=0A= =0A= --> As noted by Austin BELOW, you can easily build a kernel and you can usu= ally=0A= build userspace programs individually.=0A= --> When APIs/library changes make a full system upgrade desirable,=0A= you can just install from an .iso snapshot instead of doing the=0A= build yourself.=0A= --> If you become a committer, there are beefy build machines that=0A= you have access to, to do the "universe" build to make sure your patc= h=0A= builds on all arches.=0A= =0A= 20-30Gbytes of disk space should be enough and 50Gbytes is lots, from=0A= my experience.=0A= =0A= >If you're only working on kernel stuff, you could just build the kernel=0A= >(which literally any machine is capable of) and install it without=0A= >building world. YMMV=0A= =0A= Yes, agreed, as above. =0A= =0A= Good luck with whatever you choose, rick=0A= =0A= Just keep in mind people like that you want to contribute, but=0A= absolutely nobody is going to hold your hand and tell you how to do=0A= stuff. You just gotta dive in headfirst and you'll get your legs under=0A= you soon :) Again, the discord is active and people are very helpful there.= =0A= =0A= Good luck!=0A= Austin=0A= _______________________________________________=0A= freebsd-hackers@freebsd.org mailing list=0A= https://lists.freebsd.org/mailman/listinfo/freebsd-hackers=0A= To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"= =0A= From owner-freebsd-hackers@freebsd.org Thu Apr 22 02:03:59 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2780A5FB42E for ; Thu, 22 Apr 2021 02:03:59 +0000 (UTC) (envelope-from wowear@gmail.com) Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQghF6z2lz4l0v for ; Thu, 22 Apr 2021 02:03:57 +0000 (UTC) (envelope-from wowear@gmail.com) Received: by mail-io1-xd31.google.com with SMTP id k25so982318iob.6 for ; Wed, 21 Apr 2021 19:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5Y63U5wx3unqLszcsk9B3dVIiFNl2Log/xLiYQGVN/8=; b=dBoNrjFbyzFkTUCR5lMZ7O0S/+2wOfsFLQIFff5NFU+SVg5ww677LWSlm32HKnd96c 6+oQTa0fKVn3b0oQdNnxv8AQu+FWbA+DKoQkXUvT96omiIISYR8t8X9miHv34H/YUuMn Bxqqpb+SgkWLVoNb7fGxipP2Du3A4dnm3dthCgQcUU7D0hrW3h3Ko3AkUqO4RQKjyzdF h49DQXHC/zMo8dW7HTTf+8AM6dwL2gaowYDc5re2BeB6lDrHABt9N5n7ctW0jqbn/iTw rE36zDa1rwseIly8ucbaL5sffio0lp7h1TCXBEzTeUbrQXUTXxjOFpbb8gl/taLpEa7n D+8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5Y63U5wx3unqLszcsk9B3dVIiFNl2Log/xLiYQGVN/8=; b=FMW+QBoOVrlq8sVc60WuNjx0WAfloFAQZpTA7iSTIgB4il/BAH8rMV7saqnh1qgf4R pbUmoNbMEMDA0jrEcCGAm7n9jZiq6BaBwLywvMA/689YH81Np3isMNs+5URA7aV7XZ/7 IGSfpzbqA6nyCkU4gvgeVjM8lpvOyjgX7Wopnkf97DBQGiRGaSxRy/TP0ILjokWROlGd ZBywu3jKFcIw7Y8p7AEwpTP/mnAwl0+1MlAMCEmmpOQdN/y+A/QZ2qN/ev3NPi3pA0t1 GZqWAX3Y69NXPBqxRlyylTyiqCmiP8l6gjoFqoFM16bz/AeCgIKO/PF6eJZ9rSpyYWT6 wlBQ== X-Gm-Message-State: AOAM531htB6TYLc5FzdjkTOuSO66s4Rg2s2Qu8jAk6dl4Fd8PLnRXUoW 6E9vQqRjZO9PNn6lWK5Ybc0856NG8G5VPk1YYg== X-Google-Smtp-Source: ABdhPJzUPCX5Q9RqI19Zd83YZth9fyh6jvrO68bchT0w8OCHkXtvy9T66cpFv4LUeHAkmA4NhJ2or2TpwS5QR0cPBes= X-Received: by 2002:a5d:924b:: with SMTP id e11mr741282iol.133.1619057036561; Wed, 21 Apr 2021 19:03:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bill Wear Date: Wed, 21 Apr 2021 21:03:45 -0500 Message-ID: Subject: Re: How to start contributing To: Rick Macklem Cc: Austin Shafer , MANAV KUMAR , freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 4FQghF6z2lz4l0v X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=dBoNrjFb; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of wowear@gmail.com designates 2607:f8b0:4864:20::d31 as permitted sender) smtp.mailfrom=wowear@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::d31:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::d31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d31:from]; FREEMAIL_CC(0.00)[gmail.com,freebsd.org]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 02:03:59 -0000 a good Digital Ocean instance for kernel work is around $48 US, but it has so much usefulness otherwise: it can also be your website, email server, news feeder, etc. it's a good investment in your future. On Wed, Apr 21, 2021, 5:54 PM Rick Macklem wrote: > Austin Shafer wrote: > > Manav Kumar wrote: > [stuff snipped] > >> And I have shortage of space and computation power, is there any > alternative to generate the build without me purchasing new machine. > > > >Honestly you may have to rent the cheapest freebsd instance you can on > >aws/digitalocean/ramnode/whatever and build there. The meta-mode route > >also works but I'm guessing low-end hardware is going to run into > >trouble building llvm if you don't have much RAM. I say give it a go on > >your machine and see what happens. > Yes, a "make buildworld" can be painfully slow, but can finish in a day or > so on pretty well anything with a x86-64 cpu and a few Gbytes of RAM. > > However, depending on what you are working, you may rarely need to > do so. Until about 1 year ago, my main FreeBSD development system was > a Pentium4 (x86-32 or i386 in FreeBSD lingo) with 256Mbytes (yes, M, not G) > of RAM and 40Gbytes of disk. > (I never was crazy enough to "make buildworld" om this system, > but I'm mostly a kernel guy;-) > FreeBSD is rapidly moving away from x86-32, so I would recommend > something that is x86-64 (amd64 in FreeBSD speak). > You can dual boot with Windows or Linux, but installation can be > interesting > and a little scary if you don't want to lose the other OS. > > --> As noted by Austin BELOW, you can easily build a kernel and you can > usually > build userspace programs individually. > --> When APIs/library changes make a full system upgrade desirable, > you can just install from an .iso snapshot instead of doing the > build yourself. > --> If you become a committer, there are beefy build machines that > you have access to, to do the "universe" build to make sure your > patch > builds on all arches. > > 20-30Gbytes of disk space should be enough and 50Gbytes is lots, from > my experience. > > >If you're only working on kernel stuff, you could just build the kernel > >(which literally any machine is capable of) and install it without > >building world. YMMV > > Yes, agreed, as above. > > Good luck with whatever you choose, rick > > Just keep in mind people like that you want to contribute, but > absolutely nobody is going to hold your hand and tell you how to do > stuff. You just gotta dive in headfirst and you'll get your legs under > you soon :) Again, the discord is active and people are very helpful there. > > Good luck! > Austin > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Thu Apr 22 03:55:02 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6A9A45FE206 for ; Thu, 22 Apr 2021 03:55:02 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQk8P50kdz4q8s for ; Thu, 22 Apr 2021 03:55:01 +0000 (UTC) (envelope-from rob.fx907@gmail.com) Received: by mail-ot1-x332.google.com with SMTP id y14-20020a056830208eb02902a1c9fa4c64so4439132otq.9 for ; Wed, 21 Apr 2021 20:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=85kPSCPM+pN07JZxnNvu/v/A3FYO6HrTxxZBahX7I8w=; b=SQOL/G5/bF/rjyzSm/aKjaEpIlbuRPulDB1IXqlYBxMONoShs+0lWB9cBMxHnAl0+k slDeu+AvL+nZf7MaOAvrIV9HNYRlTnl63t+oSGH1TN7K/cb+t/x26kQYn8Szu0CFCVEj BSO3Bi+/HPMD2jSjs7hugUB4+xiGO+p/vrtxzo5OO/cuH4SyO0l0t7aIwrklElDT6OaP zPiwYefDOrzbNztCvPWcehtFsEnUxME34tBmQaA89CmFUu3/6adxz4PP5CASgBHDk6Jh NdeLCAth3cBoZqOrGXMdNOwUp1RTuZSSkC1uxVpF4wO3lyLA1WG4c1tLna1hTseFD1dZ UzYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=85kPSCPM+pN07JZxnNvu/v/A3FYO6HrTxxZBahX7I8w=; b=TPziIVnFD1iy2fLfERDcQ8S8E8tPRlbPlwtTWjnkPioKzb9Y9J6A5SWu4iU2lE6eRW uQ50hGZIUeyusVlUWP4wp4T4bYJvqpZ0QSW7ycHvyOSZdfVyAT+2AfRdIGgFr/CsvGWF Ky0EtMo9oZYaWh6ygeHuZiAlLGASohYmrLXkub1X5m5TnZDTV1oG2kv/XJGYEhgbk4/D 1GHcAMnmVYMypz2KGG/zq0d7SwsNjnnRk7iYNEnqpPS0LcpMLTKBLQWIqpAG7kfu2YoA gylSW2yM4zZM4dkDezKz4+33Iy2HxI6c5s2upW3Wj34qDS2FA8qhuZlbJsljoT+GZHbm rPMA== X-Gm-Message-State: AOAM530NOebGgj9poGwzJwK1GcDjgKBo4nNF9oTIey7OgHSuN+MHmXgn w9/JIg+kLcRewxRFdjrAAUaoFl2+wS8vCrF4g7U= X-Google-Smtp-Source: ABdhPJwsH7sJhVqchCgLTbCJaDK8S6gfb3MoBStv/OHHWKWggWSGtrzxEOGOCJNx0UaHCLb6kClsGR97nXiSqnwO2uA= X-Received: by 2002:a05:6830:12d5:: with SMTP id a21mr1144368otq.34.1619063699982; Wed, 21 Apr 2021 20:54:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:29a6:0:0:0:0:0 with HTTP; Wed, 21 Apr 2021 20:54:59 -0700 (PDT) In-Reply-To: References: From: Rob Wing Date: Wed, 21 Apr 2021 19:54:59 -0800 Message-ID: Subject: Re: How to start contributing To: Bill Wear Cc: Rick Macklem , "freebsd-hackers@freebsd.org" , Austin Shafer X-Rspamd-Queue-Id: 4FQk8P50kdz4q8s X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=SQOL/G5/; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of robfx907@gmail.com designates 2607:f8b0:4864:20::332 as permitted sender) smtp.mailfrom=robfx907@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::332:from]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::332:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::332:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; FREEMAIL_CC(0.00)[uoguelph.ca,freebsd.org,gmail.com] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 03:55:02 -0000 in my limited experience.. it=E2=80=99s nice to work on what interests you, but to some degree you als= o have to work on things that committers find of interest and/or find value in - since ultimately these are the folks that will be bringing your changes in. While the list linked above may be good start, I=E2=80=99m not sure how up = to date is. user submitted bug fixes are always welcome, but even some of those have a tendency to slip through the cracks and sit for awhile before a committer gets around to bringing them in. if you submit patches and haven=E2=80=99t received any feedback, don=E2=80= =99t be afraid to ping developers on the patches that you=E2=80=99ve posted for review. also, get an account on phabricator (reviews.freebsd.org) and post your code up for review there. just my two cents -Rob On Wednesday, April 21, 2021, Bill Wear wrote: > a good Digital Ocean instance for kernel work is around $48 US, but it h= as > so much usefulness otherwise: it can also be your website, email server, > news feeder, etc. it's a good investment in your future. > > On Wed, Apr 21, 2021, 5:54 PM Rick Macklem wrote: > > > Austin Shafer wrote: > > > Manav Kumar wrote: > > [stuff snipped] > > >> And I have shortage of space and computation power, is there any > > alternative to generate the build without me purchasing new machine. > > > > > >Honestly you may have to rent the cheapest freebsd instance you can on > > >aws/digitalocean/ramnode/whatever and build there. The meta-mode route > > >also works but I'm guessing low-end hardware is going to run into > > >trouble building llvm if you don't have much RAM. I say give it a go o= n > > >your machine and see what happens. > > Yes, a "make buildworld" can be painfully slow, but can finish in a day > or > > so on pretty well anything with a x86-64 cpu and a few Gbytes of RAM. > > > > However, depending on what you are working, you may rarely need to > > do so. Until about 1 year ago, my main FreeBSD development system was > > a Pentium4 (x86-32 or i386 in FreeBSD lingo) with 256Mbytes (yes, M, no= t > G) > > of RAM and 40Gbytes of disk. > > (I never was crazy enough to "make buildworld" om this system, > > but I'm mostly a kernel guy;-) > > FreeBSD is rapidly moving away from x86-32, so I would recommend > > something that is x86-64 (amd64 in FreeBSD speak). > > You can dual boot with Windows or Linux, but installation can be > > interesting > > and a little scary if you don't want to lose the other OS. > > > > --> As noted by Austin BELOW, you can easily build a kernel and you can > > usually > > build userspace programs individually. > > --> When APIs/library changes make a full system upgrade desirable, > > you can just install from an .iso snapshot instead of doing the > > build yourself. > > --> If you become a committer, there are beefy build machines that > > you have access to, to do the "universe" build to make sure your > > patch > > builds on all arches. > > > > 20-30Gbytes of disk space should be enough and 50Gbytes is lots, from > > my experience. > > > > >If you're only working on kernel stuff, you could just build the kerne= l > > >(which literally any machine is capable of) and install it without > > >building world. YMMV > > > > Yes, agreed, as above. > > > > Good luck with whatever you choose, rick > > > > Just keep in mind people like that you want to contribute, but > > absolutely nobody is going to hold your hand and tell you how to do > > stuff. You just gotta dive in headfirst and you'll get your legs under > > you soon :) Again, the discord is active and people are very helpful > there. > > > > Good luck! > > Austin > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@ > freebsd.org" > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@ > freebsd.org" > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= " > From owner-freebsd-hackers@freebsd.org Thu Apr 22 04:54:56 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 414135FF751 for ; Thu, 22 Apr 2021 04:54:56 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQlTW1S6hz4sbC for ; Thu, 22 Apr 2021 04:54:54 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f49.google.com with SMTP id r128so43135086lff.4 for ; Wed, 21 Apr 2021 21:54:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=L4BB+AxEVlv78S9srfCr+F5/EHAGUXkMBf6cJwczNK4=; b=pB11+ZjRvKv+7LNLbkG/ftuTnBvW5aggZSiRm5FRIu7jXzD/BMbJrh5sEkCErzZwTP Tsq593U1CUR2nes72v82zFeqgAQarGF3s+lCzNuyt3t7a/LIHAkroNcprudqE38/oaiK YgeWb6KhgraaLZ40PPPOpfcIylI15cBzuza9WIGC9u90hTvwotkkw/oo4Q8X+lv2eNFD coWrn1HzCdbjVCXh3YOTNx8425IJzQVbB/rbrv08bWysyK+i/pdqpyOg7609CneqkRlI Jni9ZQzc7H9dWl0l3Ke5TuajBkBIeqwwQg6In6UsJTU1UX3dd21bMwVCIAhh5eyelbDM jBTg== X-Gm-Message-State: AOAM531wMztPCZGH12KjrTWx1rbqXVQ0D9x6Vcj0NEbp1xpDur5aE2ng /AIAulOxDtTcHricoe3kqTe92HlhblMD+g== X-Google-Smtp-Source: ABdhPJw9jAUPDOsDqw0HXYiSnhGpfEytV+n7pqxeROXlIiQeT96bgBeWWGIjLnoVeHkJPFIy9fgDyw== X-Received: by 2002:a19:ca0d:: with SMTP id a13mr1139716lfg.253.1619067292964; Wed, 21 Apr 2021 21:54:52 -0700 (PDT) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com. [209.85.208.179]) by smtp.gmail.com with ESMTPSA id y5sm147294lfg.154.2021.04.21.21.54.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Apr 2021 21:54:52 -0700 (PDT) Received: by mail-lj1-f179.google.com with SMTP id u20so50312459lja.13 for ; Wed, 21 Apr 2021 21:54:52 -0700 (PDT) X-Received: by 2002:a05:651c:205:: with SMTP id y5mr1133283ljn.301.1619067292420; Wed, 21 Apr 2021 21:54:52 -0700 (PDT) MIME-Version: 1.0 References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> In-Reply-To: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> From: Gleb Popov Date: Thu, 22 Apr 2021 07:54:26 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? To: Mark Millard Cc: freebsd-hackers X-Rspamd-Queue-Id: 4FQlTW1S6hz4sbC X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [0.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[yahoo.com]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.49:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(1.00)[1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.49:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.49:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.49:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 04:54:56 -0000 On Thu, Apr 22, 2021 at 1:00 AM Mark Millard wrote: > > On 2021-Apr-21, at 11:27, Gleb Popov wrote: > > > > This makes sense, thanks. > > > > However, this code works on Linux and seems to return credentials of the > user that started the process. I actually stumbled upon this when porting > this code: > https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L805 > > > > Would it make sense if FreeBSD followed Linux semantics in this case? If > not, what are my options for porting the software? > > From what I can tell . . . > > FreeBSD defines LOCAL_PEERCRED and what goes with its use, not linux. > Linux defines SO_PEERCRED and what goes with its use, not FreeBSD. > > If I understand right, your code is incompatible with the referenced > CollaboraOnline code from just after the #else (so __FreeBSD__ case, > not the linux case): > > getsockopt(getFD(), 0, LOCAL_PEERCRED, &creds, &credSize) > vs. your: > getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &creds, &credSize) > > Note the 0 vs. the SOL_LOCAL. Your code is a mix of Linux > and FreeBSD code when it should not be. > SOL_LOCAL is defined to 0, so this is fine. > See also the following that involved replacing a SOL_LOCAL > with a 0 for getsockopt used with LOCAL_PEERCRED: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234722 > > Yes, I'm aware that Linux SO_PEERCRED operates on socket level, while ours operates on level 0. This is taken in account in the code I posted. As I said, the error stems from the fact that Linux allows getting creds from the listening socket. From owner-freebsd-hackers@freebsd.org Thu Apr 22 08:28:24 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D7DF75E4D6A for ; Thu, 22 Apr 2021 08:28:24 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQrCq3Z1Fz3K9B for ; Thu, 22 Apr 2021 08:28:23 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id 6A872496B; Thu, 22 Apr 2021 10:28:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bLis8InagNW3; Thu, 22 Apr 2021 10:28:17 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id E10C54966; Thu, 22 Apr 2021 10:28:16 +0200 (CEST) From: Peter Blok Message-Id: <90E56B6C-7ED3-41E5-9BE5-7B61DAD843B0@bsd4all.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: cross building i386 on amd64 Date: Thu, 22 Apr 2021 10:28:13 +0200 In-Reply-To: <20210416081208.bdd3f0ffcd2120ee72f18459@j.email.ne.jp> Cc: freebsd-hackers@freebsd.org To: Yoshihiro Ota References: <376DADB2-A7A9-4519-888C-BCD8A32B62B3@bsd4all.org> <98964b07-b9a5-ca23-ef9d-7cb87d086282@FreeBSD.org> <20210416081208.bdd3f0ffcd2120ee72f18459@j.email.ne.jp> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FQrCq3Z1Fz3K9B X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bsd4all.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 08:28:24 -0000 Hi, Thanks for all the ideas. I=E2=80=99ll try what works and report back. Peter > On 16 Apr 2021, at 14:12, Yoshihiro Ota wrote: >=20 > Hi >=20 > On Fri, 16 Apr 2021 22:35:55 +0300 > Andriy Gapon > wrote: >=20 >> On 16/04/2021 20:22, Peter Blok wrote: >>> Hi, >>>=20 >>> I=E2=80=99m cross building 12-STABLE i386 on a 12-STABLE amd64 = system. Sources are refreshed every day. >>>=20 >>> Build runs fine and put everything in the right directory. For the = target i386 system it is >>> in /usr/obj/i386TARGET. >>>=20 >>> Next I NFS mount the source /on /usr/src and /usr/obj/i386TARGET on = /usr/obj on the target >>> machine >>>=20 >>> When I run make installworld it will use install >>> from /usr/obj/usr/src/i386.i386/tmp/legacy/usr/bin because it is the = first install it finds in >>> the PATH set by installworld. This tanks because install is compiled = for amd64. >>>=20 >>> I understand why the legacy path is compiled for amd64. This is = needed to build a distribution. >>>=20 >>> So is this is bug or is the way I distribute the objects not = supported? >>=20 >> I used this method only for same architecture installations. >> Never tried it for different architectures, so I cannot tell if this = is a=20 >> regression. >>=20 >> --=20 >> Andriy Gapon >=20 > I recall someone said build and install needs to be on the same = archtecture and base code. >=20 > 1. I use ggated/ggatec to export i386 device(s) to amd64 and run = install on amd64. >=20 > 2. I haven't tried this for a while and not sure if this still works. > You can use nullfs mount over the i386.i386/tmp to hide binaries from = there; > if it hasn't changed, install targets don't build tmp and thus ends up = picking from regular /bin and /usr/bin - there may be cases this fails. >=20 > Hiro > _______________________________________________ > freebsd-hackers@freebsd.org = mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers = > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org = " From owner-freebsd-hackers@freebsd.org Thu Apr 22 08:36:16 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F0E15E5504 for ; Thu, 22 Apr 2021 08:36:16 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQrNv6LbQz3KZC for ; Thu, 22 Apr 2021 08:36:15 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id 3F9964972 for ; Thu, 22 Apr 2021 10:36:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6l4TPJmXgl7k for ; Thu, 22 Apr 2021 10:36:16 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id 6DB374971 for ; Thu, 22 Apr 2021 10:36:16 +0200 (CEST) From: Peter Blok Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: 32-bit jail on 64-bit host Message-Id: Date: Thu, 22 Apr 2021 10:36:13 +0200 To: freebsd-hackers@freebsd.org X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FQrNv6LbQz3KZC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[bsd4all.org]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 08:36:16 -0000 Hi, I have created a 32-bit jail on a 64-bit running 12-STABLE. The jail is = also build using the same source. The jail gives me a 32-bit environment. I=E2=80=99m getting an IP = address and I can ping others on the same network segment. But I can=E2=80=99t set a default route. route add default 192.168.1.1 route: writing to routing socket: Invalid argument add net default: gateway 192.168.1.1 fib 0: Invalid argument # netstat -rn Routing tables (0) (0) UH=20 (0) (0) U=20 (0) (0) UHS=20 (0) (0) UH=20 (0) (0) U=20 (0) (0) UHS # ifconfig -a lo0: flags=3D8049 metric 0 mtu 16384 options=3D680003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 inet 127.0.0.1 netmask 0xff000000 groups: lo nd6 options=3D21 e0b_websip: flags=3D8843 metric = 0 mtu 1500 options=3D8 ether 0e:88:d7:20:99:80 hwaddr 02:80:ad:6e:79:0b inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 groups: epair media: Ethernet 10Gbase-T (10Gbase-T ) status: active nd6 options=3D29 Any idea how to fix this? I=E2=80=99m using vnet bridge Peter= From owner-freebsd-hackers@freebsd.org Thu Apr 22 08:56:35 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B78C05E63C8 for ; Thu, 22 Apr 2021 08:56:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-23.consmr.mail.gq1.yahoo.com (sonic303-23.consmr.mail.gq1.yahoo.com [98.137.64.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQrrL4xnfz3Ltc for ; Thu, 22 Apr 2021 08:56:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619081792; bh=xG2aVxy0Vuv2Kw/p4Q9hh+36JBGzFMbUgy45xOZXVXT=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=QSkfIkqa0Xgpmz3J89jukBbxpqHJI0/OMM09n46alyt7hpfE4goLT6oMLPIUDsIjmfsv1D/Cd+Unc4kvoBWFa1RrhUPVBEJQhf827kRHCTyzXcX8tgUij9lDF/x9iWePi5oeDEBCS0PzxAI9vUa6c900U8P3QtBiYKOu/PGgCILZtoEKlZGN22gu/7Xh9BKEjd4/LD5UkeRxQJ9l5xigb3RiapSgvnrgT5xUxMURPrOfXrs0pP60Gv3bihmLqj7rY655PqX5jb+SwShp/7PLk68jtkLURU9gBYxO0Ie4FYdsPqGWIKDbvDPeR2X92vCc3urbZl1qu8oFtMh54sSd1g== X-YMail-OSG: qT.BMnUVM1kXef.gxz3HLKKSYtt7YVqRdB6sBviQD_Xw3kBjmXFgYTL99V6bNpv uJ.dawcBv8ZnIyyucsY3.QWC8HKq6C_R_5_KjJ6mBiGEXmpBwGxU14Cg.ugAA1lNSJmCYlIzD6yU vqMa6xyaH_80T.BpA5vsQDZ87eT8JYyNtYKVlnW1HBzRBp03Ue6DXq6mOS4eqS0lRf8GtzA1BIi. QAau7mic0dAoAozpa_7F6FzCZG4xiYRDYcIH0C8YWpUxUfV0lUogw64pv45ZKGv.hYJaOHKLFozl 2xQWD_D_WxV7M.QKx6vAGeU71vOtljp0Ki2ijzrXZWmoi0nPZNaGXzhLSSht4ZzBrlohjHCebyAM _VmgYA8zKEwxbzxCQjxIpmGqbdCToiYhj.YfKSMf0_cd8OS5sX18vIVfsJwdhftxT7yisv7Ic9a8 JNBDEfiC1PTga8fYkzX5Yh9oU1v14oLL_mKOuesETdZ02pOCo0EPxjkIMZ50BK4DXBZNa8LyKh1R _rkXnKCa0C30.xL5dR551wpSFVhHN7EiSPRn128C9oOK9uK8pTLUCpTkWMEMUNngVXw6ewfcWVY. MpHjkYL5kbo71BUgtYhvQQ3YqsfhA1OUMQgeykfoVwaKRVjXSHWvFjBdBtRFtdAi666tMhbLo1pD aLgChK__OKjopV3CGey35gR9InACGb5mzUH4bH2OMld2PaquhOrPfdmO.rSoQKHRG9McOJyeqFOl cdO1Y7xpSAY.VPYwe.N3ogRO1w5XSHCbI4z5KIq9dHKl2751d8uwr3hyt8brEBnIMvg_9qd_NIaB cdWMtaI0i54jU50BRyl3HSezHSqcwwiei9IbpiHGKmecFflSwIEs1VGsAUKAZKoPetiRjD6zOlWy m1WChdynbjO7Vt..7GhQptQQYdEH3zuFu0HTcXpcwZmSSfaqUsEN1EMdY2FWXi73vs6n_ohmoprx CvORCw5SeG1H3Ulbt2t7Qmu0qSsri1HQfrrmxOR4PudJ2jsTTV0hVljy0s2dTa.R89q.kJM5xFEW QvSWqJb8Giu9v3ZnSTu2lzQRNWrhyCGvUfULvQ0j1xpGwzWqTxjPWjpgGw4ZOU823dJqGb6qG2ux zW6mnOKq3VAk8qypxKStB.jIJZ3_9taPiVQg4VCzb3kRWT055EoqauITqBMYS09fNpoJr0ZiNzLw nzl_oxOs9CLFbK6MmacUMNzWk_lm5Xh3gFZEAv.FTCkUAmNBYa5VTptShFjdrDKX0U0uDGM8ohbU .dSrqoh.LWbBJiK.ucH.BRuXL8UjoQr7BE0cZLPpc.jE1dMl9CigTuwsXYOjGKN53O7yVx3Tk_e3 zdwecNq0FFcRrlT4Puc5BDG9EPn.l0vEDA8f7i_bPC9el9R9wHXXeK.xNuqPk34mp_e19aLQcyC8 IxbykQUH44D07bQfWlImWLIYfowYmrvepqpJ67fxYVEKlrwykNgUHzB1cBmVor2ScmAUyfMejB0P 5yd.FJVLyhvxPDeW3S5SsF9kyW2fO5vAnSmtS5RAiRQpUJzF8pGBk74Ki5fILuaYod3.bumsPAJO EJW0ZETY.jXrjQ6hYgDB7OXQIb.Q1UdNTwV2CTCCdrA2dPkwk6cS3Ky7vB8OvRPjjL512B.TbYsy 5Q2fnVhvBtz7_jNxuzNF76a_8owe65KuFYOchLS_cENxzfLnsCEw4bm0fd_MokO7G7PSRGiU5yJB pxdHoTeiVpeuAxorlu6NSDh2VPLiqiv0VpD2nHMFgtZPRaGEnwvTrsiUucAPqvREXK1bUgJ2sXwD EvcL4pSTBef4mfNOinGZsw.2rosXaBwDfmaMOJ8c_1zykioL6PLriPnmREGb23HjaUCuuBC2632b X6aiaohQFcQdjvDi.g9nvPf_tN8zN91ryExEXPVjM2ryPNndjBlRUTytvq2uY8.21WzlBYNMZFVm VXOsGxDMbAZQMhlJzAUaidsWp94hHM.DnfFpXDSkuYzzLg1hDEuEJPu5_bxpL019qqeyxJC5V8C9 Pfz9ILl3HpFpdVTfon7oRKp6P3MN3lDbkASYgOEqQdvDJtKBxdWqOpnhgsVZKaMEJzr6XVt.nWBY 5dSOhHDr0UaKNIe9Lk1uz2B9O6hDv39sQrZy0qz1VgJlT9FAx_f8Mou3Ha2nEWY9Ysdd3KJxdGOs uJFPnvVvNLRXiSUCRe3TsVVCi2ybBTEIW9XtK_J_n5jZcJnsIoDtgpCI2ZwjkkdI1OMzKn2qLoNc sIwdHeP1dOlgnfAUXAFqmQJX4y0loXzJ_cFGD0TIdSfk6ElEexwRIN_1YYJM_BF62gSXi0i8Ey.2 _SiGoF8Zg9TuJY85gBn5h8eeBrfA7AKcT9ygAnUHbfQeNSP7P3VzfbG3sDXblJoM9JI8gXjT7RqH vUTgZdw7edcNxN2rxGkXt8EQS9va9X4OTqqskSSXTs9t_XRyKx9AWeZ1vaQ6HXaSjw6H_mV5f47M QJfUKaRdRPNj68_WTJ5V4Rt_88_nIv3VAniFGnkJipFtueFd87eAbVXKuNWHECOdMsfvlziJySA3 y7YaUmnqPW2GezkC7dUTiLLfPUuqaTC1emizCBGncdYejjTt4krGdfXW7wvAj1NO6SOg9SSv4cQ- - X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Thu, 22 Apr 2021 08:56:32 +0000 Received: by kubenode578.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 49bde85c1f0a73319339c8660dca2ac5; Thu, 22 Apr 2021 08:56:29 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: Date: Thu, 22 Apr 2021 01:56:28 -0700 Cc: freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <270C028E-322E-4DAB-A240-B6E4341E6163@yahoo.com> References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> To: Gleb Popov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FQrrL4xnfz3Ltc X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.64.204:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.64.204:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.204:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.204:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 08:56:35 -0000 On 2021-Apr-21, at 21:54, Gleb Popov wrote: >=20 >=20 >=20 >> On Thu, Apr 22, 2021 at 1:00 AM Mark Millard = wrote: >>=20 >> On 2021-Apr-21, at 11:27, Gleb Popov wrote: >> >=20 >> > This makes sense, thanks. >> >=20 >> > However, this code works on Linux and seems to return credentials = of the user that started the process. I actually stumbled upon this when = porting this code: = https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L805 >> >=20 >> > Would it make sense if FreeBSD followed Linux semantics in this = case? If not, what are my options for porting the software? >>=20 >> =46rom what I can tell . . . >>=20 >> FreeBSD defines LOCAL_PEERCRED and what goes with its use, not linux. >> Linux defines SO_PEERCRED and what goes with its use, not FreeBSD. >>=20 >> If I understand right, your code is incompatible with the referenced >> CollaboraOnline code from just after the #else (so __FreeBSD__ case, >> not the linux case): >>=20 >> getsockopt(getFD(), 0, LOCAL_PEERCRED, &creds, &credSize) >> vs. your: >> getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &creds, &credSize) >>=20 >> Note the 0 vs. the SOL_LOCAL. Your code is a mix of Linux >> and FreeBSD code when it should not be. >=20 > SOL_LOCAL is defined to 0, so this is fine. >=20 >>=20 >> See also the following that involved replacing a SOL_LOCAL >> with a 0 for getsockopt used with LOCAL_PEERCRED: >>=20 >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D234722 >>=20 >=20 > Yes, I'm aware that Linux SO_PEERCRED operates on socket level, while = ours operates on level 0. This is taken in account > in the code I posted. >=20 > As I said, the error stems from the fact that Linux allows getting = creds from the listening socket. (Is there any Linux documentation indicating that Linux is required to allow that? POSIX? Etc,? Or is such code depending on such properties operating outside the range of the guarantees?) Is the context linux compat code? Direct FreeBSD code? It would be FreeBSD's compat handling that needs to match Linux handling if FreeBSD is to span compatibility in the subject area. Does the compat code work as Linux (implicitly?) specifies? (If not it might be more likely that FreeBSD would change things sufficiently for it to work in at least that kind of context.) But if the compat code already matches the Linux behavior for which socket(s) allow the accessbut direct FreeBSD does not . . . FreeBSD appears to have its own programming model for direct use, not exposing the temporary copy of the peercred that is associated with the listening socket. If the compat code works for Linux, it is not so obvious that FreeBSD would change anything since it appears to have a working, usable API: direct FreeBSD code needs to use FreeBSD's API. I'm not sure how much FreeBSD tries to make direct FreeBSD code allow code designed for Linux to work, except to help with the Linux compat code doing the right thing in a simpler way than otherwise. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Thu Apr 22 10:27:53 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2AB85E95E4 for ; Thu, 22 Apr 2021 10:27:53 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQtsj069kz3h8r for ; Thu, 22 Apr 2021 10:27:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 13MARe57087087 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 10:27:41 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: pblok@bsd4all.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 13MARbtO028246 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 22 Apr 2021 17:27:37 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: 32-bit jail on 64-bit host To: Peter Blok , freebsd-hackers@freebsd.org References: From: Eugene Grosbein Message-ID: <98b59e11-dc6b-9ae9-c233-204b82521ee2@grosbein.net> Date: Thu, 22 Apr 2021 17:27:27 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,LOCAL_FROM, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4FQtsj069kz3h8r X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=fail (mx1.freebsd.org: domain of eugen@grosbein.net does not designate 2a01:4f8:c2c:26d8::2 as permitted sender) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-2.10 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_FAIL(1.00)[-all]; FREEFALL_USER(0.00)[eugen]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c2c:26d8::2:from]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c2c:26d8::2:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.997]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 10:27:53 -0000 22.04.2021 15:36, Peter Blok wrote: > Hi, > > I have created a 32-bit jail on a 64-bit running 12-STABLE. The jail is also build using the same source. > > The jail gives me a 32-bit environment. I’m getting an IP address and I can ping others on the same network segment. > > But I can’t set a default route. > > route add default 192.168.1.1 > route: writing to routing socket: Invalid argument > add net default: gateway 192.168.1.1 fib 0: Invalid argument > > # netstat -rn > Routing tables > (0) (0) UH > (0) (0) U > (0) (0) UHS > (0) (0) UH > (0) (0) U > (0) (0) UHS > > # ifconfig -a > lo0: flags=8049 metric 0 mtu 16384 > options=680003 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 > inet 127.0.0.1 netmask 0xff000000 > groups: lo > nd6 options=21 > e0b_websip: flags=8843 metric 0 mtu 1500 > options=8 > ether 0e:88:d7:20:99:80 > hwaddr 02:80:ad:6e:79:0b > inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 > groups: epair > media: Ethernet 10Gbase-T (10Gbase-T ) > status: active > nd6 options=29 > > Any idea how to fix this? You will have to put in jail ABI-compatible userland utilities that talk with a kernel directly. This means 64 bit versions of binaries like route, ipfw, maybe netstat etc. You should not assume and use jail as virtual machine, it is not. It is a container for a set of processes sharing same kernel with other jails. If you need full-blown virtual machine, use bhyve. From owner-freebsd-hackers@freebsd.org Thu Apr 22 10:33:02 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 59AB65E9EDA for ; Thu, 22 Apr 2021 10:33:02 +0000 (UTC) (envelope-from dmilith@me.com) Received: from st43p00im-ztdg10061801.me.com (st43p00im-ztdg10061801.me.com [17.58.63.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQtzd2Cnwz3hHQ for ; Thu, 22 Apr 2021 10:33:01 +0000 (UTC) (envelope-from dmilith@me.com) Received: from [192.168.0.12] (home.verknowsys.com [31.179.184.210]) by st43p00im-ztdg10061801.me.com (Postfix) with ESMTPSA id 617978C09EC; Thu, 22 Apr 2021 10:32:59 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: 32-bit jail on 64-bit host From: Daniel Dettlaff In-Reply-To: Date: Thu, 22 Apr 2021 12:32:56 +0200 Cc: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> References: To: Peter Blok X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Proofpoint-Virus-Version: =?UTF-8?Q?vendor=3Dfsecure_engine=3D1.1.170-22c6f66c430a71ce266a39bfe25bc?= =?UTF-8?Q?2903e8d5c8f:6.0.391,18.0.761,17.0.607.475.0000000_definitions?= =?UTF-8?Q?=3D2021-04-22=5F04:2021-04-21=5F03,2021-04-22=5F04,2020-04-07?= =?UTF-8?Q?=5F01_signatures=3D0?= X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 mlxscore=0 suspectscore=0 malwarescore=0 spamscore=0 clxscore=1011 bulkscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2104220088 X-Rspamd-Queue-Id: 4FQtzd2Cnwz3hHQ X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.60 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[me.com]; MV_CASE(0.50)[]; RWL_MAILSPIKE_GOOD(0.00)[17.58.63.170:from]; R_SPF_ALLOW(-0.20)[+ip4:17.58.0.0/16]; DKIM_TRACE(0.00)[me.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[me.com,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_LOW(-0.10)[17.58.63.170:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[me.com]; MID_RHS_MATCH_FROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[17.58.63.170:from]; DWL_DNSWL_NONE(0.00)[me.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[me.com:s=1a1hai]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:714, ipnet:17.58.63.0/24, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[17.58.63.170:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 10:33:02 -0000 If you need to run 32bit software with 64bit base system just try = creating 64bit jail with lib32 subsystem present. Then 32bit software = should be able to run properly in such jail, but you can't run 32bit = jail on 64bit base as Eugene said. > On 22 Apr 2021, at 10:36, Peter Blok wrote: >=20 > Hi, >=20 > I have created a 32-bit jail on a 64-bit running 12-STABLE. The jail = is also build using the same source. >=20 > The jail gives me a 32-bit environment. I=E2=80=99m getting an IP = address and I can ping others on the same network segment. >=20 > But I can=E2=80=99t set a default route. >=20 > route add default 192.168.1.1 > route: writing to routing socket: Invalid argument > add net default: gateway 192.168.1.1 fib 0: Invalid argument >=20 > # netstat -rn > Routing tables > (0) (0) UH=20 > (0) (0) U=20 > (0) (0) UHS=20 > (0) (0) UH=20 > (0) (0) U=20 > (0) (0) UHS >=20 > # ifconfig -a > lo0: flags=3D8049 metric 0 mtu 16384 > options=3D680003 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 > inet 127.0.0.1 netmask 0xff000000 > groups: lo > nd6 options=3D21 > e0b_websip: flags=3D8843 = metric 0 mtu 1500 > options=3D8 > ether 0e:88:d7:20:99:80 > hwaddr 02:80:ad:6e:79:0b > inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 > groups: epair > media: Ethernet 10Gbase-T (10Gbase-T ) > status: active > nd6 options=3D29 >=20 > Any idea how to fix this? >=20 > I=E2=80=99m using vnet bridge >=20 > Peter > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Thu Apr 22 10:33:41 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D636C5EA09E for ; Thu, 22 Apr 2021 10:33:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQv0P00wrz3hNW; Thu, 22 Apr 2021 10:33:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 13MAXXXm008777 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 22 Apr 2021 13:33:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 13MAXXXm008777 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 13MAXXZD008776; Thu, 22 Apr 2021 13:33:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Apr 2021 13:33:33 +0300 From: Konstantin Belousov To: Gleb Popov Cc: Mark Millard , freebsd-hackers Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? Message-ID: References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4FQv0P00wrz3hNW X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-0.54 / 15.00]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_MEDIUM(0.32)[0.323]; SPAMHAUS_ZRD(0.00)[2001:470:d5e7:1::1:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.87)[-0.868]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:d5e7:1::1:from]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FREEMAIL_CC(0.00)[yahoo.com,freebsd.org]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 10:33:41 -0000 On Thu, Apr 22, 2021 at 07:54:26AM +0300, Gleb Popov wrote: > On Thu, Apr 22, 2021 at 1:00 AM Mark Millard wrote: > > > > > On 2021-Apr-21, at 11:27, Gleb Popov wrote: > > > > > > This makes sense, thanks. > > > > > > However, this code works on Linux and seems to return credentials of the > > user that started the process. I actually stumbled upon this when porting > > this code: > > https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L805 > > > > > > Would it make sense if FreeBSD followed Linux semantics in this case? If > > not, what are my options for porting the software? > > > > From what I can tell . . . > > > > FreeBSD defines LOCAL_PEERCRED and what goes with its use, not linux. > > Linux defines SO_PEERCRED and what goes with its use, not FreeBSD. > > > > If I understand right, your code is incompatible with the referenced > > CollaboraOnline code from just after the #else (so __FreeBSD__ case, > > not the linux case): > > > > getsockopt(getFD(), 0, LOCAL_PEERCRED, &creds, &credSize) > > vs. your: > > getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &creds, &credSize) > > > > Note the 0 vs. the SOL_LOCAL. Your code is a mix of Linux > > and FreeBSD code when it should not be. > > > > SOL_LOCAL is defined to 0, so this is fine. > > > > See also the following that involved replacing a SOL_LOCAL > > with a 0 for getsockopt used with LOCAL_PEERCRED: > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234722 > > > > > Yes, I'm aware that Linux SO_PEERCRED operates on socket level, while ours > operates on level 0. This is taken in account > in the code I posted. > > As I said, the error stems from the fact that Linux allows getting creds > from the listening socket. There is no peer for listening socket. Show minimal code that works for you on Linux. From owner-freebsd-hackers@freebsd.org Thu Apr 22 11:06:39 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AAF25EB681 for ; Thu, 22 Apr 2021 11:06:39 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQvkQ2p1Mz3kSx for ; Thu, 22 Apr 2021 11:06:37 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 13MB6YS9087717 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 11:06:35 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: dmilith@me.com Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 13MB6VQu029057 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 22 Apr 2021 18:06:31 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: 32-bit jail on 64-bit host To: Daniel Dettlaff , Peter Blok References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> Cc: freebsd-hackers@freebsd.org From: Eugene Grosbein Message-ID: <6bf646b1-865c-be02-843a-f80f3f671eb9@grosbein.net> Date: Thu, 22 Apr 2021 18:06:21 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,LOCAL_FROM, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4FQvkQ2p1Mz3kSx X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=fail (mx1.freebsd.org: domain of eugen@grosbein.net does not designate 2a01:4f8:c2c:26d8::2 as permitted sender) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-2.10 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_FAIL(1.00)[-all]; FREEFALL_USER(0.00)[eugen]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; ARC_NA(0.00)[]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c2c:26d8::2:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c2c:26d8::2:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FREEMAIL_TO(0.00)[me.com,bsd4all.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 11:06:39 -0000 22.04.2021 17:32, Daniel Dettlaff via freebsd-hackers wrote: > If you need to run 32bit software with 64bit base system just try creating 64bit jail with lib32 subsystem present. Then 32bit software should be able to run properly in such jail, but you can't run 32bit jail on 64bit base as Eugene said. Not exactly. It is definitely possible to run 32bit-only jail with 64 host (kernel) if one does not try use it as distinct machine with its own set of interfaces, routing tables etc. but with its own IP address(-es) assigned to one of host's interfaces (loopback or other) and assigned to the jail in question. A jail is a containter managed by its host, so use it appropriately, manage it at host, not inside a jail and you'll be OK. From owner-freebsd-hackers@freebsd.org Thu Apr 22 11:13:40 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8784B5ECE74 for ; Thu, 22 Apr 2021 11:13:40 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FQvtW5Mqfz3mGR for ; Thu, 22 Apr 2021 11:13:39 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id AB56649CA; Thu, 22 Apr 2021 13:13:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8pgrRDWcl9EH; Thu, 22 Apr 2021 13:13:38 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id 7803249C9; Thu, 22 Apr 2021 13:13:38 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: 32-bit jail on 64-bit host From: Peter Blok In-Reply-To: <6bf646b1-865c-be02-843a-f80f3f671eb9@grosbein.net> Date: Thu, 22 Apr 2021 13:13:35 +0200 Cc: Daniel Dettlaff , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0F8012C1-92F9-489E-9AAB-9131EF2360D3@bsd4all.org> References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> <6bf646b1-865c-be02-843a-f80f3f671eb9@grosbein.net> To: Eugene Grosbein X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FQvtW5Mqfz3mGR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+mx]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; DMARC_NA(0.00)[bsd4all.org]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; FREEMAIL_CC(0.00)[me.com,freebsd.org]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 11:13:40 -0000 The goal is to use p5-DBD-Oracle which only works/compiles on i386 on a = very light system not able to run bhyve. I have tried with lib32 but it fails as well. I do not have a lot of = time to debug this, so I was hoping I was able to make this work on an = i386 jail. I=E2=80=99ll change the jail.conf and manage it from the outside. = Hopefully it works. > On 22 Apr 2021, at 13:06, Eugene Grosbein wrote: >=20 > 22.04.2021 17:32, Daniel Dettlaff via freebsd-hackers wrote: >=20 >> If you need to run 32bit software with 64bit base system just try = creating 64bit jail with lib32 subsystem present. Then 32bit software = should be able to run properly in such jail, but you can't run 32bit = jail on 64bit base as Eugene said. >=20 > Not exactly. It is definitely possible to run 32bit-only jail with 64 = host (kernel) > if one does not try use it as distinct machine with its own set of = interfaces, routing tables etc. > but with its own IP address(-es) assigned to one of host's interfaces = (loopback or other) > and assigned to the jail in question. A jail is a containter managed = by its host, > so use it appropriately, manage it at host, not inside a jail and = you'll be OK. >=20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Thu Apr 22 12:00:13 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 631BB5EF47B for ; Thu, 22 Apr 2021 12:00:13 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQwwD2yppz3phS for ; Thu, 22 Apr 2021 12:00:12 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 13MC04wH088693 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 12:00:04 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: pblok@bsd4all.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 13MC00gv031863 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 22 Apr 2021 19:00:00 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: 32-bit jail on 64-bit host To: Peter Blok References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> <6bf646b1-865c-be02-843a-f80f3f671eb9@grosbein.net> <0F8012C1-92F9-489E-9AAB-9131EF2360D3@bsd4all.org> Cc: Daniel Dettlaff , freebsd-hackers@freebsd.org From: Eugene Grosbein Message-ID: <16553d95-a9f5-f0b1-4f31-1c09309b8369@grosbein.net> Date: Thu, 22 Apr 2021 18:59:51 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <0F8012C1-92F9-489E-9AAB-9131EF2360D3@bsd4all.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,LOCAL_FROM, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4FQwwD2yppz3phS X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=fail (mx1.freebsd.org: domain of eugen@grosbein.net does not designate 2a01:4f8:c2c:26d8::2 as permitted sender) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-2.10 / 15.00]; RCVD_TLS_ALL(0.00)[]; R_SPF_FAIL(1.00)[-all]; FREEFALL_USER(0.00)[eugen]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; ARC_NA(0.00)[]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c2c:26d8::2:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c2c:26d8::2:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; FREEMAIL_CC(0.00)[me.com,freebsd.org]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 12:00:13 -0000 22.04.2021 18:13, Peter Blok wrote: > The goal is to use p5-DBD-Oracle which only works/compiles on i386 on a very light system not able to run bhyve. > > I have tried with lib32 but it fails as well. I do not have a lot of time to debug this, so I was hoping I was able to make this work on an i386 jail. > > I’ll change the jail.conf and manage it from the outside. Hopefully it works. You do not need vnet-enabled bridged jail for the task. Simple jail will do it just fine. From owner-freebsd-hackers@freebsd.org Thu Apr 22 12:21:12 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 668C65F09C0 for ; Thu, 22 Apr 2021 12:21:12 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FQxNR3tTBz3rWN for ; Thu, 22 Apr 2021 12:21:11 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 13MCL7Xq089144 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Apr 2021 12:21:07 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: pblok@bsd4all.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 13MCL0ic032178 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 22 Apr 2021 19:21:00 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: cross building i386 on amd64 To: Peter Blok , freebsd-hackers@freebsd.org References: <376DADB2-A7A9-4519-888C-BCD8A32B62B3@bsd4all.org> From: Eugene Grosbein Message-ID: <31999507-b590-edcc-a4ff-b0a18105bcfd@grosbein.net> Date: Thu, 22 Apr 2021 19:20:50 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <376DADB2-A7A9-4519-888C-BCD8A32B62B3@bsd4all.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,LOCAL_FROM, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.0 SPF_PASS SPF: sender matches SPF record * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains * -0.0 NICE_REPLY_A Looks like a legit reply (A) X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4FQxNR3tTBz3rWN X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=fail (mx1.freebsd.org: domain of eugen@grosbein.net does not designate 2a01:4f8:c2c:26d8::2 as permitted sender) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-2.10 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_FAIL(1.00)[-all]; FREEFALL_USER(0.00)[eugen]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a01:4f8:c2c:26d8::2:from]; SPAMHAUS_ZRD(0.00)[2a01:4f8:c2c:26d8::2:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 12:21:12 -0000 17.04.2021 0:22, Peter Blok wrote: > Hi, > > I’m cross building 12-STABLE i386 on a 12-STABLE amd64 system. Sources are refreshed every day. > > Build runs fine and put everything in the right directory. For the target i386 system it is in /usr/obj/i386TARGET. > > Next I NFS mount the source /on /usr/src and /usr/obj/i386TARGET on /usr/obj on the target machine > > When I run make installworld it will use install from /usr/obj/usr/src/i386.i386/tmp/legacy/usr/bin because it is the first install it finds in the PATH set by installworld. This tanks because install is compiled for amd64. > > I understand why the legacy path is compiled for amd64. This is needed to build a distribution. > > So is this is bug or is the way I distribute the objects not supported? It was never supported. But, you will be fine doing it othe way: running "make installworld" using same system you used to run "make buildworld". NFS-export i386 system to build host and run both build and install there. From owner-freebsd-hackers@freebsd.org Thu Apr 22 13:39:44 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E13705F3407 for ; Thu, 22 Apr 2021 13:39:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound4s.ore.mailhop.org (outbound4s.ore.mailhop.org [54.185.97.28]) (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 4FQz743KKSz3vyQ for ; Thu, 22 Apr 2021 13:39:44 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1619098783; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=JwEZyQbk4YXs00zpKwvX0QgGR1vZNAcBTyReaLwISEfmcdXC0JW+ZVlHrWP7U48AIFlv4dht0rZbQ XJRi4EmzWalXP3aODjgqYaJiyGI1gg4zf8cholQlBk4BdZMwYe1jenjvnBPLdy/RTkhRp9O9MOXMc2 xXsNmxmEEQZBdUmWzF8RU+ZS59QBHC+XlDatLrmmAPjqkAKesLdFlvOgrX5NJceDfdTOruEMIoqXEC 4UCZqx9i4FoBgtaOCfHiZhPO8Pcl1G+2PeXtg0S1Rw/FBh1V5x6mP4kbRlx5BzxZHVaYakcYSv2C1F Fb0o40aet29BVjKZbkGhUDU+NBQZccg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=cjQuiQA020pxZKDRcri59VTyNuEODZr3akmU9DiiADk=; b=Dkw1mII45+Khxf7AbPM9yPPUI6Aa+nRy+gGaXuIZK9S4tA6nmKQbBV8PuA3TL06m4jx9PHJeZWHn/ uYqd+jGW6ZAqRif5yIkvDC8iswta5gBOW2dFcTyCxwnaiwXayidPrWzD0ayOQUOmPM5BQBJLipvGIY HklscTObMrx1P2vMvOE4kttfiUuM/rvSb7SWHo1L8w/i09Rab5wWRRM67k3zwDIljMz55LxO4lcOON DHC8otofob4gh+SC3ivk1JBxAfT4z0HbZKsq0Lqa/XA9MGy4MJtk51ZPGcHX5g5theG3EVbDwDuevF oh7IXyFJ4vyoBoWM2ku2uU4+Y8hTAig== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=cjQuiQA020pxZKDRcri59VTyNuEODZr3akmU9DiiADk=; b=xK6YhtbJlEjLYPLqoragHLDF8nJ0752FB/N1lSkPtjpcgTTMUn+jDolMEvKV89xXsDRNM1WPw7ctd rwptqxR7Bvm/QxG1E2iGaYA9v5S0bUqHNNTnS/SiJMKToB7sa85tIzwCQpB7MtjYZO8vQbDVvembBz Q7nGMfR18lRO9pSvHuSYyqhbvYlqmbNl5T9njwz8Ez6R/vtLlGKX1O/zZco9MIdeD0yviUKxKRtWQJ YXd/YuFQIIfCQmkGM671B2Vr0JcWC13tY2QG0YQ7sIN/MIQmi74NuIZpDfEttdUVdjiiumiR80/9N9 3ELDjdgc0LoTGFTxg0WY2FPcI7v0+hA== X-Originating-IP: 67.177.211.60 X-MHO-RoutePath: aGlwcGll X-MHO-User: 309efc5e-a370-11eb-a652-89389772cfc7 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 309efc5e-a370-11eb-a652-89389772cfc7; Thu, 22 Apr 2021 13:39:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 13MDdeVX055697; Thu, 22 Apr 2021 07:39:40 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: 32-bit jail on 64-bit host From: Ian Lepore To: Daniel Dettlaff , Peter Blok Cc: freebsd-hackers@freebsd.org Date: Thu, 22 Apr 2021 07:39:40 -0600 In-Reply-To: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> Content-Type: text/plain; charset="iso-8859-7" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FQz743KKSz3vyQ X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.184.0.0/15, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 13:39:44 -0000 On Thu, 2021-04-22 at 12:32 +0200, Daniel Dettlaff via freebsd-hackers wrote: > If you need to run 32bit software with 64bit base system just try > creating 64bit jail with lib32 subsystem present. Then 32bit software > should be able to run properly in such jail, but you can't run 32bit > jail on 64bit base as Eugene said. > That is not what Eugene said, and you CAN run a 32-bit jail on a 64-bit host; I do so on this machine. As Eugene said, you simply need to copy a few selected 64-bit binaries into the jail, replacing the 32-bit version of those programs. That is, install the jail from a 32-bit build or packages, and then just copy the necessary few binaries from your host root filesystem into the jail. It would be nice if there was a list somewhere of which binaries need to be replaced. I just did it by trial and error... when I ran into things that didn't work, I tried using a 64-bit copy of that program and if it worked: problem solved. -- Ian > > On 22 Apr 2021, at 10:36, Peter Blok wrote: > > > > Hi, > > > > I have created a 32-bit jail on a 64-bit running 12-STABLE. The > > jail is also build using the same source. > > > > The jail gives me a 32-bit environment. I¢m getting an IP address > > and I can ping others on the same network segment. > > > > But I can¢t set a default route. > > > > route add default 192.168.1.1 > > route: writing to routing socket: Invalid argument > > add net default: gateway 192.168.1.1 fib 0: Invalid argument > > > > # netstat -rn > > Routing tables > > (0) (0) UH > > (0) (0) U > > (0) (0) UHS > > (0) (0) UH > > (0) (0) U > > (0) (0) UHS > > > > # ifconfig -a > > lo0: flags=8049 metric 0 mtu 16384 > > options=680003 > > inet6 ::1 prefixlen 128 > > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 > > inet 127.0.0.1 netmask 0xff000000 > > groups: lo > > nd6 options=21 > > e0b_websip: flags=8843 > > metric 0 mtu 1500 > > options=8 > > ether 0e:88:d7:20:99:80 > > hwaddr 02:80:ad:6e:79:0b > > inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 > > groups: epair > > media: Ethernet 10Gbase-T (10Gbase-T ) > > status: active > > nd6 options=29 > > > > Any idea how to fix this? > > > > I¢m using vnet bridge > > > > Peter > > From owner-freebsd-hackers@freebsd.org Thu Apr 22 15:12:45 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 409945F5E5F for ; Thu, 22 Apr 2021 15:12:45 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (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 "ultimatedns.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR1BN5P31z4VMx for ; Thu, 22 Apr 2021 15:12:43 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 13MFCbZl067783; Thu, 22 Apr 2021 08:12:43 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) MIME-Version: 1.0 Date: Thu, 22 Apr 2021 08:12:37 -0700 From: Chris To: Peter Blok Cc: freebsd-hackers@freebsd.org Subject: Re: 32-bit jail on 64-bit host In-Reply-To: References: User-Agent: UDNSMS/17.0 Message-ID: X-Sender: bsd-lists@bsdforge.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FR1BN5P31z4VMx X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 15:12:45 -0000 On 2021-04-22 01:36, Peter Blok wrote: > Hi, > > I have created a 32-bit jail on a 64-bit running 12-STABLE. The jail is also > build > using the same source. > > The jail gives me a 32-bit environment. I’m getting an IP address and I can > ping > others on the same network segment. > > But I can’t set a default route. > > route add default 192.168.1.1 > route: writing to routing socket: Invalid argument > add net default: gateway 192.168.1.1 fib 0: Invalid argument > > # netstat -rn > Routing tables > (0) (0) UH > (0) (0) U > (0) (0) UHS > (0) (0) UH > (0) (0) U > (0) (0) UHS > > # ifconfig -a > lo0: flags=8049 metric 0 mtu 16384 > options=680003 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 > inet 127.0.0.1 netmask 0xff000000 > groups: lo > nd6 options=21 > e0b_websip: flags=8843 metric 0 mtu > 1500 > options=8 > ether 0e:88:d7:20:99:80 > hwaddr 02:80:ad:6e:79:0b > inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 > groups: epair > media: Ethernet 10Gbase-T (10Gbase-T ) > status: active > nd6 options=29 > > Any idea how to fix this? > > I’m using vnet bridge I do it. I don't think vnet or a bridge is necessary or perhaps even desirable in this situation. All my 32/64bit jails access the hosts net out of localhost (127.0.0.2-N) and I use pf(4) to redirect the packets. I have a static block of internet facing addresses. So change yours accordingly pf.conf(5) EXT_ADDR="W.X.Y.Z" ... set skip on { lo0, lo1 } ... nat pass on re0 from { lo1 } to any -> $EXT_ADDR rdr pass on re0 proto tcp from any to { lo1 } -> $EXT_ADDR ... block in pass out ... I add an entry in the hosts hosts(5) file, and in the jails hosts(5) for accounting purposes. The jails resolve.conf(5) file looks like this nameserver 127.0.0.1 nameserver 127.0.0.2 options timeout:1 attempts:1 rotate And all gets it done for me. HTH --Chris > > Peter > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Thu Apr 22 16:11:30 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 355F65F8380 for ; Thu, 22 Apr 2021 16:11:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-24.consmr.mail.gq1.yahoo.com (sonic304-24.consmr.mail.gq1.yahoo.com [98.137.68.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR2V921k7z4YL9 for ; Thu, 22 Apr 2021 16:11:28 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619107887; bh=P6av+5p8aNpYxozMFnM0vKTHWJNpc+FcQRGAMgFC/T/=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=HdnzDIiCfBLpPEkHDY9AFrWA/BYYORva7+yCqwey1bR/Hi7Bltq6teVfhuHstnRwxxKgUlH3nbHOV8hYg8X509tMnRwNozbbLOtKBwXVPX4D/rUYTFI0rvHgHp1Wk/+kvXah6bl4BX+/xQ+VXUL6lHCc6sHIyWnuo/dG6cPpgbq5lREvKHQTWLUBScF4GgCgQR+eUhXFgj5XzC2Ayb6wVrLn/Lq9xlEj8Tobojl1uchJtADimvplc/9250i/zxNtgdzGb5FdeODfdwRH7fdZjFzR0muelXhaBODI6phR8WMTxvUyC/WiJQY7N7H4QFWBgikyZtg/cLFn1YyOsJc0aw== X-YMail-OSG: eL0UHJgVM1nX6ON42fkJ0kUjPXKAHf5yjoD4YzddzKy79TdNDgQ_0QE3r377Acj XnhHprmWDGcVubAhq9xWQbXPS1Vms56iZz6F7.Kd9K3eVbDfqyAt7HtwHrB0lI.szxNW8Y2AKy1t C6BqQzuAssrU896USZR_thXBbxgr6tiT9d7yo2I1pdpXue_TmM17tEpN7we_oKwxgeM2rYJc_7jm 9wl0iODBRWyVc4UaBDFgpp1zspEgA1KHSJYNWa67vfb8Ja4qdaZi05V.jzQuID4eyPryzNYjV_Ty 5uDWwhdVORwqW59Cdxm8jY.8BQJ9aSmCrjxempLj8GE6lD.5DTIwQe0NFc9NTqvUGlHnS49Sso1J tdupYXffvC5ds8pNF9FcztyGhHfjuzgXvJHexoe6dWroTnBwiPsC3_QjoF6Y9plpsYOxCA1qb7Mw QmDik2b28srzEViVVJnksEH2pDypacOlqhwrBHl2IJxSfU1QYu8qFNOW9YN2BTXqNIqEtBQeCz8a oMt0QAuukaFXKOAsGgoxS5zQCx0JnBFR0ZwhYo6HFnOdOxQPlmvvXBLuD9lzSZGio23RS3DRnFr1 aHow9CnFumg1YzjfYeL.dyR1UXRvY0Mv7g9SbtKc6K6.K2wEixyi5A3BbPd2FFmQC2fpw5HhUyq6 3IiPoMA4C.oek0etu1LJ9gLInbj7gby1kKWTHkRGPbgAL.HffMHEv3pqTKx2pH3OSBl1JoavCpVx AokSZNSaHXR227excHDer908tdez9cR6xM97Vz3WFOel.xCLJltmcN8t3pYlg1gLPKCVd0xMZu5u yenCg.MowQVICkj09XFzpHENi.PgFMwfZatRVuTWdr_49kcyi95mk0FKvnKGhkrqkjwY5xLXgjOB uPMePiK8cfzTeJqDfZPZDs7P86X9RyTkfPtm7Tq1UvWsU7H.LUYe8B0_RyCFyTrgwOAJ9jHGXd_v Hw4ht_dMVtZgEtP6AT4G07gbP1IfveMO9rsZ9kuA5ttbKzXMazauIPQay4c7yybDx.AtV.ajraL7 BBT4xV8zJ0G2co3iTKbiLFiPoLnlYgoPJtM9Tv04UJxFqJ8yTtYGPXkOiuvxHC0BLQfBeoqIB9h0 _iAsI4yTTG7lUIKbxK0LdwpPQ9i8t.iYecB5LQ9Ofz6khkWJaPkQAJCjytDcZf5XDFFbZTMfwAyo qJscyF7A9dfogfEpqjaV89ngyhmWWKmviwxx_gf77QSs9_zThLPtjs30EOTZBtEDbhX3K.MnlSJe IbuLJHVAgj1gryR4dgJkNNbifyfSd9iPBT4cwNfFn3YmDAj9EFRNNr7isy56_KwUTH7nZs_o8_Sy VNfPm9uyIVC7hnbGfj1mYJiQtrNKRS4POvaMsCr2HwBDZTMaXlWNVHiZlN3qDDkkzYFWFlJbzLGm 9tJ.aPAYKT7ZZ_Ni.SIyysDqDLaUqHmoZ4phGNgrc1hAfAhC9LTgsB.fTE4yTt33a7M3sKJvBBQn evWFtiqTgQbzHPhE_PVopPIiKiNarXBrn7BETBvHiyFEllC0RRvDrtp8pTg46YdjrAOvGS6VdaSi 3CbSq6HbXL3TqC.XfoTsPeJ8PPKauiLmwj0ICj6f0ZiL_UhFJ36D_XO3Cv9Gn_A_N1wV63Qghefp Ax5u_PBREbKRueYVp1Eyzi34lR2zjzB4KyEcGbNcVXI1djR4w1wNuo2cJpHjzy95FcwWc3Wla4ZH o.GOy2ihGRFibhLGGmLjBkaJba4qqWUREEIEAZVyeC2pMPD78844FIbxPXNVVKzBpzBMk.b1sTJD _h.nMYdlWKzVnCsgnovumVe2suU0ixb9D8QjtzAkLtzlfE5CBJKYEJPCZZ1ux2MIzNkrlFtOzAl4 mX_5QyGzbGaLGH1kCJA1F7Lzo6o0Hwhnk9SyZWYQcabxNWQhBYQMjsQ_bKw55onBcUwx5sZE70AO vIY7os54Ep_WdgcA0BQSpqB4iHUhZPkhW1PNrv0Ie1RUf4u4b3.U2Y9lf.BjV980jwIUpgnp.tKB hvX5flSlg6D_1YQty5ANGqsRFuXI7xWNKyXMU.7Ruk8e05Eqq9NUtYjnGdpvPNsVUbFaoSdINOzP TWVSxkG6vJ3JvHfQKkUKMrFbBsQ_aJl4hghsGlTbGHghfJKd8YGLdLE9ZSw1NwPbIUOcdq0xoRVe kENloBMQ6vuqcizDRBwR4.oPxHaVDxONBmJ8hzcQMepW5yCeIOi.c49ng71QZUcLBgvDnPzFTthI XT.x6bdGuAYi48nCP_Da0Gh4DJ57TFNtHwCfw_4G_qiwbi7nSvQX2jbkCdHsGqMLP5GZ5334omoz Mwgdy_hZP9xN_XnjhLVx4._lzAFRPZ5P5C6JJYl_lg8seoFqadxpLccg3N_jIgvZatzXqWBtufW5 cNrQUV85ibWmFKq5luZ0RReJTr72MF7Zz_hUwiIPL2IIHS6VPhv_sFsCT7fGmI2AfBdkDP7k4cYH AfmseAT98Kf5Aof_sea4PTlw1Cyy7HpQXoEqmJKKWQchcpdPAFZCUc8d1LRN40Mgih8aGISENP_k cyryrWem7WTE0iJtKDb3dANcDRuXHvfow8Qf2fl8JWKe_92icLKnfBT25FbrwW1k7hm3TcxWchnU jG93_yHcKuOpa X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Thu, 22 Apr 2021 16:11:27 +0000 Received: by kubenode512.mail-prod1.omega.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 187ad196b54bb9c3cd75108577bc3513; Thu, 22 Apr 2021 16:11:24 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: Date: Thu, 22 Apr 2021 09:11:23 -0700 Cc: Gleb Popov , freebsd-hackers Content-Transfer-Encoding: 7bit Message-Id: <71F2CA02-7FEB-42EE-B5F6-D0A864ADA651@yahoo.com> References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> To: Konstantin Belousov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FR2V921k7z4YL9 X-Spamd-Bar: / X-Spamd-Result: default: False [-0.51 / 15.00]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.99)[0.990]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.68.205:from]; SPAMHAUS_ZRD(0.00)[98.137.68.205:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.205:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.205:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 16:11:30 -0000 On 2021-Apr-22, at 03:33, Konstantin Belousov wrote: > > On Thu, Apr 22, 2021 at 07:54:26AM +0300, Gleb Popov wrote: >> On Thu, Apr 22, 2021 at 1:00 AM Mark Millard wrote: >> >>> >>> On 2021-Apr-21, at 11:27, Gleb Popov wrote: >>>> >>>> This makes sense, thanks. >>>> >>>> However, this code works on Linux and seems to return credentials of the >>> user that started the process. I actually stumbled upon this when porting >>> this code: >>> https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L805 >>>> >>>> Would it make sense if FreeBSD followed Linux semantics in this case? If >>> not, what are my options for porting the software? >>> >>> From what I can tell . . . >>> >>> FreeBSD defines LOCAL_PEERCRED and what goes with its use, not linux. >>> Linux defines SO_PEERCRED and what goes with its use, not FreeBSD. >>> >>> If I understand right, your code is incompatible with the referenced >>> CollaboraOnline code from just after the #else (so __FreeBSD__ case, >>> not the linux case): >>> >>> getsockopt(getFD(), 0, LOCAL_PEERCRED, &creds, &credSize) >>> vs. your: >>> getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &creds, &credSize) >>> >>> Note the 0 vs. the SOL_LOCAL. Your code is a mix of Linux >>> and FreeBSD code when it should not be. >>> >> >> SOL_LOCAL is defined to 0, so this is fine. >> >> >>> See also the following that involved replacing a SOL_LOCAL >>> with a 0 for getsockopt used with LOCAL_PEERCRED: >>> >>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234722 >>> >>> >> Yes, I'm aware that Linux SO_PEERCRED operates on socket level, while ours >> operates on level 0. This is taken in account >> in the code I posted. >> >> As I said, the error stems from the fact that Linux allows getting creds >> from the listening socket. > > There is no peer for listening socket. Well, I ran into the below while looking around as far as what getsockopt gets access to for peercred on a listening socket: net/unix/af_unix.c has unix_listen that it uses and that code does "set credentials so connect can copy them" but the getsockopt code has access to the copy that listen established for making the copy. I initially show the init_peercred(sk) side of things below. static int unix_listen(struct socket *sock, int backlog) { int err; struct sock *sk = sock->sk; struct unix_sock *u = unix_sk(sk); err = -EOPNOTSUPP; if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET) goto out; /* Only stream/seqpacket sockets accept */ err = -EINVAL; if (!u->addr) goto out; /* No listens on an unbound socket */ unix_state_lock(sk); if (sk->sk_state != TCP_CLOSE && sk->sk_state != TCP_LISTEN) goto out_unlock; if (backlog > sk->sk_max_ack_backlog) wake_up_interruptible_all(&u->peer_wait); sk->sk_max_ack_backlog = backlog; sk->sk_state = TCP_LISTEN; /* set credentials so connect can copy them */ init_peercred(sk); err = 0; out_unlock: unix_state_unlock(sk); out: return err; } where: static void init_peercred(struct sock *sk) { put_pid(sk->sk_peer_pid); if (sk->sk_peer_cred) put_cred(sk->sk_peer_cred); sk->sk_peer_pid = get_pid(task_tgid(current)); sk->sk_peer_cred = get_current_cred(); } and unix_listen is used via: static const struct proto_ops unix_stream_ops = { .family = PF_UNIX, . . . .listen = unix_listen, . . . static const struct proto_ops unix_seqpacket_ops = { .family = PF_UNIX, . . . .listen = unix_listen, . . . On the other side is the only use of SO_PEERCRED: int sock_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; . . . case SO_PEERCRED: { struct ucred peercred; if (len > sizeof(peercred)) len = sizeof(peercred); cred_to_ucred(sk->sk_peer_pid, sk->sk_peer_cred, &peercred); if (copy_to_user(optval, &peercred, len)) return -EFAULT; goto lenout; } . . . used via (only place): if (level == SOL_SOCKET) err = sock_getsockopt(sock, level, optname, optval, optlen); else if (unlikely(!sock->ops->getsockopt)) err = -EOPNOTSUPP; else err = sock->ops->getsockopt(sock, level, optname, optval, optlen); This code appears to return the copied peercred information for SOL_SOCKET and SO_PEERCRED used together. I did not find any documentation that sk->sk_peer_cred recorded by listen should be externally accessible via getsockopt on the listen socket but it is from what I can tell. I'm only noting that having such a request seems to be valid in the Linux implementation and is not rejected, I'm not claiming details of which "peer" is involved in the returned information or the like. > Show minimal code that works for you on Linux. > === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Thu Apr 22 18:13:20 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B3A6B5FB00A for ; Thu, 22 Apr 2021 18:13:20 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FR5Bl3WGyz4fln; Thu, 22 Apr 2021 18:13:18 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id EAE154B4D; Thu, 22 Apr 2021 20:13:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CdKb3wOKHmdW; Thu, 22 Apr 2021 20:13:18 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id 4184F4B4A; Thu, 22 Apr 2021 20:13:17 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: 32-bit jail on 64-bit host From: Peter Blok In-Reply-To: Date: Thu, 22 Apr 2021 20:13:13 +0200 Cc: Daniel Dettlaff , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> To: Ian Lepore X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FR5Bl3WGyz4fln X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bsd4all.org]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; FREEMAIL_CC(0.00)[me.com,freebsd.org]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 18:13:20 -0000 I tried to replace some of the 32-bit binaries before, but it started to = require shared libs as well, so I stopped. I=E2=80=99ll give it a shot = later. I now run it with out vnet and it indeed works. I have managed to = compile p5-DBD-Oracle which works now. Because all of my other jails were vnet jails, I didn=E2=80=99t think = about doing it the old way without vnet. Peter > On 22 Apr 2021, at 15:39, Ian Lepore wrote: >=20 > On Thu, 2021-04-22 at 12:32 +0200, Daniel Dettlaff via freebsd-hackers > wrote: >> If you need to run 32bit software with 64bit base system just try >> creating 64bit jail with lib32 subsystem present. Then 32bit software >> should be able to run properly in such jail, but you can't run 32bit >> jail on 64bit base as Eugene said. >>=20 >=20 > That is not what Eugene said, and you CAN run a 32-bit jail on a = 64-bit=20 > host; I do so on this machine. As Eugene said, you simply need to = copy > a few selected 64-bit binaries into the jail, replacing the 32-bit > version of those programs. That is, install the jail from a 32-bit > build or packages, and then just copy the necessary few binaries from > your host root filesystem into the jail. >=20 > It would be nice if there was a list somewhere of which binaries need > to be replaced. I just did it by trial and error... when I ran into > things that didn't work, I tried using a 64-bit copy of that program > and if it worked: problem solved. >=20 > -- Ian >=20 >>> On 22 Apr 2021, at 10:36, Peter Blok wrote: >>>=20 >>> Hi, >>>=20 >>> I have created a 32-bit jail on a 64-bit running 12-STABLE. The >>> jail is also build using the same source. >>>=20 >>> The jail gives me a 32-bit environment. I=E2=80=99m getting an IP = address >>> and I can ping others on the same network segment. >>>=20 >>> But I can=E2=80=99t set a default route. >>>=20 >>> route add default 192.168.1.1 >>> route: writing to routing socket: Invalid argument >>> add net default: gateway 192.168.1.1 fib 0: Invalid argument >>>=20 >>> # netstat -rn >>> Routing tables >>> (0) (0) UH=20 >>> (0) (0) U=20 >>> (0) (0) UHS=20 >>> (0) (0) UH=20 >>> (0) (0) U=20 >>> (0) (0) UHS >>>=20 >>> # ifconfig -a >>> lo0: flags=3D8049 metric 0 mtu 16384 >>> options=3D680003 >>> inet6 ::1 prefixlen 128 >>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 >>> inet 127.0.0.1 netmask 0xff000000 >>> groups: lo >>> nd6 options=3D21 >>> e0b_websip: flags=3D8843 >>> metric 0 mtu 1500 >>> options=3D8 >>> ether 0e:88:d7:20:99:80 >>> hwaddr 02:80:ad:6e:79:0b >>> inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 >>> groups: epair >>> media: Ethernet 10Gbase-T (10Gbase-T ) >>> status: active >>> nd6 options=3D29 >>>=20 >>> Any idea how to fix this? >>>=20 >>> I=E2=80=99m using vnet bridge >>>=20 >>> Peter >>>=20 >=20 From owner-freebsd-hackers@freebsd.org Thu Apr 22 18:15:13 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3B9E5FB1A3 for ; Thu, 22 Apr 2021 18:15:13 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FR5Dw6yhRz4fZZ for ; Thu, 22 Apr 2021 18:15:12 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id 371E24B59; Thu, 22 Apr 2021 20:15:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5YqCfl6sC541; Thu, 22 Apr 2021 20:15:13 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id 5B4934B06; Thu, 22 Apr 2021 20:15:13 +0200 (CEST) From: Peter Blok Message-Id: Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: cross building i386 on amd64 Date: Thu, 22 Apr 2021 20:15:10 +0200 In-Reply-To: <31999507-b590-edcc-a4ff-b0a18105bcfd@grosbein.net> Cc: freebsd-hackers@freebsd.org To: Eugene Grosbein References: <376DADB2-A7A9-4519-888C-BCD8A32B62B3@bsd4all.org> <31999507-b590-edcc-a4ff-b0a18105bcfd@grosbein.net> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FR5Dw6yhRz4fZZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bsd4all.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 18:15:13 -0000 > On 22 Apr 2021, at 14:20, Eugene Grosbein wrote: >=20 > 17.04.2021 0:22, Peter Blok wrote: >> Hi, >>=20 >> I=E2=80=99m cross building 12-STABLE i386 on a 12-STABLE amd64 = system. Sources are refreshed every day. >>=20 >> Build runs fine and put everything in the right directory. For the = target i386 system it is in /usr/obj/i386TARGET. >>=20 >> Next I NFS mount the source /on /usr/src and /usr/obj/i386TARGET on = /usr/obj on the target machine >>=20 >> When I run make installworld it will use install from = /usr/obj/usr/src/i386.i386/tmp/legacy/usr/bin because it is the first = install it finds in the PATH set by installworld. This tanks because = install is compiled for amd64. >>=20 >> I understand why the legacy path is compiled for amd64. This is = needed to build a distribution. >>=20 >> So is this is bug or is the way I distribute the objects not = supported? >=20 > It was never supported. But, you will be fine doing it othe way: = running "make installworld" > using same system you used to run "make buildworld". NFS-export i386 = system to build host > and run both build and install there. I wasn=E2=80=99t sure if any non NFS supported functionality was needed = like chflags. Peter >=20 >=20 > _______________________________________________ > freebsd-hackers@freebsd.org = mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers = > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org = " From owner-freebsd-hackers@freebsd.org Thu Apr 22 18:49:44 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8B205FB8FA for ; Thu, 22 Apr 2021 18:49:44 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR60l6NR6z4h5m for ; Thu, 22 Apr 2021 18:49:43 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lj1-f173.google.com with SMTP id l22so45680080ljc.9 for ; Thu, 22 Apr 2021 11:49:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gN9girZvGMR1JqK+2dx/0VUwj6Mxafj81ady0cus1K8=; b=TFljkb3XFDDIFw79c11i9cXUlqvcm1bCf+BOyX8ekKJwNfQGkJ2infAk/q+pC2/gwD 3xy+kD2Miu+jHquNDgbnM7NwucvniGHh7z75Orl+41UOJqUqMd3Kc/9gz4Muan4us4TS Bca0WAT4MOSAAOrF1hgWJQqk8+op1PvTVq2okBfl43hEv3k1Bgzensa5e2xSmtq7ehLK iutlR5InPS2/dEMvcWXKvxT19N84rGx3ffUj4Bub5jN27DpqU4liYyf14TF7z+qdxtdz FCdQjWoYoTxQDyBkw9LiQhrL2FbNaJ0ErPGdDur6lUU6GB74lHUa2+lgI0h20l9tsiut I4Zw== X-Gm-Message-State: AOAM530x5RdNWK52eW9KUaomiaWoGdDNu7j4QtemTn4+t09yWfUsugSC Oqh2JIfmnMB/fDn4n0zmQv+ComoJ3zCkWA== X-Google-Smtp-Source: ABdhPJx3sRtaWnKj1Xu/Y3Qx5jVv2CnfP4cNm5qpwl/xM2vjWFurE1FqndkhL+W0K8EbB49XApt9Yw== X-Received: by 2002:a2e:b54a:: with SMTP id a10mr153218ljn.488.1619117381702; Thu, 22 Apr 2021 11:49:41 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id w23sm330265lfu.132.2021.04.22.11.49.41 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Apr 2021 11:49:41 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id z23so6544362lji.4 for ; Thu, 22 Apr 2021 11:49:41 -0700 (PDT) X-Received: by 2002:a2e:b175:: with SMTP id a21mr163818ljm.248.1619117381188; Thu, 22 Apr 2021 11:49:41 -0700 (PDT) MIME-Version: 1.0 References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> In-Reply-To: From: Gleb Popov Date: Thu, 22 Apr 2021 21:49:15 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? To: Konstantin Belousov Cc: freebsd-hackers X-Rspamd-Queue-Id: 4FR60l6NR6z4h5m X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.208.173 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-1.94 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.94)[-0.942]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.208.173:from]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.208.173:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.173:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.173:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 18:49:44 -0000 On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov wrote: > There is no peer for listening socket. > > Show minimal code that works for you on Linux. > Here you go: http://arrowd.name/un_linux.cpp It is almost identical to FreeBSD one, but works for me on ArchLinux. From owner-freebsd-hackers@freebsd.org Thu Apr 22 19:27:13 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 547EF5FC6E7 for ; Thu, 22 Apr 2021 19:27:13 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (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 "ultimatedns.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR6r06F9kz4jgj; Thu, 22 Apr 2021 19:27:12 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 13MJR5Gc017715; Thu, 22 Apr 2021 12:27:13 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) MIME-Version: 1.0 Date: Thu, 22 Apr 2021 12:27:05 -0700 From: Chris To: Peter Blok Cc: Ian Lepore , Daniel Dettlaff , freebsd-hackers@freebsd.org Subject: Re: 32-bit jail on 64-bit host In-Reply-To: References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> User-Agent: UDNSMS/17.0 Message-ID: X-Sender: bsd-lists@bsdforge.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FR6r06F9kz4jgj X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 19:27:13 -0000 On 2021-04-22 11:13, Peter Blok wrote: > I tried to replace some of the 32-bit binaries before, but it started to > require > shared libs as well, so I stopped. I’ll give it a shot later. I'm not sure which binaries you might need either. But could /rescue bring you any closer? --Chris > > I now run it with out vnet and it indeed works. I have managed to compile > p5-DBD-Oracle which works now. > > Because all of my other jails were vnet jails, I didn’t think about doing it > the > old way without vnet. > > Peter > >> On 22 Apr 2021, at 15:39, Ian Lepore wrote: >> >> On Thu, 2021-04-22 at 12:32 +0200, Daniel Dettlaff via freebsd-hackers >> wrote: >>> If you need to run 32bit software with 64bit base system just try >>> creating 64bit jail with lib32 subsystem present. Then 32bit software >>> should be able to run properly in such jail, but you can't run 32bit >>> jail on 64bit base as Eugene said. >>> >> >> That is not what Eugene said, and you CAN run a 32-bit jail on a 64-bit >> host; I do so on this machine. As Eugene said, you simply need to copy >> a few selected 64-bit binaries into the jail, replacing the 32-bit >> version of those programs. That is, install the jail from a 32-bit >> build or packages, and then just copy the necessary few binaries from >> your host root filesystem into the jail. >> >> It would be nice if there was a list somewhere of which binaries need >> to be replaced. I just did it by trial and error... when I ran into >> things that didn't work, I tried using a 64-bit copy of that program >> and if it worked: problem solved. >> >> -- Ian >> >>>> On 22 Apr 2021, at 10:36, Peter Blok wrote: >>>> >>>> Hi, >>>> >>>> I have created a 32-bit jail on a 64-bit running 12-STABLE. The >>>> jail is also build using the same source. >>>> >>>> The jail gives me a 32-bit environment. I’m getting an IP address >>>> and I can ping others on the same network segment. >>>> >>>> But I can’t set a default route. >>>> >>>> route add default 192.168.1.1 >>>> route: writing to routing socket: Invalid argument >>>> add net default: gateway 192.168.1.1 fib 0: Invalid argument >>>> >>>> # netstat -rn >>>> Routing tables >>>> (0) (0) UH >>>> (0) (0) U >>>> (0) (0) UHS >>>> (0) (0) UH >>>> (0) (0) U >>>> (0) (0) UHS >>>> >>>> # ifconfig -a >>>> lo0: flags=8049 metric 0 mtu 16384 >>>> options=680003 >>>> inet6 ::1 prefixlen 128 >>>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 >>>> inet 127.0.0.1 netmask 0xff000000 >>>> groups: lo >>>> nd6 options=21 >>>> e0b_websip: flags=8843 >>>> metric 0 mtu 1500 >>>> options=8 >>>> ether 0e:88:d7:20:99:80 >>>> hwaddr 02:80:ad:6e:79:0b >>>> inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 >>>> groups: epair >>>> media: Ethernet 10Gbase-T (10Gbase-T ) >>>> status: active >>>> nd6 options=29 >>>> >>>> Any idea how to fix this? >>>> >>>> I’m using vnet bridge >>>> >>>> Peter >>>> >> > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Thu Apr 22 19:34:47 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CA2435FC9DC for ; Thu, 22 Apr 2021 19:34:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR70k4gzrz4jt2; Thu, 22 Apr 2021 19:34:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 13MJYctW037977 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 22 Apr 2021 22:34:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 13MJYctW037977 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 13MJYcND037976; Thu, 22 Apr 2021 22:34:38 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Apr 2021 22:34:38 +0300 From: Konstantin Belousov To: Gleb Popov Cc: freebsd-hackers Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? Message-ID: References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4FR70k4gzrz4jt2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [-1.88 / 15.00]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2001:470:d5e7:1::1:from]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_SPF_SOFTFAIL(0.00)[~all]; SPAMHAUS_ZRD(0.00)[2001:470:d5e7:1::1:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-0.88)[-0.882]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; SUBJECT_ENDS_QUESTION(1.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 19:34:47 -0000 On Thu, Apr 22, 2021 at 09:49:15PM +0300, Gleb Popov wrote: > On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov > wrote: > > > There is no peer for listening socket. > > > > Show minimal code that works for you on Linux. > > > > Here you go: http://arrowd.name/un_linux.cpp > It is almost identical to FreeBSD one, but works for me on ArchLinux. Of course it works because it uses s2, that is, connected and not listening socket, for getsockopt(), same as the working FreeBSD version. From owner-freebsd-hackers@freebsd.org Thu Apr 22 20:33:48 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BB0A5FE2DD for ; Thu, 22 Apr 2021 20:33:48 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR8Jq2zYMz4mNX for ; Thu, 22 Apr 2021 20:33:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619123624; bh=JNqoHqFXP76Ax7QyvMIVQswX1Sx/ESLEdQh0xkQpUkh=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=prys0vHq2E0qit/RWVuF8S1R5GMn7/xkemmubYg1KCbkTTPq1P34OmJiOYpA7f/GNG25tQDhiOIuAK1yiesJEi9yamg5aN4EkW7eUNRQsBZB/ksHrFaf2ED37fFNymzE1shZhw0zYxFdxqHtqhXAlSlRW+esolXExxFheY3JP6kroIrSre9nYRiwuz1cVlsD0AObrdB04ALnt56gSHcf06xal0k6EpJXs/OZsStARBebyDEdkBiN0kJUF1AQ3SimWYnN5wuU1H2v2det7uvZHayYPDBpl07F1WeA3Hh9sM+uNp/nXxmcKmxbS6PcSB5Ed2O3mBu44YStesPd+PRpzg== X-YMail-OSG: 2rVR7VoVM1lS5bzWmzgFuAeb5Mrhyts6VOB74NH7C6Z1Vf2MP21.Aw0EpkdhDuU qg63QT4PNUNvD4BQ1jEq5Lp6wGZYYWEO_Zae8oN.WaodifQ_TgZyS7hHD0YZ1QFNozRox9Up9S5K pDbaumDsQAkc0giaOVSwT5eK0wLzNdJn0WVqDm0M3CE9TLGupZwUIh2dDCVu.5Uv2pF4H6eqOmfH WLQKxptKlfEFVXbxDjdyYgl.rLKVXkH.HorPdsmMroRwNvXS_GveXfeg4p9Zs.tHumaiiYFxOyRZ SaQqAw9bv9UPFr7rrBATJtX7zHHY578WngIOUdp_od4VCy2J08_cd.UPQrJTJJn54mYa8vMne131 vlufsUYII233ZBFBjmr1GnQEFn4yPV47AeHcFmcLsZr6Y0RC6_bcDqPbnl0xQkPSiZVzhhdLqpIf s6LfXiOZQiUQvKpCDAI0UHi8wCcgkPUTomeZ6Drb4ZcPvGwq.DiNYEObkyEfIpXoeoWoEB0sQU9t tdSBwP.4ckmVfV6QtvzY4dEq7IqdYlTfDLI0Ge2_Ql_XTB7TQ7LmvFkp1uI_LqVFPbdCLhuF0aYW D0_zJX64OoFpGbdL7lQhnqtpp6crm0XIIocFflQcAXZLQCkW_1TiGkZDbPWUpp1KtYn1HvWWmt.S iwrgPnbOSwT18eXcFgMB.gdEZG06sKjnMT0I5nAVZbH..46vjlhaDWKBj3zNBIoXle95QFFm1eon IoliIYjXVdB5iWo14IRro391oXMehskJrgpWRUjs98j2Yte9BEi_Q8gTl78NMbFF6VOgMDLhUpAX jXF6.QODQhdTyFtz7kBjwPV6hG3VFlhx4T8VKCIbvpx0o7dbMvEkovlXVoqJjOXZpJ0RRdGjIodl DLD25CfxzEDfgqCOwsyXTJ.LNeKv8GRcf5iFNgpPLFg5Osh6b1oMJPKyFEzih.ZJWpufXFWV6diZ AmfPxeZHbUXMiO2C42ZQBK8vnT2CoBHtJ_MRZCeOff5QbKXAcs5h6fcW9eU7h8GLvhzCr4M_0N3u uw6IBlpV.OZ9Y4Ed1DBBdhJgAoGfpWtSsc4S0OF3OlvSnX5rYL82y3UOYYbYf2EWaHox80F9z0YM 7Sd8as2SDC3w2SQZcgGEXAZAxgWWt9jtxlAeE27fnkj18jHJdqCYVa2xze5Ugp8U0YrhyJER7f7u 79CwykNGR5UnNbPcYrRmE3hj3PVhgVFJtzLwur0bRR4g824_M265BxaTH9FfwkonxVfVPazuO1rm cMcyTf9yufT6Ax3F_xVzt7tMnGq7FLtAiRDZfOpeDJPjr_UiHBUwP56gK2zhPRX.dc1K36xPchMi RIoDosWOwdTxMLZM8Hn7gbcpebXppDDD3Si7ePde0mLg6B8HmGjGMCBvYVI2Nmn51QoNzg9cW7kS ow6eiqdPqqPuMqzZwWaEDAf_g5yAZYiZTkCYv0n2mzZCBPkOsPBI5c7y0iEtpIe3b0Q4zHnTki88 6c7neFp1pBlqC1b.ds8eoYAS4vmyyJ66H_gB.oG4iz5curv0VOP13stEEwEojwfrLuEY0d_VrIrs iwIwoJpR0NTxDJ_gV59D1r.xeJFEgxNcMy2br4bVC05xgiBNiT0uL_4Vhnwkd5VZ3Gp2RMaHjt9t HT9o2wGTHCmAd7aA3RYqwvhIl9Si_tYUKZLQu4mo5bjxYuRiAypBhXyO.m5H4fPhHNjCPEUUqDvf 5WCLFlXKyu1XctFvf_kpCyGTWmjrP6xNdVyqRTOpNGE0cjdIrsQlZEfmg1cLoeHBUrjoK.87mLJ7 unxr.JFhKPUSAR85qK.oXbLoecV.24FAX3UgCc3IRzcVGZY1yzVOLQCeFuoUCS55KJEVgpJDEU98 zDPj6VsgtY5jaoK89cXdL2jK53llPqsdwoZZAQfhIkfAu7pwmPYxLpdjRFZHKfIbk1EIF0FU5AI1 _ApDaSQ9E9RDwd2sZ2GohgaDGh1mweB6G9rWBcw64rpB9FVoXKBo_y3qQ2O6Jk1.IBoBUs_F9J1C UMBA9R6kFXmn4Uh4hy5QOWkX5EfXSmxZY.PHqwfFasyp8BByr5L0SphVJ3XASBAP8eby7wjVCxgY 2SMJ.UFGKjoCbLX8ucCTDL_Ap1avPa7qqKY2BbTx0zx.yav72Lpp5oAWrOaEJibMpzakRaL3eeth V2BkiipMEN200gRjkTo5JV.lAtCNQrHfHRr1ORLotNJDljBROdPW2usEuGlPYcuCRW_xoFOQKyLJ gBRAQvjNEI2XQtz3OeMO_j55782zHymkD8xPyd5qi5KLMqHI_OyJjwSmuBuJP1Tn90pghD74li6Q dIxuTUwWILtB0yTJzFqPxvPVVvAVPkxg7r_UpDtLdw0jtXQxMGLxdj1Gl0hOyZGBw3DlnH.m2tQ_ GomY4GIUa.OfRGNTnnvWIBel.JQIJLbUkk8jtiEp7sxji27O1ZaZzhP_Zwjx3d218uW0XgfhCMZa 9SkcljO5Ze3TTp7JU1GHgX4m8HZfCL4sq6H_Xrg1f59R6GMQKMd3y1AhKDZIg8te5balMXAn2aJ0 y8gSeuDQ52unn5d3iIryNYKJEG3iNnuCZJFKzVna_RPhBBH_wsuoG6edaT7UJvp8C9csjVjODwMl N1x__eCHYSGlP X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Thu, 22 Apr 2021 20:33:44 +0000 Received: by kubenode525.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9149e8ba8fe7d883abed16682b392ccc; Thu, 22 Apr 2021 20:33:40 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: Date: Thu, 22 Apr 2021 13:33:39 -0700 Cc: Gleb Popov , freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> To: Konstantin Belousov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FR8Jq2zYMz4mNX X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.65.83:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.65.83:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.65.83:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.65.83:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 20:33:48 -0000 On 2021-Apr-22, at 12:34, Konstantin Belousov = wrote: > On Thu, Apr 22, 2021 at 09:49:15PM +0300, Gleb Popov wrote: >> On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov = >> wrote: >>=20 >>> There is no peer for listening socket. >>>=20 >>> Show minimal code that works for you on Linux. >>>=20 >>=20 >> Here you go: http://arrowd.name/un_linux.cpp >> It is almost identical to FreeBSD one, but works for me on ArchLinux. >=20 > Of course it works because it uses s2, that is, connected and not = listening > socket, for getsockopt(), same as the working FreeBSD version. I made a variant that tries s2 and then s, printing the peercred uid, group id, and pid fields, and built it on Fedora 34. The result was: # ./a.out & ncat -U foobar [1] 18646 s2 data is uid field: 0 groups[0] field: 0 pid field: 18647 s data is uid field: 0 groups[0] field: 0 pid field: 18646 [1]+ Done ./a.out On FreeBSD: # ./a.out & nc -U foobar s2 data is uid field: 0 groups[0] field: 0 pid field: 6984 getsockopt for s failed with Socket is not connected [1] Done ./a.out The code is: #ifndef __FreeBSD__ #define _GNU_SOURCE #endif #include #include #include #include #include #include #ifdef __FreeBSD__ #define FOR_PEERCRED 0 #define CR_GROUP_ID cr_groups[0] #else // Linux #define xucred ucred #define FOR_PEERCRED SOL_SOCKET #define LOCAL_PEERCRED SO_PEERCRED #define cr_uid uid #define CR_GROUP_ID gid #define cr_pid pid #endif #include #include #ifdef __FreeBSD__ #include #endif #include #include void failure(char const * err) { puts(err); puts("failed with"); puts(strerror(errno)); } void die(char const * err) { failure(err); unlink("foobar"); exit(1); } int main() { int s =3D socket(PF_LOCAL, SOCK_STREAM, 0); if(s < 0) die("socket"); struct sockaddr_un addrunix; memset(&addrunix, 0, sizeof(addrunix)); addrunix.sun_family =3D AF_UNIX; memcpy(addrunix.sun_path, "foobar", 6); int r =3D bind(s, (const struct sockaddr *)&addrunix, sizeof(struct = sockaddr_un)); if(r < 0) die("bind"); listen(s, 64); int s2; do { s2 =3D accept4(s, 0, 0, 0); } while (s2 < 0 && errno =3D=3D EAGAIN); if(s2 < 0) die("accept4"); struct xucred s2_creds; socklen_t s2_credSize =3D sizeof(struct xucred); r =3D getsockopt(s2, FOR_PEERCRED, LOCAL_PEERCRED, &s2_creds, = &s2_credSize); if(r < 0) failure("getsockopt for s2"); else printf("s2 data is uid field: %jd groups[0] field: %jd pid = field: %jd\n", (uintmax_t) s2_creds.cr_uid, (uintmax_t) = s2_creds.CR_GROUP_ID, (uintmax_t) s2_creds.cr_pid); struct xucred s_creds; socklen_t s_credSize =3D sizeof(struct xucred); r =3D getsockopt(s, FOR_PEERCRED, LOCAL_PEERCRED, &s_creds, = &s_credSize); if(r < 0) failure("getsockopt for s"); else printf("s data is uid field: %jd groups[0] field: %jd pid field: = %jd\n", (uintmax_t) s_creds.cr_uid, (uintmax_t) s_creds.CR_GROUP_ID, = (uintmax_t) s_creds.cr_pid); unlink("foobar"); return 0; } =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Thu Apr 22 20:47:59 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 246245FE4B0 for ; Thu, 22 Apr 2021 20:47:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-20.consmr.mail.gq1.yahoo.com (sonic317-20.consmr.mail.gq1.yahoo.com [98.137.66.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR8dB27JVz4mkG for ; Thu, 22 Apr 2021 20:47:58 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619124475; bh=KrA1uBlMj5lfY3t2+72FlmxrV9Nwov6y9QmjFRisO/o=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=KZuCq9l0VHkurlj/Gg+e9iDFrN+Lf8jy1EOhccq9FpmJvxIzMTbbL1uMamyx+1BF6CbqiAKLvz3YuokQKKPB/3oPticHFDkMh/6iFN7z3wHor4ICqSe76movJAO6K/1BWsr0wTPwtxeKZhpEot/8YtaTPUtHbkav2NGcjdVRxDa25qMa9ht35KAk9kGhB0OQKk/zaTZt4yW/rItrhnWzba1ey/R4DrvZ6Z0dgaomjWz5edytDXtDvaZBs5Dh+KsEZWFJI7aNpBP8Mcjd/wcXRKmqI8XMbNcb7EVg1WQmT5lvV1gsDJR8MgheOKJLlAa8tliH0LAnjSZTE/8dBH4Ovw== X-YMail-OSG: 0OHqzH0VM1nz7wPt6VMznA_u1l0R4py443xzcmLyxiwqzy0svQC5fDyVp_D3Xxg gbP4Kzqt_HIy4EfBgnPjJa8QC7517jos6UJkZm57iwHIQ1DIQ5A4qo7P0kp6btFuduShOQmWL2Fd kBHVbU5ZTkr8Q2TQRrD1jKKKXYWQR_6uskAfMQvDrDYAd9LQ.RwBgU_qyYtNW0i.TLP5oDuOzuu2 iIy9YXTVrSJm3llBiqEWmI4UIoTeCuMW1Le9YpR8zAJokh_PG5GtteBrc5RYNobhLrBEY7GvzK.w j1B0ql7Q73wsW8.6QxbHzV2yWDwG3FTkxAJMBJouiJcocgGo3yYzTxDgOaSNKGNryC793mhgGybz I.0z2NAEtoGdKs.2ECoUBuY1x.Hw7JOO772AfLT9qHPqogIFyti16uf_vVmOkiuJJIRpaLNs.SQG U_cBh3AxrR9tF_4c1g6RPJ2nzroBDD5WOnGYvWygri4a8Wcety9YrhncTjbib84CZBBFk5y.bCRr 8LT6A5DJTiAoV_myF_WIE.gIsLao.AQx8spRe3Yjs1MMWRcwoOC.y.vYMzM0mcA4I6Wf3SupU6Gw qxn2bNlWoB_okkKKvnKzrpYSjogAn80hz85oOjzwx2vMeyGHM.tXRXiVk1iH5GKBNHDdXbkaqLXG uTTkd6m10q8.5W_F3Km8mfz2ity0UikP5jhdMp.hnSpyC2VixqoV6IORZ0AtTMG1U4ZPp72JtfXH AmZrded02VmcWtYX0BVUH.WvybpFuowsXn_T1l3oxgdtqwpeNbM2p1uvuOgV.nSmvKMaIlMTGcHb O8NacF8yNVC_cY8HFOFlO.KoFKV0j751Y.40udVlFP0MM9FLHjdBRnaMinAzbb3XcRot.oRA6h0g OKateGPXrfzsYGpr6N6LVSnUuesyDljDAAcp9Rz493nbmafM1ZFmv2HW3xyI0QiO8uiFl5La_yM3 aQPpI0H078Kn7bIYVCgl_MVmSPzMhlPiWFwlTusui88XJmN_VsKunuiCDrm5GEZTxDeaZfTumAJ. fMdcziroAtjgRUxWG.uVMXJkRzUQUA.zRsJ14unO6fMCjrmYyvLfqxnxHQLmDp23zLWHRSaUyNiq fo8dqQFXTp5en4R3EBzJfkrg9oAeRCBlrs6a2auSAF8.ndTaIaMbG0nrVq1YScSKQHCMyhpXsVnH PYOe0fL8.bCgqyc8ciu0vFq.T0owv.P_7Gp2uiI_2_ARTsj6dklhFV4LnoB.NH_DzNPY_vm1tA7t UOEiplwO6fi8SmO3duJ3AnE.Pnd.9VQ75MruKg7AIDEcAqUjtpOn5ytEsYj6iWvts562qmmGpDc2 kx6jAhpW2Tkk9oVqTb0H8_Fc3F_Jt4H_oFOIiyuzpbnl.Ydxloo64RHsU2OLhq1yJTawoq9rahWt WtkJkjRgi0_T95vVYr8rimi6VUuhRA4JRmwjZwFgJbNXe.2XsYtuwd38SnDCYEWerAOZAt2U8dr7 TUznZcCQcgLSqqQx.skK3WOuEFFQ5HHyyOXkGZUMplTejvhGezfbeYGyLWWDioFLBdKwhGwEp.Z. VAOvZpZ_CjPDXf2Q_LWLk8NEAMtH500tESUM1k7zg1Gqw7.1ZkYzH9_XFm9.AeUXwsbL_WRnBs2f KOAYvK.cZ5gE5i_IsyAh5scyL78sW.OjVBfKdt53.qBavSGZvQWb11Q132jC9rWanqRaaQg_vyx_ nLmmdrWBQVmormPrmy_YrdNql6DRqAq7tvyGkHtaOpWPfXu.qIX5xxwVOYjR5ICJ675z8fKWtQDV 8fjIDFggRoOC4iPMci0OyshTMBkzBSamB8wVGR6ZtAx08ldwpEPkeIzQdM2Ra3.UXTEpE2MldJVS 81PenB6_fuQsxNGZUQxfUlp9OF4U8Uv8jtTlUSt7rgNCW9SOAYLSx2oyxIm04KRYYbw.jiqX6WK6 HoxPZFAhktyUT.tFG7K5YElnhY5DQMgGzetX62qF0Y1Dg7S1cMbc.k98EFMQDtokIJPnksEn79Ra xfOMd_C7vTJfcnM_Zz0dV7ZazJKfcTcPrzDHjQrsbw_oZGQx7y0pmTlaN1VfH1gTZAh7iwgymJRO S2IyTaxYNVhXh40fBuDOcQYBzLXHqgHnfpwbrfsbr5.HdJ7JOEpEFLeUGri9lx3XIOnecdQw8nAu jC5j9m38Fyt7yMitFM_vUn_dH.H_U40CekJLo2jTd3z2oPC4HFji.psCVwUPtlpj3U7XZopNoIiq q.R1RSDm2QCMdwvCYY3JRnTQKwO.UjxQvIlx6eG8DjppAETX2lQX5B7N6kVNOBk7xAt84tuuizhS ys07GClHdTwrQ1LgeoVm5KBnKhtRP8J6d.rOQspSAyzWwWAre0juy8QCfL6vr1KAov4k8Mw78fy_ wj3YU7NUftv_ooyT.1wlFwG9CZMZ9jAomqMQJBgFbMYF1a7tMHjCVOBTR3cMm5Tvl3A1kM3pbYPf i5Ms.4yUDTH0EpGpULcGRB9F_MGnW2p9JzQzLYRFXeTTzfU9kPfHLdwEuR_RXiefbim2Izh1rD4v 5yK2SjEd.6rKZcofyGuzVyNYuizjjXsesbhfNXHBekXuVTwGQ5qFsfXF1VX8fokIv4BoDuGUE7K9 4gilAhuftDGewbVgddXemnqIqxTWRzJvAPEwgqGCYAVc5SZOeAuDtQZhx.E6OEaRbww-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.gq1.yahoo.com with HTTP; Thu, 22 Apr 2021 20:47:55 +0000 Received: by kubenode522.mail-prod1.omega.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID bdcfd2a12fdecbdc528b5dcb7da8f4fb; Thu, 22 Apr 2021 20:47:52 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> Date: Thu, 22 Apr 2021 13:47:51 -0700 Cc: Gleb Popov , freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> To: Konstantin Belousov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FR8dB27JVz4mkG X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.66.146:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.66.146:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.66.146:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.66.146:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 20:47:59 -0000 On 2021-Apr-22, at 13:33, Mark Millard wrote: > On 2021-Apr-22, at 12:34, Konstantin Belousov = wrote: >=20 >> On Thu, Apr 22, 2021 at 09:49:15PM +0300, Gleb Popov wrote: >>> On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov = >>> wrote: >>>=20 >>>> There is no peer for listening socket. >>>>=20 >>>> Show minimal code that works for you on Linux. >>>>=20 >>>=20 >>> Here you go: http://arrowd.name/un_linux.cpp >>> It is almost identical to FreeBSD one, but works for me on = ArchLinux. >>=20 >> Of course it works because it uses s2, that is, connected and not = listening >> socket, for getsockopt(), same as the working FreeBSD version. >=20 > I made a variant that tries s2 and then s, printing the > peercred uid, group id, and pid fields, and built it on > Fedora 34. The result was: >=20 > # ./a.out & ncat -U foobar > [1] 18646 > s2 data is uid field: 0 groups[0] field: 0 pid field: 18647 > s data is uid field: 0 groups[0] field: 0 pid field: 18646 > [1]+ Done ./a.out As a cross check, I also tried building and running on ubuntu 2021.04 (so debian basead, vs. red hat based before): # ./a.out & nc -U foobar [1] 39348 s2 data is uid field: 0 groups[0] field: 0 pid field: 39349 s data is uid field: 0 groups[0] field: 0 pid field: 39348 [1]+ Done ./a.out So two major branches of Linux based systems seem to agree for the issue. I do not have any other variants around to quickly check. The tests were all on aarch64, by the way. > On FreeBSD: >=20 > # ./a.out & nc -U foobar > s2 data is uid field: 0 groups[0] field: 0 pid field: 6984 > getsockopt for s > failed with > Socket is not connected > [1] Done ./a.out >=20 > The code is: >=20 > #ifndef __FreeBSD__ > #define _GNU_SOURCE > #endif >=20 > #include > #include > #include > #include > #include >=20 > #include >=20 > #ifdef __FreeBSD__ > #define FOR_PEERCRED 0 > #define CR_GROUP_ID cr_groups[0] > #else // Linux > #define xucred ucred > #define FOR_PEERCRED SOL_SOCKET > #define LOCAL_PEERCRED SO_PEERCRED > #define cr_uid uid > #define CR_GROUP_ID gid > #define cr_pid pid > #endif >=20 > #include > #include > #ifdef __FreeBSD__ > #include > #endif > #include > #include >=20 >=20 > void failure(char const * err) > { > puts(err); > puts("failed with"); > puts(strerror(errno)); > } >=20 > void die(char const * err) > { > failure(err); > unlink("foobar"); > exit(1); > } >=20 > int main() > { > int s =3D socket(PF_LOCAL, SOCK_STREAM, 0); > if(s < 0) die("socket"); >=20 > struct sockaddr_un addrunix; > memset(&addrunix, 0, sizeof(addrunix)); > addrunix.sun_family =3D AF_UNIX; > memcpy(addrunix.sun_path, "foobar", 6); >=20 > int r =3D bind(s, (const struct sockaddr *)&addrunix, sizeof(struct = sockaddr_un)); > if(r < 0) die("bind"); >=20 > listen(s, 64); >=20 > int s2; > do > { > s2 =3D accept4(s, 0, 0, 0); > } while (s2 < 0 && errno =3D=3D EAGAIN); > if(s2 < 0) die("accept4"); >=20 > struct xucred s2_creds; > socklen_t s2_credSize =3D sizeof(struct xucred); > r =3D getsockopt(s2, FOR_PEERCRED, LOCAL_PEERCRED, &s2_creds, = &s2_credSize); > if(r < 0) failure("getsockopt for s2"); > else > printf("s2 data is uid field: %jd groups[0] field: %jd pid = field: %jd\n", > (uintmax_t) s2_creds.cr_uid, (uintmax_t) = s2_creds.CR_GROUP_ID, (uintmax_t) s2_creds.cr_pid); >=20 > struct xucred s_creds; > socklen_t s_credSize =3D sizeof(struct xucred); > r =3D getsockopt(s, FOR_PEERCRED, LOCAL_PEERCRED, &s_creds, = &s_credSize); > if(r < 0) failure("getsockopt for s"); > else > printf("s data is uid field: %jd groups[0] field: %jd pid = field: %jd\n", > (uintmax_t) s_creds.cr_uid, (uintmax_t) s_creds.CR_GROUP_ID, = (uintmax_t) s_creds.cr_pid); >=20 > unlink("foobar"); > return 0; > } >=20 >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Thu Apr 22 20:59:35 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A9765FE997 for ; Thu, 22 Apr 2021 20:59:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-55.consmr.mail.gq1.yahoo.com (sonic308-55.consmr.mail.gq1.yahoo.com [98.137.68.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FR8tZ44DDz4nMl for ; Thu, 22 Apr 2021 20:59:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619125172; bh=e0mwm4hxMVB4gKHq8jLyQrteycSnjaHq9eLrPx5DGxL=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=hJDp2akTn1TrThXLGLHuAMyBdbs+ExPV5trwjhEggBogx+kU7QRYyoWuT7rti3MUUDWAVzWfmheSSGehoEiOh/4LyCgB045LVNVMm2MoyKiGPfIUfV9eJ0LstHuJZem5NpeWKY44/pT3/fZvOrMQw9XiO68iXaKllPkFcyUju/IzCXGgNU45oH7xndg7ZPNrUvlpjiXW0kxlz1u5WxQGmycx3tkaWsEoId95V+twhFUFn7lbE8ZLWA5At1smRbWRHFeoZdXgO+E2wxXLNBCtDmrKxiAIGGqKAa3fEY/HVrDk+KHpepzW6fIdH9mQmMNIfQJovRWqzwhqh9WWabSgHg== X-YMail-OSG: wP6vSAcVM1mJeQu_u.U23_2bilzt_Hu0ucs.ZfzRRtioA1MVRT6BmKu2TZBFcvb mnA7zFCOd_GQONKY_uAsJZ_PC4Im8widKuBGIwvadnsiAVCvJ.he8lgyRoaNembWv99CZ9uUcEne Ty0P9dEMefn.BEW6tn9CguyDNyUpqLd3GNK1Zqh3i9bvjjVBp6l26CVL_RUjrtiKfa0DqU0s0akM WUWSoPWtQDZgGyTlCrF0VbaGAnIazRfdY1o40MzpHHY5xzK1kwPtw7X13JOeobarJ3y.1LhvNTrU T3z8rlpptzzToPA9GcpoEly1tDI9GnPgDYvAnUat1O3DUlKSjAEGXPN0yLPODnztuKRfUfCPe7TX nZXC4r2z1.m0jY9bHzGiyleedGT_D4eiApENqz5EBLAu1oUTD1YzY9IQzInZSw7xC_BrseSBGVvy zBv08cc6vMjPBcEOjI2jpXn3nIDv73UIU2Rp9In8LzU9A0ocY8zLapOChI_LUN0HVBm5OfD1DMOU A.dlXmXEXl06AyjhXb0yV6VX..RDuLR0qZKuoCKTYac4ZixRdPmhGR7PG2dQG5GKvbjDo1jKLzKu szVRUeWU8muEBniX6VaE61om31lCCV82jMhKY78hx3SxoHqgvRXRO_FXKPlHIpv5lZdBfuIqa7dX ZOH2ktcbWRmOjzRgrnkAqfvEhtPZqIuXJOeAt_vu3YH.9gD0pN6Nm4ChkAS8U0qRG5pANszng.xv 5sE_DIg3Dlf9JD8HG.SOI80NglYo8P11wKQ9H.jOJcjuROHwEyB8uYnkca99NhDkwgN9kzrlV7YN 4FOjEl05A4YOrNvij7lfVJQXrEYUT.2QPOODk4jOaYYY8qVDEak9Z3ffsjzJfNywDKKnW.SZgKrK 9O7dkXvpxTu8uHfdZnAR97azWYwg4jdkR.z53xXUUSWMwa7ejfHzFXHFijxwdBJ7X9gNlnPRgyp2 62meGLr27f1FrGrscunWr9dx1Tx_NpNDegVt.DK7hDuAGl0i74pct_YR5Mr0BESAwSSgirX7mv5t ekPWyHxtrGwiaY6iiomt9NGeGEPvM.tpvymNTyw1NOXGOo6Dnkp_Fz5IFu81DnV.ph91kNu23CZ2 MqOWIaI1DUSgDpY_e7mhzFIKWlptshfvIm.JcRrUQXDFxI_9OwSZhaoO4sb16ooquWZOCnkgnLtR 2HMeaNeATxwvDjIYYqRlyjfQHtE2mcOWrG13_WOtwtWMxrtK.Ivfk6gAjcPFeJNAy3S.RaiJhmch NO46hz2Cw.LtTm.69Fc697fmPZ275euDcYRs2oQsVKQfMv1Kixzi9jJVjIu21j.bg4OLPC4SUAnc qOxjpxIT_3OCIAS3gu7VtKraUNzgMN9Gc3EgMZqjP2D.m4sgFzfafm2H2ZCIC7W73hjnY2ibiIE1 oDUr14ZS.JHXr_s2GnLR2YxWhUPUfzcRwNmCrneH_tefpBPqxV.BX.Vor193KbWoDkjHN4N.J2uS BlT_xav5YackZss8JpbONrWVvIw0vxPITnylEDNW8swynBbqWOr85E1pS6HELOJEekXalh30f1Ql 1.pEJx0GN8LPqsA00OE6P1bJgikrwrqXrtNi2uaHGWIXBQ6p9mG.CaPPG0LGWwVv2vUIapGOX3GU ED83dtp4LmptMZlpmza43s9yapYpNlVCQ2aOrLaSQlvdJzmjk9p47fpKffwtlJ_pLzeAdH.E0PVX TOSSnxqoPVeb4Wa4DU2aIMkLqh3gPfBR5ByRgL2npbbhcmIM7gifGkhEMJN1IDT2ote0wcqZm_X4 rWUvY.5v_GJUxqBeglAZcXbd.mf0Q9HWS8.mdfrCMOreIxiILNQ3b2dOQy4fOJVFbh6EnRcTLPG5 u17bPudmlPfPebFdYEjhmIIknHVoSG58Cjgvw9hNtGlrHoi2ml14Qa1RAYl1tt3OZ2_8XuKDkFD. 3CuobqNz2Lk9D9j0sz8HvUim_k4SJU7LYVEhtrKtX9Y3X9U9Ae2M.0z7xaPLq.ub4DuMJ00T1mMe 2do094LOJ9bUD9jpqJ_O114B.dORwAoVfn8AcHq4NpC1B7eamPIurpEVz732q3unZ7lDt2CwW9F. gzbvFG6A7jPCK7kfltY654WtxqVLTgR3gQt6pIElOQay3C.UD3WDd.bC5Yf8fZNPGZdLD7wTp59a AoRwsODUeswLEw9C5BgrI8WpphyW6AWmpbgGxeJNOztdPcbHhDCrUxQ_bKETP8fyfUKdgo9lLM3b J5Ua1uRrSNcxEyEm4iCu7e6aAPcia51o54EcDPg9BQ60K0nFwY07iBLz2nlg7VKlEvvpz85CFugO aRCSJUP13lY1u2xnOrzJwTC.4piB7jcuA1nOCKNP6Td3GnMxpFJILZm9v_Kmo_dStWafsrWBPkXM x2jabBCUQ1QSe.IfTBMkpNBKSXD5bZhGnF9jUv0AnLsWHrUPsQsG1T2ePY9C_8csZYypKmMboRhj TpXZHeQuOUVXx46Gx7xX8zFFy597FsmR50UwfUpGhPFLvLIAohlNWvIBeAXia0F90QSsQjZ2G28k vJxOKtqHSd0sEhro48w-- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Thu, 22 Apr 2021 20:59:32 +0000 Received: by kubenode527.mail-prod1.omega.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID ff0d841a0d78e877dc74f6a3ef71f8f6; Thu, 22 Apr 2021 20:59:30 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> Date: Thu, 22 Apr 2021 13:59:29 -0700 Cc: freebsd-hackers Content-Transfer-Encoding: quoted-printable Message-Id: References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> To: Gleb Popov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FR8tZ44DDz4nMl X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.68.31:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.68.31:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.31:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.31:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 20:59:35 -0000 [This is not about what Konstantin was asking about, but about other details. Avoiding the irrelevant material in the TO/CC.] On 2021-Apr-22, at 13:47, Mark Millard wrote: > On 2021-Apr-22, at 13:33, Mark Millard wrote: >=20 >> On 2021-Apr-22, at 12:34, Konstantin Belousov = wrote: >>=20 >>> On Thu, Apr 22, 2021 at 09:49:15PM +0300, Gleb Popov wrote: >>>> On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov = >>>> wrote: >>>>=20 >>>>> There is no peer for listening socket. >>>>>=20 >>>>> Show minimal code that works for you on Linux. >>>>>=20 >>>>=20 >>>> Here you go: http://arrowd.name/un_linux.cpp >>>> It is almost identical to FreeBSD one, but works for me on = ArchLinux. >>>=20 >>> Of course it works because it uses s2, that is, connected and not = listening >>> socket, for getsockopt(), same as the working FreeBSD version. >>=20 >> I made a variant that tries s2 and then s, printing the >> peercred uid, group id, and pid fields, and built it on >> Fedora 34. The result was: >>=20 >> # ./a.out & ncat -U foobar >> [1] 18646 >> s2 data is uid field: 0 groups[0] field: 0 pid field: 18647 >> s data is uid field: 0 groups[0] field: 0 pid field: 18646 >> [1]+ Done ./a.out >=20 So s2 gets the pid of the ncat and s gets the pid of a.out. Is that what you expected? > As a cross check, I also tried building and running on > ubuntu 2021.04 (so debian basead, vs. red hat based before): >=20 > # ./a.out & nc -U foobar > [1] 39348 > s2 data is uid field: 0 groups[0] field: 0 pid field: 39349 > s data is uid field: 0 groups[0] field: 0 pid field: 39348 > [1]+ Done ./a.out So s2 gets the pid of the nc and s gets the pid of a.out. Same question applies. > So two major branches of Linux based systems seem to > agree for the issue. >=20 > I do not have any other variants around to quickly check. > The tests were all on aarch64, by the way. >=20 >> On FreeBSD: >>=20 >> # ./a.out & nc -U foobar >> s2 data is uid field: 0 groups[0] field: 0 pid field: 6984 >> getsockopt for s >> failed with >> Socket is not connected >> [1] Done ./a.out Were you expecting s2 to get the pid of nc and s to get the pid of a.out under FreeBSD as well? Would that be getting what you want? >> The code is: >>=20 >> #ifndef __FreeBSD__ >> #define _GNU_SOURCE >> #endif >>=20 >> #include >> #include >> #include >> #include >> #include >>=20 >> #include >>=20 >> #ifdef __FreeBSD__ >> #define FOR_PEERCRED 0 >> #define CR_GROUP_ID cr_groups[0] >> #else // Linux >> #define xucred ucred >> #define FOR_PEERCRED SOL_SOCKET >> #define LOCAL_PEERCRED SO_PEERCRED >> #define cr_uid uid >> #define CR_GROUP_ID gid >> #define cr_pid pid >> #endif >>=20 >> #include >> #include >> #ifdef __FreeBSD__ >> #include >> #endif >> #include >> #include >>=20 >>=20 >> void failure(char const * err) >> { >> puts(err); >> puts("failed with"); >> puts(strerror(errno)); >> } >>=20 >> void die(char const * err) >> { >> failure(err); >> unlink("foobar"); >> exit(1); >> } >>=20 >> int main() >> { >> int s =3D socket(PF_LOCAL, SOCK_STREAM, 0); >> if(s < 0) die("socket"); >>=20 >> struct sockaddr_un addrunix; >> memset(&addrunix, 0, sizeof(addrunix)); >> addrunix.sun_family =3D AF_UNIX; >> memcpy(addrunix.sun_path, "foobar", 6); >>=20 >> int r =3D bind(s, (const struct sockaddr *)&addrunix, sizeof(struct = sockaddr_un)); >> if(r < 0) die("bind"); >>=20 >> listen(s, 64); >>=20 >> int s2; >> do >> { >> s2 =3D accept4(s, 0, 0, 0); >> } while (s2 < 0 && errno =3D=3D EAGAIN); >> if(s2 < 0) die("accept4"); >>=20 >> struct xucred s2_creds; >> socklen_t s2_credSize =3D sizeof(struct xucred); >> r =3D getsockopt(s2, FOR_PEERCRED, LOCAL_PEERCRED, &s2_creds, = &s2_credSize); >> if(r < 0) failure("getsockopt for s2"); >> else >> printf("s2 data is uid field: %jd groups[0] field: %jd pid = field: %jd\n", >> (uintmax_t) s2_creds.cr_uid, (uintmax_t) = s2_creds.CR_GROUP_ID, (uintmax_t) s2_creds.cr_pid); >>=20 >> struct xucred s_creds; >> socklen_t s_credSize =3D sizeof(struct xucred); >> r =3D getsockopt(s, FOR_PEERCRED, LOCAL_PEERCRED, &s_creds, = &s_credSize); >> if(r < 0) failure("getsockopt for s"); >> else >> printf("s data is uid field: %jd groups[0] field: %jd pid = field: %jd\n", >> (uintmax_t) s_creds.cr_uid, (uintmax_t) s_creds.CR_GROUP_ID, = (uintmax_t) s_creds.cr_pid); >>=20 >> unlink("foobar"); >> return 0; >> } >>=20 >>=20 >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Fri Apr 23 08:31:46 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 25B0E5E8974 for ; Fri, 23 Apr 2021 08:31:46 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FRSFF1VnZz3sp2 for ; Fri, 23 Apr 2021 08:31:44 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f50.google.com with SMTP id 4so16439399lfp.11 for ; Fri, 23 Apr 2021 01:31:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NigyaY/jdbK3dAeSl6HR9QBhrK5RRkTDnnt1gb9P26Y=; b=ZEGMu95tncgUEXb/gMCEBFGTRLEY6XCMyC/2w6tWQbxZry8jtfhlgHdmR38W1ivdlB e1E89yeQkOe7LKrGleTddGNCWql/lYsOdFaqizINQ5zbxoUnoEOpn3LKGJfki/ROJS/Q xHNcuuO+1eNCskSed1ASL+I9L09vMY7J/GpQtLht44z2n6bWpGEF2Ihi5eKN88QzR1MG cx2Ih3dxRkFvXrCH2cqScdkq6OUHjr3etn78Oq2wLOPXkFPGubqJnji7sJmwXcoTVbtZ ykwD48kqSOv+lvuv76VggK7l8C04zMxpbHZTr3OmyCjlV5m/U6k6ZWgoTJ1LOCS12Sh2 qn+g== X-Gm-Message-State: AOAM5303ejPMBNM7s9uwQP6ThI+8nM0WqdtHqfAozgapAlLTbT7nl2li BolE+a3p79MwtXxWsuSPpv7oESDwM6sMBg== X-Google-Smtp-Source: ABdhPJwY9QvsJ3UikaTSUoGCSCvd//93b0HZGoqbpW9jWiJ8qm3T2Xcqk3ATIdjTrCL6FCfMKe8EKw== X-Received: by 2002:a19:34f:: with SMTP id 76mr1947835lfd.246.1619166703232; Fri, 23 Apr 2021 01:31:43 -0700 (PDT) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com. [209.85.167.51]) by smtp.gmail.com with ESMTPSA id a5sm484914lff.231.2021.04.23.01.31.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Apr 2021 01:31:42 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id x19so45930627lfa.2 for ; Fri, 23 Apr 2021 01:31:42 -0700 (PDT) X-Received: by 2002:a05:6512:1085:: with SMTP id j5mr2105987lfg.532.1619166702736; Fri, 23 Apr 2021 01:31:42 -0700 (PDT) MIME-Version: 1.0 References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> In-Reply-To: From: Gleb Popov Date: Fri, 23 Apr 2021 11:31:17 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? To: Konstantin Belousov Cc: freebsd-hackers X-Rspamd-Queue-Id: 4FRSFF1VnZz3sp2 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.50 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.50:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; R_DKIM_NA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.50:from:127.0.2.255]; SUBJECT_ENDS_QUESTION(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.50:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.50:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2021 08:31:46 -0000 On Thu, Apr 22, 2021 at 10:34 PM Konstantin Belousov wrote: > On Thu, Apr 22, 2021 at 09:49:15PM +0300, Gleb Popov wrote: > > On Thu, Apr 22, 2021 at 1:33 PM Konstantin Belousov > > > wrote: > > > > > There is no peer for listening socket. > > > > > > Show minimal code that works for you on Linux. > > > > > > > Here you go: http://arrowd.name/un_linux.cpp > > It is almost identical to FreeBSD one, but works for me on ArchLinux. > > Of course it works because it uses s2, that is, connected and not listening > socket, for getsockopt(), same as the working FreeBSD version. > Ugh, uploaded wrong version, sorry. I changed it back to "s" and it still works. From owner-freebsd-hackers@freebsd.org Fri Apr 23 08:41:47 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 018565E9498 for ; Fri, 23 Apr 2021 08:41:47 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (mail.bsd4all.org [88.99.169.216]) by mx1.freebsd.org (Postfix) with ESMTP id 4FRSSn5ccVz3t37; Fri, 23 Apr 2021 08:41:45 +0000 (UTC) (envelope-from pblok@bsd4all.org) Received: from mail.bsd4all.org (localhost [127.0.0.1]) by mail.bsd4all.org (Postfix) with ESMTP id AA2904C1C; Fri, 23 Apr 2021 10:41:41 +0200 (CEST) X-Virus-Scanned: amavisd-new at bsd4all.org Received: from mail.bsd4all.org ([127.0.0.1]) by mail.bsd4all.org (mail.bsd4all.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PphOBMXYcbj1; Fri, 23 Apr 2021 10:41:40 +0200 (CEST) Received: from mpro.bsd4all.local (pony_ip [82.101.198.11]) by mail.bsd4all.org (Postfix) with ESMTPSA id 158164BD5; Fri, 23 Apr 2021 10:41:39 +0200 (CEST) From: Peter Blok Message-Id: <5735CD11-0688-4C25-AE32-2D29ECA4ABD8@bsd4all.org> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: 32-bit jail on 64-bit host Date: Fri, 23 Apr 2021 10:41:36 +0200 In-Reply-To: Cc: Ian Lepore , Daniel Dettlaff , freebsd-hackers@freebsd.org To: Chris References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Rspamd-Queue-Id: 4FRSSn5ccVz3t37 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of pblok@bsd4all.org designates 88.99.169.216 as permitted sender) smtp.mailfrom=pblok@bsd4all.org X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[88.99.169.216:from]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bsd4all.org]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[88.99.169.216:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; FREEMAIL_CC(0.00)[freebsd.org,me.com]; MAILMAN_DEST(0.00)[freebsd-hackers]; RECEIVED_SPAMHAUS_PBL(0.00)[82.101.198.11:received] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2021 08:41:47 -0000 Chris, that was the right hint. I copied host /rescue/route to the jail in /amd64. Changed the = dhclient-script to use /amd64/route and it worked. Using dynamic linked version failed with /libexec/ld-elf.so.1. Peter > On 22 Apr 2021, at 21:27, Chris wrote: >=20 > On 2021-04-22 11:13, Peter Blok wrote: >> I tried to replace some of the 32-bit binaries before, but it started = to require >> shared libs as well, so I stopped. I=E2=80=99ll give it a shot later. > I'm not sure which binaries you might need either. But could /rescue = bring you > any closer? >=20 > --Chris >> I now run it with out vnet and it indeed works. I have managed to = compile >> p5-DBD-Oracle which works now. >> Because all of my other jails were vnet jails, I didn=E2=80=99t think = about doing it the >> old way without vnet. >> Peter >>> On 22 Apr 2021, at 15:39, Ian Lepore wrote: >>> On Thu, 2021-04-22 at 12:32 +0200, Daniel Dettlaff via = freebsd-hackers >>> wrote: >>>> If you need to run 32bit software with 64bit base system just try >>>> creating 64bit jail with lib32 subsystem present. Then 32bit = software >>>> should be able to run properly in such jail, but you can't run = 32bit >>>> jail on 64bit base as Eugene said. >>> That is not what Eugene said, and you CAN run a 32-bit jail on a = 64-bit >>> host; I do so on this machine. As Eugene said, you simply need to = copy >>> a few selected 64-bit binaries into the jail, replacing the 32-bit >>> version of those programs. That is, install the jail from a 32-bit >>> build or packages, and then just copy the necessary few binaries = from >>> your host root filesystem into the jail. >>> It would be nice if there was a list somewhere of which binaries = need >>> to be replaced. I just did it by trial and error... when I ran into >>> things that didn't work, I tried using a 64-bit copy of that program >>> and if it worked: problem solved. >>> -- Ian >>>>> On 22 Apr 2021, at 10:36, Peter Blok wrote: >>>>> Hi, >>>>> I have created a 32-bit jail on a 64-bit running 12-STABLE. The >>>>> jail is also build using the same source. >>>>> The jail gives me a 32-bit environment. I=E2=80=99m getting an IP = address >>>>> and I can ping others on the same network segment. >>>>> But I can=E2=80=99t set a default route. >>>>> route add default 192.168.1.1 >>>>> route: writing to routing socket: Invalid argument >>>>> add net default: gateway 192.168.1.1 fib 0: Invalid argument >>>>> # netstat -rn >>>>> Routing tables >>>>> (0) (0) UH >>>>> (0) (0) U >>>>> (0) (0) UHS >>>>> (0) (0) UH >>>>> (0) (0) U >>>>> (0) (0) UHS >>>>> # ifconfig -a >>>>> lo0: flags=3D8049 metric 0 mtu = 16384 >>>>> options=3D680003 >>>>> inet6 ::1 prefixlen 128 >>>>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 >>>>> inet 127.0.0.1 netmask 0xff000000 >>>>> groups: lo >>>>> nd6 options=3D21 >>>>> e0b_websip: flags=3D8843 >>>>> metric 0 mtu 1500 >>>>> options=3D8 >>>>> ether 0e:88:d7:20:99:80 >>>>> hwaddr 02:80:ad:6e:79:0b >>>>> inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 >>>>> groups: epair >>>>> media: Ethernet 10Gbase-T (10Gbase-T ) >>>>> status: active >>>>> nd6 options=3D29 >>>>> Any idea how to fix this? >>>>> I=E2=80=99m using vnet bridge >>>>> Peter >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org = mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers = > To unsubscribe, send any mail to = "freebsd-hackers-unsubscribe@freebsd.org = " From owner-freebsd-hackers@freebsd.org Fri Apr 23 08:47:10 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 580545E979A for ; Fri, 23 Apr 2021 08:47:10 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FRSZx58LGz3tH7 for ; Fri, 23 Apr 2021 08:47:05 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lf1-f49.google.com with SMTP id d27so19523590lfv.9 for ; Fri, 23 Apr 2021 01:47:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zKCvJyBBJ1UVjyB0owpYkOts0Qv/ThhRB4upn0gv97E=; b=qBh7622Xz/PlGJrTGdd9Ln0FsLiZWGs0sfx5FtNKpIJ+TXRIyB6lE1xjiv4LIZqFmK 4UX6EcBjeQFTtceoChQwcrXmGidhk7SpeM3sRk0lFLbaHm+/Ro/194Ue5nswH/J7aUel yqbHCzmvschffBDR43lUxmYDYoByRSWqCpqjiWCposf6Vau1pQPGgYI1xFHBYVf5lgf/ sW0CKjTx729cUAKltTE3mPObjSRLp+BfpZaadV7xKgONJpvl+IiD2gQHsCZUZjKLjEG1 A0fnCNYw+E9Gq6xsyGkqmNJh2ORUxdGB2ZRnTh0OizGiKHCs6UJ5Fcb6R6FrfuOoyBjI 2tZA== X-Gm-Message-State: AOAM532igTCbzGDYlcDPN6YBmAxnnURn7Jr8CZTNKpleAhEdZoNASNDY C2cgOjh3iAWfFTtlNQCrjJSS7J5cCh/csg== X-Google-Smtp-Source: ABdhPJwp7ojg3WtKXosIUc+qZlAulzztC8LQiBuxORtiKgd/PNWaLaL0FdsVufDmN9NGuB0CT1OpdA== X-Received: by 2002:ac2:511a:: with SMTP id q26mr1954804lfb.399.1619167622137; Fri, 23 Apr 2021 01:47:02 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id w1sm487391lfq.53.2021.04.23.01.47.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Apr 2021 01:47:01 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id q22so13916638lfu.8 for ; Fri, 23 Apr 2021 01:47:01 -0700 (PDT) X-Received: by 2002:a05:6512:139e:: with SMTP id p30mr1985095lfa.489.1619167621014; Fri, 23 Apr 2021 01:47:01 -0700 (PDT) MIME-Version: 1.0 References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> In-Reply-To: From: Gleb Popov Date: Fri, 23 Apr 2021 11:46:33 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? To: Mark Millard Cc: freebsd-hackers X-Rspamd-Queue-Id: 4FRSZx58LGz3tH7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.167.49 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[yahoo.com]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.167.49:from]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[209.85.167.49:from:127.0.2.255]; SUBJECT_ENDS_QUESTION(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.49:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.49:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2021 08:47:10 -0000 On Thu, Apr 22, 2021 at 11:59 PM Mark Millard wrote: > So s2 gets the pid of the ncat and s gets the pid of a.out. > > Is that what you expected? > <...> > So s2 gets the pid of the nc and s gets the pid of a.out. > > Same question applies. > <...> > Were you expecting s2 to get the pid of nc and > s to get the pid of a.out under FreeBSD as well? > Would that be getting what you want? > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > Most probably, yes. I'm not 100% as I'm still trying to reach authors of https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L811 and ask them what this code does. On one hand, [1] hints that creds for the listening socket should indeed match the user that started the program. On the other hand, log message at [2] looks like they think that creds contain credentials of the connected user. Like, the authors also mistaken the listening socket with an accepted one. I'm confused by this and keep asking on Collabora IRC and forums, but didn't get an answer yet. [1]: https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L833 [2]: https://github.com/CollaboraOnline/online/blob/master/net/Socket.cpp#L844 From owner-freebsd-hackers@freebsd.org Fri Apr 23 10:00:20 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C23B45EBB7A for ; Fri, 23 Apr 2021 10:00:20 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FRVCS0MMBz4SCQ for ; Fri, 23 Apr 2021 10:00:19 +0000 (UTC) (envelope-from 6yearold@gmail.com) Received: by mail-lj1-f173.google.com with SMTP id a25so41809486ljm.11 for ; Fri, 23 Apr 2021 03:00:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=I+51P9R1/nOpP5+WEejHK43Qc9XMIawV0u0iS792nm8=; b=kVtU+yOzYUlVRC0sZtpwa9qxENPfClHA+qQ9Xs+jsIL+Sf/exy+NFKHuz7y19fCEmc sRlazxRpfWOlVUVyoDMIwoBON8iDQrnJdd3RZB4gX1h1Oh/+LRyf1HqroXQO3tP/+pqR uLtScLve+jugKJFeB751jJo+AOxOCvrY4kB1MpRHqsmlgGBtag8xA6O4rEFJtkaFuNjp FFTfbGKVx9nT3e7NxKc1C6Qc9bemggMhqxhccQFZAPYOFQe+49QVdLjR+vXO/NHGshnx uriFhXizvppfP1opLUMiSL8e9QuI7WWUjtuyUVU48JdL3QlYBzqG45wJybtViDJ27TPn ln/g== X-Gm-Message-State: AOAM531Rv+Qmg8u6vO45eLSTVFm15u6JmR/XaKoRbndzw5kiQSVZ0ki9 UvOU3gu8oCC6SpCiJ5GMGrSgWlRRY1WhWw== X-Google-Smtp-Source: ABdhPJwQTvgxnQ1QM2D6JYMB/2v6A7SmXSnUwhVOeia9mNoV0To9PSJUcec2ooZ9Yx0dMroir+8ehg== X-Received: by 2002:a05:651c:222:: with SMTP id z2mr2229168ljn.109.1619172017963; Fri, 23 Apr 2021 03:00:17 -0700 (PDT) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com. [209.85.167.42]) by smtp.gmail.com with ESMTPSA id z22sm517477lfu.200.2021.04.23.03.00.17 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Apr 2021 03:00:17 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id t14so19525480lfe.1 for ; Fri, 23 Apr 2021 03:00:17 -0700 (PDT) X-Received: by 2002:a05:6512:1085:: with SMTP id j5mr2370502lfg.532.1619172016907; Fri, 23 Apr 2021 03:00:16 -0700 (PDT) MIME-Version: 1.0 References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> In-Reply-To: From: Gleb Popov Date: Fri, 23 Apr 2021 12:59:52 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? To: freebsd-hackers X-Rspamd-Queue-Id: 4FRVCS0MMBz4SCQ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of 6yearold@gmail.com designates 209.85.208.173 as permitted sender) smtp.mailfrom=6yearold@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[arrowd@freebsd.org,6yearold@gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_NEQ_ENVFROM(0.00)[arrowd@freebsd.org,6yearold@gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TO_DOM_EQ_FROM_DOM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.208.173:from]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[209.85.208.173:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.173:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.173:from]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2021 10:00:20 -0000 All right, I got an answer from Collabora and they confirmed that it is a bug on their side. They indeed wanted to check creds on the accepted socket, not the listening one. So, unless I am missing something, I think it is good to have FreeBSD error out in this case. From owner-freebsd-hackers@freebsd.org Sat Apr 24 01:50:14 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D50065E856B for ; Sat, 24 Apr 2021 01:50:14 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from udns.ultimatedns.net (static-24-113-41-81.wavecable.com [24.113.41.81]) (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 "ultimatedns.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FRvHV3YN4z3qNy; Sat, 24 Apr 2021 01:50:13 +0000 (UTC) (envelope-from bsd-lists@bsdforge.com) Received: from ultimatedns.net (localhost [127.0.0.1]) by udns.ultimatedns.net (8.16.1/8.16.1) with ESMTP id 13O1oAs7097369; Fri, 23 Apr 2021 18:50:16 -0700 (PDT) (envelope-from bsd-lists@bsdforge.com) MIME-Version: 1.0 Date: Fri, 23 Apr 2021 18:50:10 -0700 From: Chris To: Peter Blok Cc: Ian Lepore , Daniel Dettlaff , freebsd-hackers@freebsd.org Subject: Re: 32-bit jail on 64-bit host In-Reply-To: <5735CD11-0688-4C25-AE32-2D29ECA4ABD8@bsd4all.org> References: <06CAF4FA-CBC1-4F89-9CA9-532A6B370E51@me.com> <5735CD11-0688-4C25-AE32-2D29ECA4ABD8@bsd4all.org> User-Agent: UDNSMS/17.0 Message-ID: X-Sender: bsd-lists@bsdforge.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4FRvHV3YN4z3qNy X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:11404, ipnet:24.113.0.0/16, country:US]; local_wl_ip(0.00)[24.113.41.81] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2021 01:50:14 -0000 On 2021-04-23 01:41, Peter Blok wrote: > Chris, that was the right hint. > > I copied host /rescue/route to the jail in /amd64. Changed the > dhclient-script to > use /amd64/route and it worked. > > Using dynamic linked version failed with /libexec/ld-elf.so.1. Heh. Not surprising. :-) If it were me. I'd probably put /rescue at the beginning of my $PATH. Go a long way to eliminating potential stress. ;-) --Chris > > Peter > > >> On 22 Apr 2021, at 21:27, Chris wrote: >> >> On 2021-04-22 11:13, Peter Blok wrote: >>> I tried to replace some of the 32-bit binaries before, but it started to >>> require >>> shared libs as well, so I stopped. I’ll give it a shot later. >> I'm not sure which binaries you might need either. But could /rescue bring >> you >> any closer? >> >> --Chris >>> I now run it with out vnet and it indeed works. I have managed to compile >>> p5-DBD-Oracle which works now. >>> Because all of my other jails were vnet jails, I didn’t think about doing >>> it the >>> old way without vnet. >>> Peter >>>> On 22 Apr 2021, at 15:39, Ian Lepore wrote: >>>> On Thu, 2021-04-22 at 12:32 +0200, Daniel Dettlaff via freebsd-hackers >>>> wrote: >>>>> If you need to run 32bit software with 64bit base system just try >>>>> creating 64bit jail with lib32 subsystem present. Then 32bit software >>>>> should be able to run properly in such jail, but you can't run 32bit >>>>> jail on 64bit base as Eugene said. >>>> That is not what Eugene said, and you CAN run a 32-bit jail on a 64-bit >>>> host; I do so on this machine. As Eugene said, you simply need to copy >>>> a few selected 64-bit binaries into the jail, replacing the 32-bit >>>> version of those programs. That is, install the jail from a 32-bit >>>> build or packages, and then just copy the necessary few binaries from >>>> your host root filesystem into the jail. >>>> It would be nice if there was a list somewhere of which binaries need >>>> to be replaced. I just did it by trial and error... when I ran into >>>> things that didn't work, I tried using a 64-bit copy of that program >>>> and if it worked: problem solved. >>>> -- Ian >>>>>> On 22 Apr 2021, at 10:36, Peter Blok wrote: >>>>>> Hi, >>>>>> I have created a 32-bit jail on a 64-bit running 12-STABLE. The >>>>>> jail is also build using the same source. >>>>>> The jail gives me a 32-bit environment. I’m getting an IP address >>>>>> and I can ping others on the same network segment. >>>>>> But I can’t set a default route. >>>>>> route add default 192.168.1.1 >>>>>> route: writing to routing socket: Invalid argument >>>>>> add net default: gateway 192.168.1.1 fib 0: Invalid argument >>>>>> # netstat -rn >>>>>> Routing tables >>>>>> (0) (0) UH >>>>>> (0) (0) U >>>>>> (0) (0) UHS >>>>>> (0) (0) UH >>>>>> (0) (0) U >>>>>> (0) (0) UHS >>>>>> # ifconfig -a >>>>>> lo0: flags=8049 metric 0 mtu 16384 >>>>>> options=680003 >>>>>> inet6 ::1 prefixlen 128 >>>>>> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 >>>>>> inet 127.0.0.1 netmask 0xff000000 >>>>>> groups: lo >>>>>> nd6 options=21 >>>>>> e0b_websip: flags=8843 >>>>>> metric 0 mtu 1500 >>>>>> options=8 >>>>>> ether 0e:88:d7:20:99:80 >>>>>> hwaddr 02:80:ad:6e:79:0b >>>>>> inet 192.168.1.205 netmask 0xffffff00 broadcast 192.168.1.255 >>>>>> groups: epair >>>>>> media: Ethernet 10Gbase-T (10Gbase-T ) >>>>>> status: active >>>>>> nd6 options=29 >>>>>> Any idea how to fix this? >>>>>> I’m using vnet bridge >>>>>> Peter >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing >> list >> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org >> " > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@freebsd.org Sat Apr 24 02:12:23 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 312B85EB197 for ; Sat, 24 Apr 2021 02:12:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic304-25.consmr.mail.gq1.yahoo.com (sonic304-25.consmr.mail.gq1.yahoo.com [98.137.68.206]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FRvn212Yhz3sMV for ; Sat, 24 Apr 2021 02:12:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1619230340; bh=Kv7VwQns5zfy+HEUX5w4lPnvCbSfXOVA8mvj2ynpcmC=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=SkQJs/5/xcnwRb4Ky7Pnj2BEAdYmiV1Emt+Hwqj4oLBwZToEhxaAyvgA0racr5tEVXWt6iT5pGAkdM/T84AV1QhpZkkdeNxoFmdczzR75E9rzoU5RZ5ic9S9HiS8Te9mJk2Y9ydfkQuC+VCZKqIk8DRRSf0CyhmSA2ZIQUJaTRTyUCnsegP/omXBAZYr0wlER2yq4ljEhQzk9JyRAuQhr8jcjtmKg/eF58gJspmSi/sPMH/tN/Ko1BXcUo4tjo3+1ZLFveU8IKIszN6IGa314BKVuOz3+uKumcuGrrGv6BoYn93QixEqrxlZ8BgaVESSOFHqhTGwkSFXsClcMwcQsw== X-YMail-OSG: BIRyz9kVM1m3YAkK4dUK951AxHrTwQrQts319ItSHmYEA0EcAPaEeXREc3c3bYi al3wYSP.rW3GSkeXIer8lFD2gdElGVW7AcSi8FgS06czatRXD.7fPCLNTv_RfzOsiaVOcNNDk7bQ m7pAqkTapnfLyP.MZkrMzqBKah1XSu6whL3GtbX42meBhhKRbJJKTnF75Eli8q_K6lBg9TXrJ1jo woWSTke2SZGypLqZ_ieppgYO.mHLWz6f88dAsm5olsn0vCxjyAJWYsbAnwF2Yzd.fjEZPBBhbLoR YujU2Egg1GfYNPFocN7gA_tVmPjGNzYcUi6NMYi064xueNQfMr0UUE3BE5sF06lFQDXvVvVezlnp q.qN72T12.hu8GDHAnVkS4_Sv0WYeHSfqNJ5.crFr638bvfioAYsEphs3gbKFpUbQucdJbpqa1BK lhR7MY99DTW3NW7pdJSn6mfC5SOMBHwCrXakiZghO.3b65_XAENCRUTrfAW9dkRXIvf7DhJKGuQw Hdwh_RWD.0IGDWk6JtqoBh_.gJxjtmhuRddUl5aG9i.q8S_G69zUd6JTeuB8hewiMq6Qr7Iv1h9X _5gRdIPSByyTwwIUTgf78W03KxXzwPm0gnezC.uFwn7VBGOtLGymoGtPDL1iEc8U36qvJpj_zX12 wZpZw8IGuvNYIHF598DfGP_3y2SRgqVBOFvY3aaSBckBNRFtAJYFlDHs0mI4lApQT5ho75geTKkW PedWAlt8X7GOErF3d59LOybjZmfzDqNHj3JC4jiEplxTVTeoetlXxyRRWxf1tYerVI.P3UeBSAJy 0Pfpwdesl45zvQjy9E069h3vzUtlcywWU5yfWFuZJpRsr0qvwwBa5_StzPtYxwbtEWqMLrb19i6y hUGq.HgR6RkcwqVYMaKJKhKE5kZXu8e_M1nJSpC.9iUQ.cdKCcErFrcFOe8VXZbooAM6uLN34B4P FFRvnHO5Zu_jvk5StgwxtC.ifc7dVE30DMCobfe9dj.kAXFn.wZF8bAR2E8YDDi2S.fCj2wtfAfJ yyv1.LSoDa3J6aZATb0PmDq675ktF5JuAgmIemCejzNEros9bIG8Tqdch5W3g6q51yTqglJWrLP1 vTh94Zwe8XGcSYXxTAfArctAhBBWeAmqyvVtuCR_72_tnjctLiaW2FLt9lvbvMs8MXvD1hXGMcJ1 BvEd653n8sH34bpUbpDuEjTXd.E.FVWQr4wQrnpNCv4irBWSDGXITpwAS3cmLvX9NLhqkpEU.8jB ew43l2LH1GXNhq07K3SbUG2WR2jh3RusIUAM_fFyCaEMYCCEf8UaMVP0FssMC6uam0KxbK8yExcu bkBFXw_fqE2eg2pWywujSCQqmeHExOKyCkuJajNO1unFIhSSVUcFEk7ZSnRWQysdjKlvvb4..4cA 8.X.HR_MyA1T4dttUQWAExu2tJx9.GIfwtCIzN857fnVzBCyr565y6nvCNbvyYyti4zaxRv8asfl EUVG85hxbu40PJT2RopS0uevnL_ey_7bOPPJNkmYAdMp0eTMIpaAc8MjX2wgKYQTWwtFvMhS.NaH ep9j2fY1QX52_8xEpI0RENbtC49mYILDgGTXWg.ijkY3JEswMDYp0aL.gTJ4jv_.U03RSt0QSkHN N_HYB0UzlWNzY5IbffiL4eftb2EFPV45Ou2bdhkIYPU3Njbvgch69CLF1b9el0Bc8Y53ZtoWQ3rh JGUUhrCG94TqtqVjFCVuAJ8PsX.r3u4TXWwCXgqCxOATrrNZNBSfeT9GRTaZb4qzXDN7sAll95SM 51_o6MuDzOVpUiJqPUzT6GV_j7KFelokb3Vdgt_jl01dn7jKpBimD.ZMBsoZF8xPmS7buTjXvVo6 3uqZJPsjY_kgThgdwJ4FIuUwPV37gthWS2oZfmOy7ujARtfQ19b__mf10G04Y_0UOiNP4EzR.a5U FF.JUed7sxlxQ3RcukqNSz.I8e5kPZul6LnJ7KQtkmRvUH7h_9bPuyGwbW.TgSEg87umPyuhQrRS 6t927GYAnqhSMZqLA4aDbvFYlGI1hqNC5Fb5isS6JwzL1CpuGo_6gIlQ0lsqvtqU5S9st5muyqVt L2E.Vyt_MXccOHdPD6WXvmsOwWYIRUJDSfU1IS8FItUxmM4.yvRZurE2dgIr_qTTeGzh5ERwVq3f _Z.4Y77TTZeKOM86XSXDEv8r7kuU9.ivA19UUh26x6VFSmphopIpEKf0OPDnZ5FjQBiiWF9B0bZH _bsoZPzRiwcaPcI6C1o3X5F.qilmEJnzph_lUYgM1PCVN5IKYueYyafBWaOcrPGbW0.MOaWBexiF Ya6h4tFoowNG6705pldsGAfycG2XZZFHVgYa8oEAe9VnvaLS0VcDgl4wS1ifg0gbwVE7DXRo4d8q cfzrNCp2rOaBedDQ09jq_GrKfyc9quP8wP792vc.Acr5aP2Mk99E_lkyDdoZ7gWMUNE9F5_lcXdq Ngp2UXmqw4sQajLr0IhHE1YnwDvWFI5NTBSC7AexNfrhguMZXe.QhV3SvXPyLRVFIO3lh5no_Y8W JuZMmC.9siW4NBIzDgsbcUNgY0TTDSiw3tCGZx.W75cNv6TypsTaAZHIjPs5I5z9jRKzGwWxmVJ9 H X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.gq1.yahoo.com with HTTP; Sat, 24 Apr 2021 02:12:20 +0000 Received: by kubenode520.mail-prod1.omega.ne1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a1867562b726cee23078ddb333acd68b; Sat, 24 Apr 2021 02:12:16 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: A bug with getsockopt(SOL_LOCAL, LOCAL_PEERCRED) ? From: Mark Millard In-Reply-To: Date: Fri, 23 Apr 2021 19:12:13 -0700 Cc: freebsd-hackers Content-Transfer-Encoding: 7bit Message-Id: References: <40116716-D8D9-438D-A168-B26A112D199E@yahoo.com> <445774BD-D68B-48A1-856D-F8DC9A480C68@yahoo.com> <0C66B2A2-C9C6-4783-8A26-F736F3B9CCD8@yahoo.com> To: Gleb Popov X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FRvn212Yhz3sMV X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; SUBJECT_ENDS_QUESTION(1.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.68.206:from]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.68.206:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.206:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.206:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-hackers] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2021 02:12:23 -0000 On 2021-Apr-23, at 02:59, Gleb Popov wrote: > All right, I got an answer from Collabora and they confirmed that it is a > bug on their side. > > They indeed wanted to check creds on the accepted socket, not the listening > one. > > So, unless I am missing something, I think it is good to have FreeBSD error > out in this case. FreeBSD's Linux-compatibility code may well be desired to have the same behavior as Linux implementations do, even if the specific example from Collabora via this issue was found only mistakenly put the functionality to use (in both Linux and FreeBSD). There may be other Linux code that does deliberately put the functionality to use. The FreeSD-native API properties need not be driven by Linux implementation properites. Konstantin has the examples to use in making the choices, with pid information to help make the behavior clear. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-freebsd-hackers@freebsd.org Sat Apr 24 03:09:23 2021 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A7F6C5EF07D for ; Sat, 24 Apr 2021 03:09:23 +0000 (UTC) (envelope-from dewayne@heuristicsystems.com.au) Received: from hermes.heuristicsystems.com.au (hermes.heuristicsystems.com.au [203.41.22.115]) (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 (2560 bits) client-digest SHA256) (Client CN "hermes.heuristicsystems.com.au", Issuer "Heuristic Systems Type 4 Host CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FRx2n6rPhz4Qv5 for ; Sat, 24 Apr 2021 03:09:21 +0000 (UTC) (envelope-from dewayne@heuristicsystems.com.au) Received: from [10.0.5.3] (noddy.hs [10.0.5.3]) (authenticated bits=0) by hermes.heuristicsystems.com.au (8.15.2/8.15.2) with ESMTPSA id 13O37q0m027934 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sat, 24 Apr 2021 13:07:53 +1000 (AEST) (envelope-from dewayne@heuristicsystems.com.au) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=heuristicsystems.com.au; s=hsa; t=1619233673; x=1619838474; bh=TqsUvVZcONzkixxg1ylcjXUwSqHr/vc4T5Vz11tMz84=; h=Subject:To:From:Message-ID:Date; b=Ok1sj7eL8QpilGWBWg2batG5Es4Q2SdJb2P7aM5ks/KlWVa893c5SnKgtpMlybQiF LZ4AfoHTHCqDSGjAEWE+nWFoOkK/EPFGdU02ywfg1nwEPfKY/4+MaBmywwwQ8n7bSH gxUsO7s1ynX76o+e81NQ8SEyWnfnFiaAJUTbu+axsM0zxefxnY0qX X-Authentication-Warning: b3.hs: Host noddy.hs [10.0.5.3] claimed to be [10.0.5.3] Subject: Re: 32-bit jail on 64-bit host To: freebsd-hackers@freebsd.org References: From: Dewayne Geraghty Message-ID: <05b397f9-5bfc-1c19-bf8c-9429b7998113@heuristicsystems.com.au> Date: Sat, 24 Apr 2021 13:06:35 +1000 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4FRx2n6rPhz4Qv5 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=heuristicsystems.com.au header.s=hsa header.b=Ok1sj7eL; dmarc=none; spf=pass (mx1.freebsd.org: domain of dewayne@heuristicsystems.com.au designates 203.41.22.115 as permitted sender) smtp.mailfrom=dewayne@heuristicsystems.com.au X-Spamd-Result: default: False [-6.20 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; RCVD_IN_DNSWL_MED(-0.20)[203.41.22.115:from]; DKIM_TRACE(0.00)[heuristicsystems.com.au:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:1221, ipnet:203.40.0.0/13, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[heuristicsystems.com.au:s=hsa]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_MED(-2.00)[heuristicsystems.com.au:dkim]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[heuristicsystems.com.au]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-hackers] X-Mailman-Approved-At: Sat, 24 Apr 2021 08:36:24 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2021 03:09:23 -0000 On 23/04/2021 1:12 am, Chris wrote: > I do it. I don't think vnet or a bridge is necessary or perhaps even > desirable > in this situation. All my 32/64bit jails access the hosts net out of > localhost > (127.0.0.2-N) and I use pf(4) to redirect the packets. > I have a static block of internet facing addresses. So change yours > accordingly > pf.conf(5) > EXT_ADDR="W.X.Y.Z" > ... > set skip on { lo0, lo1 } > ... > nat pass on re0 from { lo1 } to any -> $EXT_ADDR > rdr pass on re0 proto tcp from any to { lo1 } -> $EXT_ADDR > ... > block in > pass out > ... > I add an entry in the hosts hosts(5) file, and in the jails hosts(5) for > accounting purposes. The jails resolve.conf(5) file looks like this > nameserver 127.0.0.1 > nameserver 127.0.0.2 > options timeout:1 attempts:1 rotate > > And all gets it done for me. > > HTH > > --Chris >> >> Peter Peter, I use a similar setup to Chris, though with ipfw. ;) Jails have a few subtleties. They inherit much of the network of the base. So you only need to think about the IP's assigned to the jail and their assignment order. However one particular gotcha The jail will use the first IP address that's set in jail.conf effectively becoming your default route for the jail. And I recall that localhost will also latch onto that IP address, so if its internet facing, you'll need to think about the implications. I'm a little paranoid so I use: - /etc/hosts to define localhost to be something other than the default. Some applications/ports behave properly IF they use localhost for their unix sockets, rather than 127.0.0.1. (ie test what you need and become good friends with tcpdump) - consider carefully your firewall rules not just internet facing but also over lo0 :) And to reiterate what many have said, running i386 and amd64 on an amd64 platform is fun, as there are less machines to maintain when you need, as in our use-case, to test the operation of software for 32bit targets. (Though we just perform a buildworld with TARGET_ARCH=i386 CPU_TYPE=PRESCOTT with the appropriate destination.) I don't think your setup requires the complexity or additional processing from bridging or vnets.