From owner-freebsd-hackers@freebsd.org Sun May 24 09:24:44 2020 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 509742FFEAF for ; Sun, 24 May 2020 09:24:44 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr [80.12.242.125]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49VFDV5GX4z4d8m for ; Sun, 24 May 2020 09:24:42 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from wwinf1c21 ([10.223.79.45]) by mwinf5d58 with ME id iZQg220050yfVCi03ZQgrn; Sun, 24 May 2020 11:24:40 +0200 X-ME-Helo: wwinf1c21 X-ME-Auth: cGpmbG95ZEB3YW5hZG9vLmZy X-ME-Date: Sun, 24 May 2020 11:24:40 +0200 X-ME-IP: 2.7.113.176 Date: Sun, 24 May 2020 11:24:40 +0200 (CEST) From: Paul FLOYD Reply-To: Paul FLOYD To: FreeBSD Hackers Message-ID: <816299859.1977.1590312280071.JavaMail.www@wwinf1c21> In-Reply-To: <20200522201251.GM64045@kib.kiev.ua> References: <2102917207.11671.1589487524169.JavaMail.www@wwinf1n11> <490544208.11847.1589489181927.JavaMail.www@wwinf1n11> <20200514224347.GB46537@kib.kiev.ua> <9840EA0E-CF11-4332-A5A0-A3CDBA0F0464@wanadoo.fr> <20200521154621.GB85681@raichu> <068F2B99-24C2-4F38-ACC1-02273C198434@wanadoo.fr> <679A6BE4-E344-49D0-B76D-DB65A41E26FA@wanadoo.fr> <20200522192804.GL64045@kib.kiev.ua> <20200522201251.GM64045@kib.kiev.ua> Subject: Re: SIGBUS si_code 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [2.7.113.176] X-WUM-FROM: |~| X-WUM-TO: |~| X-WUM-REPLYTO: |~| X-Rspamd-Queue-Id: 49VFDV5GX4z4d8m X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pjfloyd@wanadoo.fr has no SPF policy when checking 80.12.242.125) smtp.mailfrom=pjfloyd@wanadoo.fr X-Spamd-Result: default: False [3.95 / 15.00]; HAS_REPLYTO(0.00)[pjfloyd@wanadoo.fr]; HAS_XOIP(0.00)[]; FREEMAIL_FROM(0.00)[wanadoo.fr]; TO_DN_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:3215, ipnet:80.12.240.0/20, country:FR]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[wanadoo.fr]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.53)[0.531]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_REPLYTO(0.00)[wanadoo.fr]; DMARC_NA(0.00)[wanadoo.fr]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; NEURAL_SPAM_LONG(1.02)[1.018]; RCVD_IN_DNSWL_NONE(0.00)[80.12.242.125:from]; R_SPF_NA(0.00)[no SPF record]; RWL_MAILSPIKE_POSSIBLE(0.00)[80.12.242.125:from]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2020 09:24:44 -0000 =C2=A0 =C2=A0 =C2=A0 > > And which files/functions do that? > ELF image activator. > Look in kern/imgact_elf.c. It is basically in check_note, used from > get_brandinfo. The real function names are mangled for co-existence > of 32 and 64 bit elf activators. That's quite interesting. If I run procstat -b on a running Valgrind instan= ce I see =C2=A0 aulf> procstat -b 2072 PID COMM OSREL PATH 2072 memcheck-amd64-free 0 /usr/home/paulf/scratch/valgrind/memcheck/memche= ck-amd64-freebsd A quick recap of Valgrind execution 'valgrind' itself is just a small stub executable that looks at the guest e= xecutable to determine if it is amd64 or x86. It will then do an execve of = the required tool e.g., memcheck-amd64-freebsd.=20 The tools themselves are entirely standalone and do not link with any libra= ries, not even libc. Is there a way to get the linker to add a .note section with osrel? If not, is there a way to set osrel after a process has started? A+ Paul From owner-freebsd-hackers@freebsd.org Sun May 24 09:42:38 2020 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 303FE3283EE for ; Sun, 24 May 2020 09:42:38 +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 49VFd90wmBz4fxn for ; Sun, 24 May 2020 09:42:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 04O9gMOG072351 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 24 May 2020 12:42:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 04O9gMOG072351 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 04O9gMUh072350; Sun, 24 May 2020 12:42:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 24 May 2020 12:42:22 +0300 From: Konstantin Belousov To: Paul FLOYD Cc: FreeBSD Hackers Subject: Re: SIGBUS si_code 12 Message-ID: <20200524094222.GQ64045@kib.kiev.ua> References: <490544208.11847.1589489181927.JavaMail.www@wwinf1n11> <20200514224347.GB46537@kib.kiev.ua> <9840EA0E-CF11-4332-A5A0-A3CDBA0F0464@wanadoo.fr> <20200521154621.GB85681@raichu> <068F2B99-24C2-4F38-ACC1-02273C198434@wanadoo.fr> <679A6BE4-E344-49D0-B76D-DB65A41E26FA@wanadoo.fr> <20200522192804.GL64045@kib.kiev.ua> <20200522201251.GM64045@kib.kiev.ua> <816299859.1977.1590312280071.JavaMail.www@wwinf1c21> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <816299859.1977.1590312280071.JavaMail.www@wwinf1c21> 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: 49VFd90wmBz4fxn 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.88 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_SPAM_SHORT(0.12)[0.120]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; NEURAL_SPAM_MEDIUM(0.50)[0.495]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.26)[0.262]; FREEMAIL_TO(0.00)[wanadoo.fr]; 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]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2020 09:42:38 -0000 On Sun, May 24, 2020 at 11:24:40AM +0200, Paul FLOYD wrote: >   >   >   > > > And which files/functions do that? > > ELF image activator. > > > Look in kern/imgact_elf.c. It is basically in check_note, used from > > get_brandinfo. The real function names are mangled for co-existence > > of 32 and 64 bit elf activators. > > That's quite interesting. If I run procstat -b on a running Valgrind instance I see > >   > aulf> procstat -b 2072 > PID COMM OSREL PATH > 2072 memcheck-amd64-free 0 /usr/home/paulf/scratch/valgrind/memcheck/memcheck-amd64-freebsd > > A quick recap of Valgrind execution > > 'valgrind' itself is just a small stub executable that looks at the guest executable to determine if it is amd64 or x86. It will then do an execve of the required tool e.g., memcheck-amd64-freebsd. > The tools themselves are entirely standalone and do not link with any libraries, not even libc. > > Is there a way to get the linker to add a .note section with osrel? Look at lib/csu/common/crtbrand.c > > If not, is there a way to set osrel after a process has started? sysctl kern.proc.KERN_PROC_OSREL. From owner-freebsd-hackers@freebsd.org Sun May 24 20:25:04 2020 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 230B62D820F for ; Sun, 24 May 2020 20:25:04 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from smtp.smtpout.orange.fr (smtp10.smtpout.orange.fr [80.12.242.132]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client CN "Bizanga Labs SMTP Client Certificate", Issuer "Bizanga Labs CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49VWtQ4T5vz4b8J for ; Sun, 24 May 2020 20:25:02 +0000 (UTC) (envelope-from pjfloyd@wanadoo.fr) Received: from garrigue.home ([2.7.113.176]) by mwinf5d33 with ME id ikQz2200C3oQd2y03kQzqq; Sun, 24 May 2020 22:25:00 +0200 X-ME-Helo: garrigue.home X-ME-Auth: cGpmbG95ZEB3YW5hZG9vLmZy X-ME-Date: Sun, 24 May 2020 22:25:00 +0200 X-ME-IP: 2.7.113.176 From: Paul Floyd Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: SIGBUS si_code 12 Date: Sun, 24 May 2020 22:24:59 +0200 References: <490544208.11847.1589489181927.JavaMail.www@wwinf1n11> <20200514224347.GB46537@kib.kiev.ua> <9840EA0E-CF11-4332-A5A0-A3CDBA0F0464@wanadoo.fr> <20200521154621.GB85681@raichu> <068F2B99-24C2-4F38-ACC1-02273C198434@wanadoo.fr> <679A6BE4-E344-49D0-B76D-DB65A41E26FA@wanadoo.fr> <20200522192804.GL64045@kib.kiev.ua> <20200522201251.GM64045@kib.kiev.ua> <816299859.1977.1590312280071.JavaMail.www@wwinf1c21> <20200524094222.GQ64045@kib.kiev.ua> To: FreeBSD Hackers In-Reply-To: <20200524094222.GQ64045@kib.kiev.ua> Message-Id: <916F0E5A-9033-4634-B42A-E448DD241E1B@wanadoo.fr> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49VWtQ4T5vz4b8J X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of pjfloyd@wanadoo.fr has no SPF policy when checking 80.12.242.132) smtp.mailfrom=pjfloyd@wanadoo.fr X-Spamd-Result: default: False [3.92 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[wanadoo.fr]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[wanadoo.fr]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RECEIVED_SPAMHAUS_PBL(0.00)[2.7.113.176:received]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.004]; NEURAL_SPAM_LONG(0.97)[0.970]; RCVD_IN_DNSWL_NONE(0.00)[80.12.242.132:from]; NEURAL_SPAM_SHORT(0.54)[0.542]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:3215, ipnet:80.12.240.0/20, country:FR]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVFROM(0.00)[wanadoo.fr]; RWL_MAILSPIKE_POSSIBLE(0.00)[80.12.242.132:from] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2020 20:25:04 -0000 > On 24 May 2020, at 11:42, Konstantin Belousov = wrote: >=20 >>=20 >> Is there a way to get the linker to add a .note section with osrel? > Look at lib/csu/common/crtbrand.c >=20 I=E2=80=99ve added the code to read the Elf note value and then set it = via the sysctl. Seems to fix the (rather minor) problem. A+ Paul= From owner-freebsd-hackers@freebsd.org Mon May 25 09:28:28 2020 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 B31272F9BE8 for ; Mon, 25 May 2020 09:28:28 +0000 (UTC) (envelope-from agapon@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 49VsGN2qsSz4fmc for ; Mon, 25 May 2020 09:28:28 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 60F3F2F9E33; Mon, 25 May 2020 09:28:28 +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 60A8B2F9E32; Mon, 25 May 2020 09:28:28 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.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 49VsGJ22T0z4fkg; Mon, 25 May 2020 09:28:24 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id c71so4147840wmd.5; Mon, 25 May 2020 02:28:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:openpgp:autocrypt:message-id :date:user-agent:mime-version:content-language :content-transfer-encoding; bh=2svniIOahlv9rbEPbdbjRgrzCGxbueIPcBYPWIQc+PY=; b=ihaBGxqm1OL3K+Vqqu7guNrf9QgUDTIUaOFBNI0UEEaLs0i9krPGjBP8YMlAOldeeC BbAbSUZ7smEVDKDii6YN68ovcBJrwjgsBf5fxOaozCBSAQBXZN/0efcej3qYtAVOQd9b ASpOxYLiJ7wYx/lwZ+xTQd8QaTWHZ+I2N4eGFRjVkIQg4QVmuIg3GXYskcyWr/CbxPHW RsAJ87BvNyJzQPj/v21aXhO1US/8/hxj/5HsWuo6vPvcttll2xVOlnx+fUUYBPeGhuiL y0IKLYhfysX9/cXxYI58iKIDae3jCfocHFllxCtYuEVJ1d7WZSgSuVgjcVscd+vO6LJL nvvA== X-Gm-Message-State: AOAM530Mp/vVv7w+J1zsPy/zj6MvqRYcNR/3iaUTu3tJxEZzEfjm45UJ f5ci5phupTiDPmkE5Q73Tz1Z93Yb X-Google-Smtp-Source: ABdhPJyrZ/92XrzAImFoi7CMmJFSRsNPv9kUUkgNGKGOoxTAKcVm+/cvcXTFhAXh26p6hDB073QLbQ== X-Received: by 2002:a05:600c:293:: with SMTP id 19mr25536124wmk.71.1590398902420; Mon, 25 May 2020 02:28:22 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id q15sm17185402wrf.87.2020.05.25.02.28.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2020 02:28:21 -0700 (PDT) To: usb@freebsd.org, FreeBSD Hackers From: Andriy Gapon Subject: HID++ Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= mQINBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABtB5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz6JAlQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryLkCDQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAYkCPAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Mon, 25 May 2020 12:28:20 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Firefox/60.0 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49VsGJ22T0z4fkg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of agapon@gmail.com designates 209.85.128.50 as permitted sender) smtp.mailfrom=agapon@gmail.com X-Spamd-Result: default: False [-0.61 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.54)[-0.537]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.47)[-0.468]; NEURAL_SPAM_SHORT(0.02)[0.024]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.128.50:from]; SUBJ_ALL_CAPS(0.38)[5]; FORGED_SENDER(0.30)[avg@FreeBSD.org,agapon@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.128.50:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[avg@FreeBSD.org,agapon@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[93.72.151.96:received] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 May 2020 09:28:28 -0000 I wonder if anyone has done any work on HID++ support. Esp., on the kernel side. For curious, this is a Logitech thing built on top of HID that can be used for extra information and configuration of their devices. E.g., query battery info from a wireless mouse. -- Andriy Gapon From owner-freebsd-hackers@freebsd.org Tue May 26 05:32:42 2020 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 8F5462F1E04; Tue, 26 May 2020 05:32:42 +0000 (UTC) (envelope-from denis.sale@gmail.com) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 49WMzs56gtz4Q72; Tue, 26 May 2020 05:32:41 +0000 (UTC) (envelope-from denis.sale@gmail.com) Received: by mail-lj1-f171.google.com with SMTP id w10so22998067ljo.0; Mon, 25 May 2020 22:32:41 -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:from:date:message-id:subject:to:cc; bh=R1htnne8u3x5p9iOBiA4EDnIJlD2W+SPE/+yoJoeOB4=; b=NyQIbPzWlKBeD1UcQG5b/2KTkA0ZLOUoqYJE6a4vVz1/Gjg2SoJWlYy4+ujXyjHZsV W5OX6tmi6WgCBk9M3uuqBtyWgMzNJCuHzSb8W1e2bfjAR+lBhPsiTAtNSBee2jgMgDuf +8V3hN076Zgev5es2gIZpRRMv5g6hNRZQtt0K0RpzTXkXXWYi8HzbUPFMiWtqdb5B/YJ jEfD24RlOfWjjEJpUxzUDHGs2N1Fd2wc8AlNjBPi+qdh8S/lxMGLxRjZWjf8bWlt5M8R QMaZTXOaNKPsv9RDGtRy4aCL54hkJvK354l62hhvYuXJ1PDEkmtH3uVU9AJiQzk+fIB6 RjaA== X-Gm-Message-State: AOAM532OGzG90hjUhUpNXIW75XE+qMUwlqz0fUSlgtrZ+RcH4QA1JhwW gYwoi4ulZJm4jVUx6jw733jTyVqqmwg= X-Google-Smtp-Source: ABdhPJzA/uLoS4ftXka3jOZz0YyYsWClC8Wln0n2ESEiJ/gz/ILz/YSa2Fowvk1qmj7LC1KU6YTmTw== X-Received: by 2002:a2e:1506:: with SMTP id s6mr4896591ljd.296.1590471159723; Mon, 25 May 2020 22:32:39 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id t5sm5678005lff.39.2020.05.25.22.32.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2020 22:32:39 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id v16so22975479ljc.8; Mon, 25 May 2020 22:32:39 -0700 (PDT) X-Received: by 2002:a2e:740f:: with SMTP id p15mr7845504ljc.214.1590471159073; Mon, 25 May 2020 22:32:39 -0700 (PDT) MIME-Version: 1.0 From: Denis Salopek Date: Tue, 26 May 2020 07:32:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: cheating with iflib To: freebsd-net@freebsd.org Cc: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 49WMzs56gtz4Q72 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of denissale@gmail.com designates 209.85.208.171 as permitted sender) smtp.mailfrom=denissale@gmail.com X-Spamd-Result: default: False [-2.35 / 15.00]; FROM_NEQ_ENVFROM(0.00)[denissal@freebsd.org,denissale@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.87)[-0.870]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-0.98)[-0.979]; NEURAL_HAM_SHORT(-0.50)[-0.499]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.171:from]; FORGED_SENDER(0.30)[denissal@freebsd.org,denissale@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.171:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 05:32:42 -0000 Hi everyone. I want to write a driver for NetFPGA SUME. It's a network device with 4 physical 10G interfaces connected to the host with only one PCI endpoint. Upon loading, the existing SUME Linux driver allocates four netdevs, essentially creating four different 10G 'virtual' interfaces in the OS. It then multiplexes packets based on header meta-data generated by hardware. Using iflib, is a similar thing possible on FreeBSD: can I attach four separate interfaces (or instances of iflib) without modifying the SUME hardware and "cheat" it so all four use the same PCI device? Is iflib appropriate for this? Another question: performance-wise, how good are iflib drivers when compared to non-iflib ones? Has someone benchmarked, stress-tested or compared netmap rx/fwd on ix or ixl NICs on FreeBSD 11 vs newer? Thank you, Denis From owner-freebsd-hackers@freebsd.org Wed May 27 07:22:22 2020 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 384093297EE for ; Wed, 27 May 2020 07:22:22 +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 49X2Mx59Lcz3Y2d for ; Wed, 27 May 2020 07:22:21 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.nyi.freebsd.org (Postfix) id B15D6329622; Wed, 27 May 2020 07:22:21 +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 B12113295B3 for ; Wed, 27 May 2020 07:22:21 +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 49X2Mw26fSz3XtC for ; Wed, 27 May 2020 07:22:19 +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=E1EtAXpVxKfMxzLIfKayxqv1rZPYSJFWfWt8EcUlv/k=; b=LhSECtwPocV4uUNvLzjlPycFAmjlSHyh6A+5vPa51ZgCvqxyE1HKW9RbDH+haTpPvtgPkT5tCVXWGn+1UHaH7fPbvIwbTl8AC/9GS+cSOpQDIw0HIvB7KZx+lwk0viAcyjUhe+v4MEqfrupvxiJc7TWWK4++kdnys2roQkZ5kdhRmE7S70OVyN3l5ID5aakdPzoSWx/pQcizHNg0jLBTuYNjo5WaP8ZIDYVSrM6HbPqPvJ5JOBSejgnGy40jnavDCoJ84vJOXGoXyNgbWsBnYfX0yCyPceY8knFZwutfUoEH6V4E9rfP3wCnnulW81wGX+lPUHJYYOmF1ZF7YlzDMg==; Received: from macmini.bk.cs.huji.ac.il ([132.65.179.19]) by kabab.cs.huji.ac.il with esmtp id 1jdqOH-000JRP-7G for hackers@freebsd.org; Wed, 27 May 2020 10:22:17 +0300 From: Daniel Braniss Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: vmware vmx0 not recovering from suspend/migration Message-Id: <4E78F635-81B7-4DE0-90DA-36AF848F9FE3@cs.huji.ac.il> Date: Wed, 27 May 2020 10:22:17 +0300 To: "freebsd-hackers@freebsd.org" X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49X2Mw26fSz3XtC X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cs.huji.ac.il header.s=57791128 header.b=LhSECtwP; 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 [-2.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.983]; R_DKIM_ALLOW(-0.20)[cs.huji.ac.il:s=57791128]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.09)[0.089]; NEURAL_HAM_LONG(-0.94)[-0.936]; RCPT_COUNT_ONE(0.00)[1]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[cs.huji.ac.il:+]; DMARC_POLICY_ALLOW(-0.50)[huji.ac.il,none]; RCVD_IN_DNSWL_NONE(0.00)[132.65.116.210:from]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:378, ipnet:132.64.0.0/13, country:IL]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 07:22:22 -0000 hi, under vmware freebsd 11.3 works fine after suspend/resume/migration, but = 12.1 goes into some kind of limbo. ping to it can take seconds, and many get lost. is there some workaround? cheers, danny From owner-freebsd-hackers@freebsd.org Wed May 27 08:44:21 2020 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 EFF5C32BDC5 for ; Wed, 27 May 2020 08:44:21 +0000 (UTC) (envelope-from ap00@mail.ru) Received: from smtp10.mail.ru (smtp10.mail.ru [94.100.181.92]) (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 49X4BX4Rp3z3gnp for ; Wed, 27 May 2020 08:44:20 +0000 (UTC) (envelope-from ap00@mail.ru) Received: by smtp10.mail.ru with esmtpa (envelope-from ) id 1jdrfd-0007p8-R3 for freebsd-hackers@freebsd.org; Wed, 27 May 2020 11:44:18 +0300 Date: Wed, 27 May 2020 11:44:17 +0300 From: Anthony Pankov X-Priority: 3 (Normal) Message-ID: <615952207.20200527114417@mail.ru> To: freebsd-hackers@freebsd.org Subject: syslog call for structured data MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD98895A71D0BFB19F3803B12EEA7D42EDBA76B80614B1D6F7E182A05F538085040BE801DF8C51F8562FB4B9282DEC1292EA9638EAFB6AEBB9CE686974C17A0A4B7 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7A3DED2DACB82E709C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE789066434B85BF7C7EA1F7E6F0F101C674E70A05D1297E1BBC6CDE5D1141D2B1C97F0CC5D0B591BACF0536140D78B1DF69DBCF54862EB48739FA2833FD35BB23D9E625A9149C048EEB1593CA6EC85F86DCB629EEF1311BF91D2E47CDBA5A96583BD4B6F7A4D31EC0BB23A54CFFDBC96A8389733CBF5DBD5E9D5E8D9A59859A8B6042F1592492B88C6CC7F00164DA146DA6F5DAA56C3B73B23E7DDDDC251EA7DABD81D268191BDAD3DC09775C1D3CA48CF1999EF0517495B43BA3038C0950A5D36C8A9BA7A39EFB7668729DE7A884B61D1BA3038C0950A5D36D5E8D9A59859A8B61BDC5325088848EC76E601842F6C81A1F004C90652538430FAAB00FBE355B82D2DBA43225CD8A89F83C798A30B85E16B156CCFE7AF13BCA4B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-C8649E89: 56373230AA5B58048F62CCC1774028540AB3E3F5DEF3E2D682660151CEE719B65B3583B537E69C90 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojkPyDcrrLc1FLEQUu088TFg== X-Mailru-Sender: D8D48EF70163D79D00784CDFC8FD3107041D7A4AB100E6217539091700FA25CA6E4CD7FF1E0756C250D5CF8590B94F4EC77752E0C033A69E81198BD1A48777B793AC9912533B2342AE208404248635DF X-Mras: Ok X-Rspamd-Queue-Id: 49X4BX4Rp3z3gnp X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.13 / 15.00]; DWL_DNSWL_NONE(0.00)[mail.ru:dkim]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[mail.ru:s=mail2]; NEURAL_HAM_MEDIUM(-0.97)[-0.968]; FROM_HAS_DN(0.00)[]; FREEMAIL_FROM(0.00)[mail.ru]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.982]; RCPT_COUNT_ONE(0.00)[1]; R_SPF_ALLOW(-0.20)[+ip4:94.100.176.0/20]; DKIM_TRACE(0.00)[mail.ru:+]; DMARC_POLICY_ALLOW(-0.50)[mail.ru,reject]; HAS_X_PRIO_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.08)[-0.083]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[mail.ru]; ASN(0.00)[asn:47764, ipnet:94.100.176.0/20, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[94.100.181.92:from] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 08:44:22 -0000 Greetings, I just wondering is there libc function that support syslog rfc5424 structured data? There must be something like syslogsd(int priority, const char *msgstr, ...) where ... is name1, value1, name2, value2, ..., nameN, valueN -- Best regards, Anthony mailto:ap00@mail.ru From owner-freebsd-hackers@freebsd.org Wed May 27 08:52:49 2020 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 77BE232C60C for ; Wed, 27 May 2020 08:52:49 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) Received: from sonic303-1.consmr.mail.bf2.yahoo.com (sonic303-1.consmr.mail.bf2.yahoo.com [74.6.131.40]) (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 49X4NJ5RcNz3ySh for ; Wed, 27 May 2020 08:52:48 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) X-YMail-OSG: 8AzakfgVM1k79VtzZ7.Q6Niffg_kCyprTZ.TPg9nU87diBM3cUNQNzspNp4tpjU hHxTwrEAH506irZcMSBiLtgFlPgUWzfyMDwh5ZD8.GCGWhkzM7qowtVW8b4LhyBF5oI.JFPRmyzD o7rAX1JHvOa5IdW6NLVE7jZ1w1AN8vJPyd7djkEh42RANfl0bcMxBqnFncU38GIeQ9jPV577ybix RusYC4OO6kCmeFgid4IvpxT2YDssa32LSlFrHGPi0Xqg6hvpV_bQdlpFYSaCk3heNPBDkYjscCMQ oLqUByPw1GFqzvPf62yxw56Rs76CqprT9KimRhQsQw0Cv9S19f9s4GA_c9ok.lkKPHn2nWGE1qsY SNDzXxHhs2J.9l8xzBWBvK3b0tY5t6Cn2ug0ZbKSK7ZdhNZ0Vlr6tlnxmZU3.cDcmv0nc33lhIXN WdIbK6p.eEr4rRXYvu9p9IC4Wwuh5vUCiCDsfTKNXg_PpjrOWhcnvu1LOUpboeaoTs9C54WCBm.a Um7ZPxxjlzpwe6MsIoNOkW99UsBwpZe60.WHgudfF2pgnBlJLmWQTvI3MIbyhI9.4orAMDa0QMPy rSHZCqFE.tzYEZtffBtW1I.cNTRXO4hU98DnSWWX3IAyUR7VoZc.fV.Pci.kcm1eRnZM.wcDwFVe dvou.A7iBtswb2YVEZJAbn2hJpe9Z_.hH_47WJcOZxA70ZrxpxGKiKMFRUsjDW2hOmYC8Ob_vIDc 01WgPNPrGoFlveBGER2M_5CNVt9mRDKufiBTO2SYmxgQQEzUiSwvIH7vQXdHIc8m10Y0WWn8R79K Uu5bTSTY9zBtjRSSN3RwwVztf4CimvQ0HFsj2By66dKTH_nlxHNVLoRqftifRV8GJW2Bf4e4WA97 V6KO8zBHh7s_YzwLJ66pximYY_IEJrgSE81_cuPaPIfQCnVNEcX.tEcVgdtdVTpMUvlSmWx8QQib Il7cGNZeyn_.haO8D1E1UGnSjnFPGRtr4YnBLdohH5QPKz6nYmZ5Zx.n2nlWL2f8XfHhJk3tuV5A rychxVLN9KX1RrnQjGNZx8RnwsPkD1hyHD1828p4feHcFPFpCdlxVnOBTSNSx96cYfhg4Pybaco1 piUPItpjH6Pie4h_HJ4RUWkVjQWtmir862T8Z7QePpk43Z6FIsUcji5TkRqU3hBsbsC3wJm5VqqD qN4QdZQn1bi4MPmnmklPuQKVIw2mwLdO4ubFzfRDsu9GsOKztyXE0S9kgj3d7XQpCVbYMVvZZTsF FOiNptUwjkNU7n3boY2be5L9E7CbKhGZ0H56MpWrMCQEXaQFd1Ka4Xp7x10.1nht2USU67QCy3.G P064qYJfDGgaiqMe7uMt8pivJuhTQ9C03TZDFHGWDg2b0uAiuIIcyu4rI1US9NSQSopyBjMu7KJg zaeVe9c7I Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.bf2.yahoo.com with HTTP; Wed, 27 May 2020 08:52:47 +0000 Received: by smtp406.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID cb3865b9c5732162197b90bb7e4e3f31; Wed, 27 May 2020 08:52:43 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: diff(1) -N behaviour - Bug 233402 From: Fehmi Noyan ISI In-Reply-To: Date: Wed, 27 May 2020 20:52:38 +1200 Cc: freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0E0FB885-5D64-41F1-9A8B-8CEDB5884762@yahoo.com> References: <94a82a22-b5c9-b797-30cc-0242f6da1c8a@fastmail.com> <4ADEBC26-0F93-45C1-B775-E6E33E95FDC1@yahoo.com> To: Yuri Pankov X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49X4NJ5RcNz3ySh X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.44 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.93)[-0.931]; FREEMAIL_TO(0.00)[fastmail.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:26101, ipnet:74.6.128.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.025]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.986]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.6.131.40:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[74.6.131.40:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 08:52:49 -0000 > On 23/05/2020, at 11:47 PM, Yuri Pankov wrote: >=20 > Fehmi Noyan ISI via freebsd-hackers wrote: >>> On 23/05/2020, at 11:21 PM, Yuri Pankov = wrote: >>>=20 >>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>> Hiya >>>> Apparently, after we switched from GNU diff to BSD diff, the -N = flag no longer assumes absent files as empty. >>>> There is a bug report about GNU diff compatibility but when I look = at diff(1) man page, I see that not treating absent files as empty is = intentional rather than a missing functionality. >>>> If this is not the case, I can work on patch to match to GNU diff = behaviour, otherwise, this bug report can be closed I think. >>>> What=E2=80=99s your take on this? >>>> -N --new-file >>>> If a file is found in only one directory, act as if it was = found >>>> in the other directory too but was of zero size. >>>> man for GNU diff >>>> -N, --new-file >>>> treat absent files as empty >>>=20 >>> I think both descriptions say the same, i.e. "zero size" =3D=3D = "empty=E2=80=9D? >> Maybe it=E2=80=99s my interpretation, but if you do not supply the = second argument to diff(1), it complains >> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >> $ diff -N a.txt nofile >> diff: nofile: No such file or directory >> $ >> GNU diff assumes an empty file for the missing second file and makes = the comparison >> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >> $ diff -N a.txt nofile >> 1d0 >> < test >> $ >=20 > I must admit that I never used -N without -r, so it's probably the = only case that needs fixing? >=20 > $ mkdir a b > $ echo bar > a/foo > $ diff -ruN a b > diff -ruN a/foo b/foo > --- a/foo 2020-05-23 14:44:34.525932000 +0300 > +++ b/foo 1970-01-01 03:00:00.000000000 +0300 > @@ -1 +0,0 @@ > -bar >=20 Took me a while to reply=E2=80=A6 With -N, GNU diff does not give an ENOENT % echo foo > bar % diff bar nofile.txt diff: nofile.txt no such file or directory % diff -N bar nofile.txt 1d0 < foo Do we want BSD diff do the same, i.e. match the -N functionality of GNU = diff? Fehmi From owner-freebsd-hackers@freebsd.org Wed May 27 09:06:54 2020 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 9DEE232CB6D for ; Wed, 27 May 2020 09:06:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49X4hZ3c5Wz40ch; Wed, 27 May 2020 09:06:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 6021E17C9A; Wed, 27 May 2020 09:06:54 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 34BC4C2475; Wed, 27 May 2020 11:06:52 +0200 (CEST) Date: Wed, 27 May 2020 11:06:52 +0200 From: Baptiste Daroussin To: Fehmi Noyan ISI Cc: Yuri Pankov , freebsd-hackers@freebsd.org Subject: Re: diff(1) -N behaviour - Bug 233402 Message-ID: <20200527090652.dubjpd2y2n5yfbta@ivaldir.net> References: <94a82a22-b5c9-b797-30cc-0242f6da1c8a@fastmail.com> <4ADEBC26-0F93-45C1-B775-E6E33E95FDC1@yahoo.com> <0E0FB885-5D64-41F1-9A8B-8CEDB5884762@yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="24ygsgv57ix6tldz" Content-Disposition: inline In-Reply-To: <0E0FB885-5D64-41F1-9A8B-8CEDB5884762@yahoo.com> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 09:06:54 -0000 --24ygsgv57ix6tldz Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via freebsd-hacke= rs wrote: >=20 >=20 > > On 23/05/2020, at 11:47 PM, Yuri Pankov wrote: > >=20 > > Fehmi Noyan ISI via freebsd-hackers wrote: > >>> On 23/05/2020, at 11:21 PM, Yuri Pankov wrote: > >>>=20 > >>> Fehmi Noyan ISI via freebsd-hackers wrote: > >>>> Hiya > >>>> Apparently, after we switched from GNU diff to BSD diff, the -N flag= no longer assumes absent files as empty. > >>>> There is a bug report about GNU diff compatibility but when I look a= t diff(1) man page, I see that not treating absent files as empty is intent= ional rather than a missing functionality. > >>>> If this is not the case, I can work on patch to match to GNU diff be= haviour, otherwise, this bug report can be closed I think. > >>>> What=E2=80=99s your take on this? > >>>> -N --new-file > >>>> If a file is found in only one directory, act as if it was found > >>>> in the other directory too but was of zero size. > >>>> man for GNU diff > >>>> -N, --new-file > >>>> treat absent files as empty > >>>=20 > >>> I think both descriptions say the same, i.e. "zero size" =3D=3D "empt= y=E2=80=9D? > >> Maybe it=E2=80=99s my interpretation, but if you do not supply the sec= ond argument to diff(1), it complains > >> $ echo =E2=80=9Ctest=E2=80=9D > a.txt > >> $ diff -N a.txt nofile > >> diff: nofile: No such file or directory > >> $ > >> GNU diff assumes an empty file for the missing second file and makes t= he comparison > >> $ echo =E2=80=9Ctest=E2=80=9D > a.txt > >> $ diff -N a.txt nofile > >> 1d0 > >> < test > >> $ > >=20 > > I must admit that I never used -N without -r, so it's probably the only= case that needs fixing? > >=20 > > $ mkdir a b > > $ echo bar > a/foo > > $ diff -ruN a b > > diff -ruN a/foo b/foo > > --- a/foo 2020-05-23 14:44:34.525932000 +0300 > > +++ b/foo 1970-01-01 03:00:00.000000000 +0300 > > @@ -1 +0,0 @@ > > -bar > >=20 >=20 > Took me a while to reply=E2=80=A6 > With -N, GNU diff does not give an ENOENT >=20 > % echo foo > bar > % diff bar nofile.txt > diff: nofile.txt no such file or directory > % diff -N bar nofile.txt > 1d0 > < foo >=20 > Do we want BSD diff do the same, i.e. match the -N functionality of GNU d= iff? >=20 Yes we do, if you do provide a patch I would be more than happy to review a= nd apply it. Best regards, Bapt --24ygsgv57ix6tldz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl7OLawACgkQY4mL3PG3 Ploo2Q/8DE69TH/Ly810kFweBkQsRK1Alov9CKS6UNh23N1kKrdwm7Wwn71UkZRT NdCOVAluGtmSlzVY9Upd5Y5OOlVpBezcDsM/MBAIP0gzY0qtr6sDTQsRc/82ZDhx nN+8msezJ0/SwDYwUttCFpJHqMnHNUQKzY9WBWfxM+gPpng4hxw08iwAs9aQNKKF HZfxAk1ZbPvTQj0W0cg6PH2OtocdyHdjLwaPYszlvp8fDH1+LU1cv+sdYBK9tmmn j5kuzvK0cM14gyVy8F6jfoLgfmzoEQZyt6uOQJoD9VQ49bdz7zl587UKGNfx+K7B PkcsVVTuyDtdKTIzaRIEzEl5re0NO4uFPKNzxdko4/xYQXZ4pKx7AORuxxUc6IPp gbcE/MbifrjbQLJevRG8I6ejNS+TyCHOxy79AjkZRv0u1/p1oazSZE7mL8+6kmfo Mr8BbYc8QKyhOIBWdMrgmr29U7oa+Amh04Wc4M+7CEx4uAvj+GlYypPOEQ89UHHY Ug78HbwOLiH6YASZyb6Wj2jvWs75rGSLJRuxoWMSkMPR2QA5sUgFCc9HWY2osnUX L9Ei5jCPo1JoEJ01BH3zQ4vJyNV1Sx0keEmcB36olXcgJ3kjxBJNNL9KM3HkiZM6 Jzhux4dQDm30lcHQXh373CMR0jc75uDm9XDtXt64vIJPyGB1obQ= =g0VU -----END PGP SIGNATURE----- --24ygsgv57ix6tldz-- From owner-freebsd-hackers@freebsd.org Wed May 27 09:11:12 2020 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 E560F32CDFA for ; Wed, 27 May 2020 09:11:12 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) Received: from sonic311-13.consmr.mail.bf2.yahoo.com (sonic311-13.consmr.mail.bf2.yahoo.com [74.6.131.123]) (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 49X4nX1C7xz41CP for ; Wed, 27 May 2020 09:11:12 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) X-YMail-OSG: q_UePDoVM1mW.Jw2GDyBguVESGLrWvnsujWw4j1ZoM8r7kz6etj.TFt8DHu.5DO bIoBbPbKnbdH4.3hwt4xztj9TyEQgrNlcylFC1zCZeaBvan7eOp23.nZ8awl440OqUikHKEANaor jvsvz3rnLgAiUKj1F8jRjL.zg8tqcLKQzENhbhxg8tXwEuxnRvIHlm1p1zyhc0iQ3NYTfM3iOaud IVcY3wAT0DOiptw3EavWYOqE.sjEKs1w0chsqzFxZ2jmTuQx_8NTvxmKOxW06zk3gxhpv1b2pGr9 VLdHywgW5Yo4uGFEeDv5KWE9JwD6UUSZCkrWywTtDmsKz3ZiN1mWria5YYpLZ2En3haYNEu89dTg AkJJOjDUCxmQAmv9IALXr.yQN5tl.Nd5HbkIQzX8EK5lmZjURNYTsiZCpu6Op.O3WW4HkvVkwnZw _ePi5hvZuCiu5HS2TpwAqpf1YabBUzUxzZJGc8GY26cGG8XvnXLr04H_6dkhMoL55Kxjq9JRrTfO kmik3UX68Yu95yrXvDwB1Hn8quVy9UiYk37amC5sQ_sOFp83CQBviEkxq90nDvivR1wfdD4PPyF7 Tgvc4om9NEyLJk9UgizwTascLNIAt.QLXEX7eqBJTK1tP0uEw92pKfRfTxmTdcQ2EP858ik4wZTM eswoCzu.xzMxo5_0ippiA7YsTuwvCCShHmuk7UfnHD4BmGJ6ak.iFe29KsovtMR3mGVyXmpjOilZ 3GIlJ2IbLbxv.aTh6rfNreamoVebrLlkGn5cQfN_7b7NAdrpx9YU9FwRMne3PUa8cOkqI9qguoij XQcWWvIYmg0wqlCVL22aJbSDz2RYhoApM6aJ.4.0cUlV8L4zxBH8t54bGn0IoQm4JsW.baZng0qf W0KvMVFPVSCzWIOd8SiqSAXK9gtJ207qmAvhWxDWBDOsB0VHCd9q3BqBhRe4zxYLJwQ4RdMTkHfj yrDpGJXEB5AzLA2qY_hOZH64Inwlk.UehGo4SPAbpNxDdSokob2BqZubBSj4sJv1tU.jS4XLAvoK K0ZUMH4wm.piK8Orvew3Bjhw76jE9i3uncZj5YOqbxllCEUhCCWXy0VVQEmNOA2A3mhJW0VlEbrz 6oie1HTRSbxx1jOe8PH.lIT4IV9bfmfc1sfjFjRdSVSYerHMca_7vDiy0obtVl_74PjFxmLL7U24 5wFtfPDDWrOGIhif8EbFowdB1nXqEfEuo2DC13KhKTF4jDO6paWeiuKHInStoF7UpMcZw4ygbyOm gN4EwJT6JxWyl6.H7CJoLFkgS6nFvPhgmNml7z7PYxQOZA84idJ6kh3NCtVbsSZqE_PIy_29AhWL JfO4aYfk1ahb5OaJPg.ydlXZNBWKhGGdqri_Zu1AKC0iA8F4yzpPnF0CsK9TxNwfBkHG_nr9kxJ7 vMso6FnfWVLPpvTiQ Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Wed, 27 May 2020 09:11:11 +0000 Received: by smtp423.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID c81b73961fdddf14bec03c84aaeb958e; Wed, 27 May 2020 09:11:08 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: diff(1) -N behaviour - Bug 233402 From: Fehmi Noyan ISI In-Reply-To: <20200527090652.dubjpd2y2n5yfbta@ivaldir.net> Date: Wed, 27 May 2020 21:11:02 +1200 Cc: Yuri Pankov , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <94a82a22-b5c9-b797-30cc-0242f6da1c8a@fastmail.com> <4ADEBC26-0F93-45C1-B775-E6E33E95FDC1@yahoo.com> <0E0FB885-5D64-41F1-9A8B-8CEDB5884762@yahoo.com> <20200527090652.dubjpd2y2n5yfbta@ivaldir.net> To: Baptiste Daroussin X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49X4nX1C7xz41CP X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.35 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.84)[-0.838]; 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:26101, ipnet:74.6.128.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.02)[-1.019]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-0.995]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.6.131.123:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[74.6.131.123:from]; FREEMAIL_CC(0.00)[fastmail.com,freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 09:11:13 -0000 > On 27/05/2020, at 9:06 PM, Baptiste Daroussin = wrote: >=20 > On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via = freebsd-hackers wrote: >>=20 >>=20 >>> On 23/05/2020, at 11:47 PM, Yuri Pankov = wrote: >>>=20 >>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>>> On 23/05/2020, at 11:21 PM, Yuri Pankov = wrote: >>>>>=20 >>>>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>>>> Hiya >>>>>> Apparently, after we switched from GNU diff to BSD diff, the -N = flag no longer assumes absent files as empty. >>>>>> There is a bug report about GNU diff compatibility but when I = look at diff(1) man page, I see that not treating absent files as empty = is intentional rather than a missing functionality. >>>>>> If this is not the case, I can work on patch to match to GNU diff = behaviour, otherwise, this bug report can be closed I think. >>>>>> What=E2=80=99s your take on this? >>>>>> -N --new-file >>>>>> If a file is found in only one directory, act as if it was = found >>>>>> in the other directory too but was of zero size. >>>>>> man for GNU diff >>>>>> -N, --new-file >>>>>> treat absent files as empty >>>>>=20 >>>>> I think both descriptions say the same, i.e. "zero size" =3D=3D = "empty=E2=80=9D? >>>> Maybe it=E2=80=99s my interpretation, but if you do not supply the = second argument to diff(1), it complains >>>> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >>>> $ diff -N a.txt nofile >>>> diff: nofile: No such file or directory >>>> $ >>>> GNU diff assumes an empty file for the missing second file and = makes the comparison >>>> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >>>> $ diff -N a.txt nofile >>>> 1d0 >>>> < test >>>> $ >>>=20 >>> I must admit that I never used -N without -r, so it's probably the = only case that needs fixing? >>>=20 >>> $ mkdir a b >>> $ echo bar > a/foo >>> $ diff -ruN a b >>> diff -ruN a/foo b/foo >>> --- a/foo 2020-05-23 14:44:34.525932000 +0300 >>> +++ b/foo 1970-01-01 03:00:00.000000000 +0300 >>> @@ -1 +0,0 @@ >>> -bar >>>=20 >>=20 >> Took me a while to reply=E2=80=A6 >> With -N, GNU diff does not give an ENOENT >>=20 >> % echo foo > bar >> % diff bar nofile.txt >> diff: nofile.txt no such file or directory >> % diff -N bar nofile.txt >> 1d0 >> < foo >>=20 >> Do we want BSD diff do the same, i.e. match the -N functionality of = GNU diff? >>=20 > Yes we do, if you do provide a patch I would be more than happy to = review and > apply it. >=20 > Best regards, > Bapt Cheers=E2=80=A6 I will be working on it and update bug 233402 From owner-freebsd-hackers@freebsd.org Wed May 27 10:01:28 2020 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 B2F2832E0A1 for ; Wed, 27 May 2020 10:01:28 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (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 49X5vW6XfVz44w1; Wed, 27 May 2020 10:01:27 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8BC444D0; Wed, 27 May 2020 05:52:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 27 May 2020 05:52:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=Z 2zOY66IdtEQ0N9EUwzZvm71SQoIqV7eRx2LPnNbu7Q=; b=WDyiJgoMmej4LvI8Z gyPW45p70PolteMC89p8huANU1InYNd094dlJS02mlZ5H6DFrM67N0YcsSGAjNKw D/pn1MHNgDQkCBzSe3o+fSKyFFgTmpFw0USrZN5zyyhxZdP9RTpMJD64UEeq1MVW ct3oHlM1EDf4CGJ0K0rRvM2JH+UvWyPIn15dAeHL2FMdVN/HiKDZZn5aymRw1wjX I0EVawMVcLbnzsxhOOXt5whnIiKrfbaHOmKaeLRe3Ze6sZMkJwBHMVAUn+0pUG6o U8s8WmOU4XLVUyJaFlo+D7eRSq8Uqr/SjEtHpDpfClwxQU2HpXeM7yNH6LrisQCL LwB8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=Z2zOY66IdtEQ0N9EUwzZvm71SQoIqV7eRx2LPnNbu 7Q=; b=gqWRFYxbHls8aQjSl2UpA5YkEWEd2dqfTB8Bhrn+Py6gTZAzSaHOc7fCi cMPfdmyaUvQ/CDYxM4c73883dxzXufcCwu88BlZsaFkxbfpo5LB1GYju4+Jj4wGv XMVZGbNw/OOY4RlajmN3IFs+ODakF+23KjdJ8VLPAA8b0dljUfLPqlSfhYXh9Pb4 KAqWr+9Nr/eTQU5lTwbscxLBKdLNQKMtn/EhP3x4tOcoq6Wb6RZ94v8eqoviF9na /EE58q2Ws5crvOBzFF/Nh+EkJ9w7SnmJHsZi4+q95ZkAEfGDLxyRijDE6PTzEaFp MblOT/szqR4KuEYz4aSkxwDQ/iLog== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomhepjghurhhi ucfrrghnkhhovhcuoeihphgrnhhkohhvsehfrghsthhmrghilhdrtghomheqnecuggftrf grthhtvghrnhepvdehiefhfefhheeljeekkeelheeuheefkeeljeeggffggfdvkedvuddu feduleevnecukfhppeeluddrvdegtddruddvgedrudefkeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihphgrnhhkohhvsehfrghsthhmrghi lhdrtghomh X-ME-Proxy: Received: from [192.168.1.6] (unknown [91.240.124.138]) by mail.messagingengine.com (Postfix) with ESMTPA id 5804E328005A; Wed, 27 May 2020 05:52:24 -0400 (EDT) Subject: Re: diff(1) -N behaviour - Bug 233402 To: Fehmi Noyan ISI , Baptiste Daroussin Cc: freebsd-hackers@freebsd.org References: <94a82a22-b5c9-b797-30cc-0242f6da1c8a@fastmail.com> <4ADEBC26-0F93-45C1-B775-E6E33E95FDC1@yahoo.com> <0E0FB885-5D64-41F1-9A8B-8CEDB5884762@yahoo.com> <20200527090652.dubjpd2y2n5yfbta@ivaldir.net> From: Yuri Pankov Message-ID: Date: Wed, 27 May 2020 12:52:22 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 49X5vW6XfVz44w1 X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm3 header.b=WDyiJgoM; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=gqWRFYxb; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of ypankov@fastmail.com designates 64.147.123.19 as permitted sender) smtp.mailfrom=ypankov@fastmail.com X-Spamd-Result: default: False [4.34 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:64.147.123.19:c]; FREEMAIL_FROM(0.00)[fastmail.com]; RWL_MAILSPIKE_GOOD(0.00)[64.147.123.19:from]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; DMARC_POLICY_ALLOW(0.00)[fastmail.com,none]; NEURAL_HAM_SHORT(-0.64)[-0.636]; FREEMAIL_TO(0.00)[yahoo.com,FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.19:from]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(5.00)[91.240.124.138:received]; R_DKIM_ALLOW(0.00)[fastmail.com:s=fm3,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-0.11)[-0.107]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.18)[0.180]; GREYLIST(0.00)[pass,body] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 10:01:28 -0000 Fehmi Noyan ISI via freebsd-hackers wrote: > > >> On 27/05/2020, at 9:06 PM, Baptiste Daroussin wrote: >> >> On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via freebsd-hackers wrote: >>> >>> >>>> On 23/05/2020, at 11:47 PM, Yuri Pankov wrote: >>>> >>>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>>>> On 23/05/2020, at 11:21 PM, Yuri Pankov wrote: >>>>>> >>>>>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>>>>> Hiya >>>>>>> Apparently, after we switched from GNU diff to BSD diff, the -N flag no longer assumes absent files as empty. >>>>>>> There is a bug report about GNU diff compatibility but when I look at diff(1) man page, I see that not treating absent files as empty is intentional rather than a missing functionality. >>>>>>> If this is not the case, I can work on patch to match to GNU diff behaviour, otherwise, this bug report can be closed I think. >>>>>>> What’s your take on this? >>>>>>> -N --new-file >>>>>>> If a file is found in only one directory, act as if it was found >>>>>>> in the other directory too but was of zero size. >>>>>>> man for GNU diff >>>>>>> -N, --new-file >>>>>>> treat absent files as empty >>>>>> >>>>>> I think both descriptions say the same, i.e. "zero size" == "empty”? >>>>> Maybe it’s my interpretation, but if you do not supply the second argument to diff(1), it complains >>>>> $ echo “test” > a.txt >>>>> $ diff -N a.txt nofile >>>>> diff: nofile: No such file or directory >>>>> $ >>>>> GNU diff assumes an empty file for the missing second file and makes the comparison >>>>> $ echo “test” > a.txt >>>>> $ diff -N a.txt nofile >>>>> 1d0 >>>>> < test >>>>> $ >>>> >>>> I must admit that I never used -N without -r, so it's probably the only case that needs fixing? >>>> >>>> $ mkdir a b >>>> $ echo bar > a/foo >>>> $ diff -ruN a b >>>> diff -ruN a/foo b/foo >>>> --- a/foo 2020-05-23 14:44:34.525932000 +0300 >>>> +++ b/foo 1970-01-01 03:00:00.000000000 +0300 >>>> @@ -1 +0,0 @@ >>>> -bar >>>> >>> >>> Took me a while to reply… >>> With -N, GNU diff does not give an ENOENT >>> >>> % echo foo > bar >>> % diff bar nofile.txt >>> diff: nofile.txt no such file or directory >>> % diff -N bar nofile.txt >>> 1d0 >>> < foo >>> >>> Do we want BSD diff do the same, i.e. match the -N functionality of GNU diff? >>> >> Yes we do, if you do provide a patch I would be more than happy to review and >> apply it. >> >> Best regards, >> Bapt > > Cheers… > > I will be working on it and update bug 233402 Great! I wasn't discouraging you, rather trying to understand what case exactly we are talking about. Also, I think the -N option description in the man page should look more like GNU's one, as currently (I think) it implies that -r is used and we are comparing directories recursively. From owner-freebsd-hackers@freebsd.org Wed May 27 15:37:49 2020 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 67D31335DD6 for ; Wed, 27 May 2020 15:37:49 +0000 (UTC) (envelope-from reichert@numachi.com) Received: from away.numachi.com (away.numachi.com [66.228.38.138]) by mx1.freebsd.org (Postfix) with SMTP id 49XFMc3DYgz4Yxt for ; Wed, 27 May 2020 15:37:48 +0000 (UTC) (envelope-from reichert@numachi.com) Received: (qmail 23894 invoked from network); 27 May 2020 15:37:41 -0000 Received: from unknown (HELO meisai.numachi.com) (72.71.251.201) by away.numachi.com with SMTP; 27 May 2020 15:37:41 -0000 Received: (qmail 56006 invoked by uid 1001); 27 May 2020 15:37:41 -0000 Date: Wed, 27 May 2020 11:37:41 -0400 From: Brian Reichert To: Anthony Pankov Cc: freebsd-hackers@freebsd.org Subject: Re: syslog call for structured data Message-ID: <20200527153741.GR43966@numachi.com> References: <615952207.20200527114417@mail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <615952207.20200527114417@mail.ru> User-Agent: Mutt/1.5.9i X-Rspamd-Queue-Id: 49XFMc3DYgz4Yxt X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of reichert@numachi.com has no SPF policy when checking 66.228.38.138) smtp.mailfrom=reichert@numachi.com X-Spamd-Result: default: False [3.55 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_SPAM_SHORT(0.29)[0.292]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[numachi.com]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.96)[0.961]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.80)[0.801]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[mail.ru]; 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:63949, ipnet:66.228.32.0/20, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 15:37:49 -0000 On Wed, May 27, 2020 at 11:44:17AM +0300, Anthony Pankov via freebsd-hackers wrote: > Greetings, > > I just wondering is there libc function that support syslog rfc5424 > structured data? > > There must be something like syslogsd(int priority, const char > *msgstr, ...) where ... is > name1, value1, name2, value2, ..., nameN, valueN Doesn't the classic syslog(3) do what you're expecting? Maybe I'm missing something. https://www.freebsd.org/cgi/man.cgi?query=syslog&sektion=3&manpath=freebsd-release-ports > > > -- > Best regards, > Anthony mailto:ap00@mail.ru > > _______________________________________________ > 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" -- Brian Reichert BSD admin/developer at large From owner-freebsd-hackers@freebsd.org Wed May 27 19:15:53 2020 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 2577D2CC867 for ; Wed, 27 May 2020 19:15:53 +0000 (UTC) (envelope-from ap00@mail.ru) Received: from smtp16.mail.ru (smtp16.mail.ru [94.100.176.153]) (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 49XLCC66d0z3yx0 for ; Wed, 27 May 2020 19:15:51 +0000 (UTC) (envelope-from ap00@mail.ru) Received: by smtp16.mail.ru with esmtpa (envelope-from ) id 1je1Wl-0002Z4-SV; Wed, 27 May 2020 22:15:48 +0300 Date: Wed, 27 May 2020 22:15:46 +0300 From: Anthony Pankov X-Priority: 3 (Normal) Message-ID: <1047584599.20200527221546@mail.ru> To: Brian Reichert CC: freebsd-hackers@freebsd.org Subject: Re: syslog call for structured data In-Reply-To: <20200527153741.GR43966@numachi.com> References: <615952207.20200527114417@mail.ru> <20200527153741.GR43966@numachi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD98895A71D0BFB19F3A7BF5B3361372892F291F0E812A76566182A05F53808504030DE9D9F2D914BFABA4EAEC07A3C0EFB89912D064B9650C800E861409BF7C45F X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7E628FE8A185FCFBEEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006375448D590B04CE87D8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC76036B1A8FF3BFF85A1C3B96B3FE24AE039D39B80CCF57B3389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C04CF195F1528592878941B15DA834481FCF19DD082D7633A0E7DDDDC251EA7DABA471835C12D1D977725E5C173C3A84C3CA5A41EBD8A3A0199FA2833FD35BB23DF004C906525384303BDABC7E18AA350CD8FC6C240DEA76428AA50765F79006370437E70D8D4C0617D81D268191BDAD3DBD4B6F7A4D31EC0B7A15B7713DBEF166D81D268191BDAD3D78DA827A17800CE715D9C6C43130D5CBEC76A7562686271E8729DE7A884B61D135872C767BF85DA227C277FBC8AE2E8BDAE3FA6833AEA0C275ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57285124B2A10EEC6C00306258E7E6ABB4E4A6367B16DE6309 X-C8649E89: 381E45698C598DE9BF16F13A02706151742C002C28BE97F47138AFE25F2449735CB1107445DC10AB X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojF8T40h5VnVtsM8CyhXI1iw== X-Mailru-Sender: D8D48EF70163D79D00784CDFC8FD310721771149975E3E50F3687CDDF03228A92C555355523812F750D5CF8590B94F4EC77752E0C033A69E81198BD1A48777B793AC9912533B2342AE208404248635DF X-Mras: Ok X-Rspamd-Queue-Id: 49XLCC66d0z3yx0 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[mail.ru]; R_SPF_ALLOW(-0.20)[+ip4:94.100.176.0/20]; RWL_MAILSPIKE_GOOD(0.00)[94.100.176.153:from]; DKIM_TRACE(0.00)[mail.ru:+]; RCPT_COUNT_TWO(0.00)[2]; HAS_X_PRIO_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.85)[-0.853]; DMARC_POLICY_ALLOW(-0.50)[mail.ru,reject]; RCVD_COUNT_ZERO(0.00)[0]; RCVD_IN_DNSWL_LOW(-0.10)[94.100.176.153:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[mail.ru]; ASN(0.00)[asn:47764, ipnet:94.100.176.0/20, country:RU]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[mail.ru:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.07)[-1.070]; R_DKIM_ALLOW(-0.20)[mail.ru:s=mail2]; FROM_HAS_DN(0.00)[]; SH_EMAIL_DBL_DONT_QUERY_IPS(0.00)[0.0.48.57:email]; NEURAL_HAM_LONG(-0.97)[-0.972]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DBL_PROHIBIT(0.00)[0.0.48.57:email] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 19:15:53 -0000 > On Wed, May 27, 2020 at 11:44:17AM +0300, Anthony Pankov via freebsd-hack= ers wrote: >> Greetings, >>=20 >> I just wondering is there libc function that support syslog rfc5424 >> structured data? >>=20 >> There must be something like syslogsd(int priority, const char >> *msgstr, ...) where ... is >> name1, value1, name2, value2, ..., nameN, valueN > Doesn't the classic syslog(3) do what you're expecting? Maybe I'm > missing something. > > https://www.freebsd.org/cgi/man.cgi?query=3Dsyslog&sektion=3D3&manpath=3D= freebsd-release-ports rfc5424 introduce structured data (SD) as a list of name-value pairs (https://tools.ietf.org/html/rfc5424#section-6.3). I'm interesting in standard way to make log line such as [useract@12345 user=3D"James" action=3D"door open"] --=20 =D1 =F3=E2=E0=E6=E5=ED=E8=E5=EC, Anthony mailto:ap00@mail.ru From owner-freebsd-hackers@freebsd.org Wed May 27 23:38:43 2020 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 979442F2965 for ; Wed, 27 May 2020 23:38:43 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) Received: from sonic301-3.consmr.mail.bf2.yahoo.com (sonic301-3.consmr.mail.bf2.yahoo.com [74.6.129.42]) (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 49XS2V1VQyz4Mlq for ; Wed, 27 May 2020 23:38:41 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) X-YMail-OSG: YiEDdjAVM1mzOq4HjuinLjlgFEWp14pXcsssErSCPQP_FeDVdH87JhXuHi9_lyc e5vk40fw_AvYh0pDzcopIxbaxRPvblNQOX.rZVtbWSvsdqyCCVEHhWAd94eCO6Hih78JZBdgi3fc vNN1wupZkhMEnTShg2D.7_SAIDsIEfSgDqB9wFybSfGk9eet.j7bjzPVOhp8Di0ReXl9VcMKlKSo 3vab.hmRe8uV1wEgU7yWCUgifVxB3MIuUEVbZB41HcyUgaNJAlY97FluHnBgoOyeKqHlSjQp3gwY j_JD49sgGxWHKkmQNwd2T_Pp1Xvo2dKGvGeeifnkkaLUjZzZ.iLUMEzImt_D8o1nh_s6h2hTt9SN J9yxtVn_my6OhD6mbu_ov2_kRbmTy9fTMxPxBnQ9Q14kczi4Onqkn6Y8T92aCV.1bS3w8m0jHj1h U.H6H8Ej5XGlMAWG6JZBa8kzJ4qnnj38bJhLFGlsNEOniqr_nmFidqRVHSOTQ5aCk1paw57LY_ZO lTqjFPOyHsFI07cEYX7OUdPjQJyOxsxgkXRS3u.4Z.J_K3TSV0L3ItP8HLE.rvz2EnWjgkkE61ow gcKpOh65MF.jaD8HZaZOQOY7iO4cJb3KE3P4JpCOnzCAbCKOcYGJXJLwlvTqjKWzqzMsZ5QBxfKu RMXgLV0IDovMdjY9X5x_MoCnBlGkYgx3l87a7UC1KVc1Wld7iki0_widmgZrT7unZsLB5Wc_n2ky 0cC1xWMPsIXcR.veffuNWkdwUhub5xjOAlt1NAfGWVo4ijJvdJiHAubbx70uPF5ra71BBoV.cAlg 7M4OVc7FFitSysRiQNtZnhaSCdJ.IJn4DasrZyVMTHWuHy_hhzU4Omnbfldx0ey_QRnKHhrWTc4B uBGDw7xG4Dlmex3oprNywcYAQjh3k7rmGJiThfc5hJFtX7xj.CCqS2QOwB2Yg1Z79V5zut_tGIo5 TGftskW5k9iIW3oSsxwUCKzlWNSqunVmYU2p1otl8uyaiLqe0JYtvwTtsvcnK0oOrm_o.IIODjv. EYcP1.7OpGfHhYpKN_cS6Yd7zbhDmF.8v_OSINZJxF5r92QA7dVqiU5__O73IPDn11gbWQ9prOEy c88WXkIMnkGbXRBXdqhZp0LmRxLfqMFioaRpI6IugMxBAezY2TYMRlj6Nc6Xe_alGWr9j6iRaW0j QvBS9uYtYTAFHKenOz3UP8ia7N5oQEpU.HsWdg4kDTGD2PS8SK3NeV.Ze2RGwIPwF1hUWnmt20Pl UwOcEQUSBpjWGFR_gYxIavqTGlnei.hAklqtXFWJHUlhVK_hyyGDg4cBz_TS0.kNjQUr4PB7R.sy XqVR8Gudo7s2fBFKxKpDonT3uRoYANDZLURqE8Vc4m9_KueWiD5J1Q9dMUmZND4Rf2_qpHTQT3DG 7N9Q2twPo Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.bf2.yahoo.com with HTTP; Wed, 27 May 2020 23:38:40 +0000 Received: by smtp431.mail.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID cee78586872de35e91d5896b3b331e44; Wed, 27 May 2020 23:38:37 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: diff(1) -N behaviour - Bug 233402 From: Fehmi Noyan ISI In-Reply-To: Date: Thu, 28 May 2020 11:38:31 +1200 Cc: Baptiste Daroussin , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <42477983-D45B-4068-8949-15E4026C0857@yahoo.com> References: <94a82a22-b5c9-b797-30cc-0242f6da1c8a@fastmail.com> <4ADEBC26-0F93-45C1-B775-E6E33E95FDC1@yahoo.com> <0E0FB885-5D64-41F1-9A8B-8CEDB5884762@yahoo.com> <20200527090652.dubjpd2y2n5yfbta@ivaldir.net> To: Yuri Pankov X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49XS2V1VQyz4Mlq X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.37 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.90)[-0.904]; FREEMAIL_TO(0.00)[fastmail.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:26101, ipnet:74.6.128.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.974]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-0.99)[-0.991]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.6.129.42:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[74.6.129.42:from]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 May 2020 23:38:43 -0000 > On 27/05/2020, at 9:52 PM, Yuri Pankov wrote: >=20 > Fehmi Noyan ISI via freebsd-hackers wrote: >>> On 27/05/2020, at 9:06 PM, Baptiste Daroussin = wrote: >>>=20 >>> On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via = freebsd-hackers wrote: >>>>=20 >>>>=20 >>>>> On 23/05/2020, at 11:47 PM, Yuri Pankov = wrote: >>>>>=20 >>>>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>>>>> On 23/05/2020, at 11:21 PM, Yuri Pankov = wrote: >>>>>>>=20 >>>>>>> Fehmi Noyan ISI via freebsd-hackers wrote: >>>>>>>> Hiya >>>>>>>> Apparently, after we switched from GNU diff to BSD diff, the -N = flag no longer assumes absent files as empty. >>>>>>>> There is a bug report about GNU diff compatibility but when I = look at diff(1) man page, I see that not treating absent files as empty = is intentional rather than a missing functionality. >>>>>>>> If this is not the case, I can work on patch to match to GNU = diff behaviour, otherwise, this bug report can be closed I think. >>>>>>>> What=E2=80=99s your take on this? >>>>>>>> -N --new-file >>>>>>>> If a file is found in only one directory, act as if it was = found >>>>>>>> in the other directory too but was of zero size. >>>>>>>> man for GNU diff >>>>>>>> -N, --new-file >>>>>>>> treat absent files as empty >>>>>>>=20 >>>>>>> I think both descriptions say the same, i.e. "zero size" =3D=3D = "empty=E2=80=9D? >>>>>> Maybe it=E2=80=99s my interpretation, but if you do not supply = the second argument to diff(1), it complains >>>>>> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >>>>>> $ diff -N a.txt nofile >>>>>> diff: nofile: No such file or directory >>>>>> $ >>>>>> GNU diff assumes an empty file for the missing second file and = makes the comparison >>>>>> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >>>>>> $ diff -N a.txt nofile >>>>>> 1d0 >>>>>> < test >>>>>> $ >>>>>=20 >>>>> I must admit that I never used -N without -r, so it's probably the = only case that needs fixing? >>>>>=20 >>>>> $ mkdir a b >>>>> $ echo bar > a/foo >>>>> $ diff -ruN a b >>>>> diff -ruN a/foo b/foo >>>>> --- a/foo 2020-05-23 14:44:34.525932000 +0300 >>>>> +++ b/foo 1970-01-01 03:00:00.000000000 +0300 >>>>> @@ -1 +0,0 @@ >>>>> -bar >>>>>=20 >>>>=20 >>>> Took me a while to reply=E2=80=A6 >>>> With -N, GNU diff does not give an ENOENT >>>>=20 >>>> % echo foo > bar >>>> % diff bar nofile.txt >>>> diff: nofile.txt no such file or directory >>>> % diff -N bar nofile.txt >>>> 1d0 >>>> < foo >>>>=20 >>>> Do we want BSD diff do the same, i.e. match the -N functionality of = GNU diff? >>>>=20 >>> Yes we do, if you do provide a patch I would be more than happy to = review and >>> apply it. >>>=20 >>> Best regards, >>> Bapt >> Cheers=E2=80=A6 >> I will be working on it and update bug 233402 >=20 > Great! I wasn't discouraging you, rather trying to understand what = case exactly we are talking about. Also, I think the -N option = description in the man page should look more like GNU's one, as = currently (I think) it implies that -r is used and we are comparing = directories recursively. > _______________________________________________ >=20 Yes, the BSD diff.1 man page also needs updating since the current = wording implies that diff(1) does not treat missing files as empty = unless it is found in any one of the directories. GNU diff=E2=80=99s = approach here is more loose I think. Fehmi=20 From owner-freebsd-hackers@freebsd.org Thu May 28 06:26:06 2020 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 D5BA32FF926 for ; Thu, 28 May 2020 06:26:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Xd4Z2jqfz3yjL; Thu, 28 May 2020 06:26:06 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 04S6QAaw048974 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 27 May 2020 23:26:17 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: Yuri Pankov , , Fehmi Noyan ISI In-Reply-To: <20200527090652.dubjpd2y2n5yfbta@ivaldir.net> From: Chris Reply-To: bsd-lists@BSDforge.com To: Baptiste Daroussin Subject: Re: diff(1) -N behaviour - Bug 233402 Date: Wed, 27 May 2020 23:26:16 -0700 Message-Id: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49Xd4Z2jqfz3yjL 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.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 06:26:06 -0000 On Wed, 27 May 2020 11:06:52 +0200 Baptiste Daroussin bapt@FreeBSD=2Eorg said > On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via freebsd-hac= kers > wrote: > >=20 > >=20 > > > On 23/05/2020, at 11:47 PM, Yuri Pankov wrote: > > >=20 > > > Fehmi Noyan ISI via freebsd-hackers wrote: > > >>> On 23/05/2020, at 11:21 PM, Yuri Pankov wrot= e: > > >>>=20 > > >>> Fehmi Noyan ISI via freebsd-hackers wrote: > > >>>> Hiya > > >>>> Apparently, after we switched from GNU diff to BSD diff, the -N fl= ag no > > longer assumes absent files as empty=2E > > >>>> There is a bug report about GNU diff compatibility but when I look= at > > diff(1) man page, I see that not treating absent files as empty is inte= ntional > > rather than a missing functionality=2E > > >>>> If this is not the case, I can work on patch to match to GNU diff > > behaviour, otherwise, this bug report can be closed I think=2E > > >>>> What=E2=80=99s your take on this? > > >>>> -N --new-file > > >>>> If a file is found in only one directory, act as if it was fou= nd > > >>>> in the other directory too but was of zero size=2E > > >>>> man for GNU diff > > >>>> -N, --new-file > > >>>> treat absent files as empty > > >>>=20 > > >>> I think both descriptions say the same, i=2Ee=2E "zero size" =3D=3D "em= pty=E2=80=9D? > > >> Maybe it=E2=80=99s my interpretation, but if you do not supply the s= econd > > argument to diff(1), it complains > > >> $ echo =E2=80=9Ctest=E2=80=9D > a=2Etxt > > >> $ diff -N a=2Etxt nofile > > >> diff: nofile: No such file or directory > > >> $ > > >> GNU diff assumes an empty file for the missing second file and makes= the > > comparison > > >> $ echo =E2=80=9Ctest=E2=80=9D > a=2Etxt > > >> $ diff -N a=2Etxt nofile > > >> 1d0 > > >> < test > > >> $ > > >=20 > > > I must admit that I never used -N without -r, so it's probably the on= ly > > case that needs fixing? > > >=20 > > > $ mkdir a b > > > $ echo bar > a/foo > > > $ diff -ruN a b > > > diff -ruN a/foo b/foo > > > --- a/foo 2020-05-23 14:44:34=2E525932000 +0300 > > > +++ b/foo 1970-01-01 03:00:00=2E000000000 +0300 > > > @@ -1 +0,0 @@ > > > -bar > > >=20 > >=20 > > Took me a while to reply=E2=80=A6 > > With -N, GNU diff does not give an ENOENT > >=20 > > % echo foo > bar > > % diff bar nofile=2Etxt > > diff: nofile=2Etxt no such file or directory > > % diff -N bar nofile=2Etxt > > 1d0 > > < foo > >=20 > > Do we want BSD diff do the same, i=2Ee=2E match the -N functionality of GNU > > diff? > >=20 > Yes we do, Why? If someone wants a GNU diff=2E Can't they simply install it? If FreeBSD diff is to become like GNU diff, what's the point of having a FreeBSD version=2E Apologies in advance if I'm missing anything here=2E Thanks=2E --Chris > if you do provide a patch I would be more than happy to review > and > apply it=2E >=20 > Best regards, > Bapt From owner-freebsd-hackers@freebsd.org Thu May 28 08:17:52 2020 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 552EC32A03F for ; Thu, 28 May 2020 08:17:52 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) Received: from sonic312-20.consmr.mail.bf2.yahoo.com (sonic312-20.consmr.mail.bf2.yahoo.com [74.6.128.82]) (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 49XgYW2Xlrz48nY for ; Thu, 28 May 2020 08:17:51 +0000 (UTC) (envelope-from fnoyanisi@yahoo.com) X-YMail-OSG: oZ3Z4WoVM1mF.70IuM4JpgxVBRewfUM0C.1k1zzcD3ytKxXSt99HXSP3PYNyb6T 5bo5Qic7NlBla5YIZ_lnkWd3ffsyGskDw5OhRRDXivmgjGgfAFIN2jsXRvCvZJywPAdGOEMBk58e sFsiRQOWvghcx.M9EK1Ob1Z4w0gSSsZMO5F0Wymh4wvaqBV5YQDwcZDnmbvyvnL_WbTduPVEHu8f RkGDTphugrBpbWXe89Bk_TxswZK7SU_r_4C.7Y47_i7XNEbz4M.7V9oYKnSjchOIUrNpVQvOB5Wk Wy2UWuRqzkO0p0xw2.PR4Di20e1gyBje3qDuarkeIaid3lAKvsXOOTao2PccfvU1VNvuyERI5LmJ DWAoDF7ZHIBd_EJXPuFsn6g60t29b1gr4AKLQQuy9OU8ZKAt6Rn0VwwYgZudE9.nkTrCNg.g6ya9 ITB8OhaT2DZ4Yi61pW622ATvMlv6vzfdmtlPwYv0kki5LFmISeUXFQu3hP_Ffxo8QrJpnHKl4cT5 XKFfzw3JFfiEQHk5LUnf9C.yZzkcCgCN8D8lCRnjFT.DckWDEZ.2O3P._rtE0VI_w.1pbsImh3d4 i9Cxtil7HoPmf6J.oSyK.dh0sYMtU92vQAhRnIozogg9N7k24TLfdwmv2PNtwzvFYmtCKbqq1rqS IrmjZSZzsEf41gKENbTTjn2Z92xmqgsv1xvoql_rLdcp9AuE_CmTUzToP5wGuGc6XJbZewwVKjYi IyX5WklD4XROVK2R06bSTBvFijRu6P3MnEklLutDYKUCDPXt.bWVR32EqP5dAX99__.LHQvc6oD9 DRGdJvP4f8FmO2L362TbhBOVz9WAUUXbXFil3PQKuJATFRqL.DJhayTVY.JxiwxWNzWqnR4jOUdL uBsCKXi6EAC49j7DeahB0WLuuFqAjMGdaMSXwXBHtC9VcPRk5E2aecKZjewZ2FwcVNz66_xUQiEj x9UvCE3RH15D4XmnnHkhnid0ezoL24uXYTQerZV9EpE9VYybdQ945mK_NQ8wb1wkTWIVs89CnxPn 6D8g3I3ss47mYMdv5brSMjmZXPL92TSs6GaJhV7noZCTxVvVE99MY2rMvKaVO.6ai4B1TMt7Mj4X 5vsfwzbzUNT580vbSXEwPRFK1AA0zdsqD_BIkqQ5Dbvu9sc6GBFVIn9809Vo0AatkRACSoydze.9 Z2qIvwS8FWqwI4RuMbCLDrRG6ZRPn3EQn51dW2x_UYtHoXTzWMURly9BwBKKJfZ6iH8XXmdjeXgO foRU_lWmNsMr7Wo17OFGI0pkOyXRtuXXiZ1u7ftGZc_3E50o6Ob6h79tcKc.15HE_jSRHFl_E_i9 o2FVX8UdndF_UDDce_CuN0FbO6fX9Cu0ya3ksIPH2SsCZXk5povEN8jgBhGG8d_quQEqJkEFyWWH wRY.ae5XlFy_lVnEZIMUPoQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.bf2.yahoo.com with HTTP; Thu, 28 May 2020 08:17:50 +0000 Received: by smtp403.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 00ef316c1dd07e09c2e7062b6e8104b1; Thu, 28 May 2020 08:17:46 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: diff(1) -N behaviour - Bug 233402 From: Fehmi Noyan ISI In-Reply-To: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> Date: Thu, 28 May 2020 20:17:40 +1200 Cc: Baptiste Daroussin , Yuri Pankov , freebsd-hackers@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> To: "bsd-lists@bsdforge.com" X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49XgYW2Xlrz48nY X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.79 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.35)[-0.346]; 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:26101, ipnet:74.6.128.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.992]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-0.95)[-0.953]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[74.6.128.82:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[74.6.128.82:from]; FREEMAIL_CC(0.00)[FreeBSD.org,fastmail.com,freebsd.org]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 08:17:52 -0000 > On 28/05/2020, at 6:26 PM, Chris wrote: >=20 > On Wed, 27 May 2020 11:06:52 +0200 Baptiste Daroussin bapt@FreeBSD.org = said >=20 >> On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via = freebsd-hackers >> wrote: >> > > > > On 23/05/2020, at 11:47 PM, Yuri Pankov = wrote: >> > > > > Fehmi Noyan ISI via freebsd-hackers wrote: >> > >>> On 23/05/2020, at 11:21 PM, Yuri Pankov = wrote: >> > >>> > >>> Fehmi Noyan ISI via freebsd-hackers wrote: >> > >>>> Hiya >> > >>>> Apparently, after we switched from GNU diff to BSD diff, the = -N flag no >> > longer assumes absent files as empty. >> > >>>> There is a bug report about GNU diff compatibility but when I = look at >> > diff(1) man page, I see that not treating absent files as empty is = intentional >> > rather than a missing functionality. >> > >>>> If this is not the case, I can work on patch to match to GNU = diff >> > behaviour, otherwise, this bug report can be closed I think. >> > >>>> What=E2=80=99s your take on this? >> > >>>> -N --new-file >> > >>>> If a file is found in only one directory, act as if it was = found >> > >>>> in the other directory too but was of zero size. >> > >>>> man for GNU diff >> > >>>> -N, --new-file >> > >>>> treat absent files as empty >> > >>> > >>> I think both descriptions say the same, i.e. "zero size" = =3D=3D "empty=E2=80=9D? >> > >> Maybe it=E2=80=99s my interpretation, but if you do not supply = the second >> > argument to diff(1), it complains >> > >> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >> > >> $ diff -N a.txt nofile >> > >> diff: nofile: No such file or directory >> > >> $ >> > >> GNU diff assumes an empty file for the missing second file and = makes the >> > comparison >> > >> $ echo =E2=80=9Ctest=E2=80=9D > a.txt >> > >> $ diff -N a.txt nofile >> > >> 1d0 >> > >> < test >> > >> $ >> > > > > I must admit that I never used -N without -r, so it's = probably the only >> > case that needs fixing? >> > > > > $ mkdir a b >> > > $ echo bar > a/foo >> > > $ diff -ruN a b >> > > diff -ruN a/foo b/foo >> > > --- a/foo 2020-05-23 14:44:34.525932000 +0300 >> > > +++ b/foo 1970-01-01 03:00:00.000000000 +0300 >> > > @@ -1 +0,0 @@ >> > > -bar >> > > > > Took me a while to reply=E2=80=A6 >> > With -N, GNU diff does not give an ENOENT >> > > % echo foo > bar >> > % diff bar nofile.txt >> > diff: nofile.txt no such file or directory >> > % diff -N bar nofile.txt >> > 1d0 >> > < foo >> > > Do we want BSD diff do the same, i.e. match the -N functionality = of GNU >> > diff? >> > Yes we do, > Why? If someone wants a GNU diff. Can't they simply install it? If > FreeBSD diff is to become like GNU diff, what's the point of having > a FreeBSD version. > Apologies in advance if I'm missing anything here. >=20 > Thanks. >=20 > --Chris >> if you do provide a patch I would be more than happy to review >> and >> apply it. >> Best regards, >> Bapt >=20 >=20 Maybe I should have said =E2=80=9Cfrom functionality=E2=80=9D wise. We = are not changing the behaviour of diff(1) for the sake of being like = GNU diff. diff(1) has an -N flag and it is not short of any capabilities in that = regard. However, there are minor differences in some edge cases, which, = IMO, GNU diff behaves slightly looser than diff(1).=20 Hence the question was asked in this mailing list; we are not missing = anything but do we want to have that extra functionality in diff(1)? From owner-freebsd-hackers@freebsd.org Thu May 28 09:21:24 2020 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 288B232BAAE for ; Thu, 28 May 2020 09:21:24 +0000 (UTC) (envelope-from bapt@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Xhyr0K6Pz4GNC; Thu, 28 May 2020 09:21:24 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id E6E3022FD3; Thu, 28 May 2020 09:21:23 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from mail.nours.eu (etoilebsd.net [IPv6:2001:41d0:8:db4c::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ivaldir.etoilebsd.net (Postfix) with ESMTPSA id 2DE2BD7253; Thu, 28 May 2020 11:21:21 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 28 May 2020 11:21:16 +0200 From: Baptiste Daroussin To: bsd-lists@bsdforge.com Cc: Yuri Pankov , freebsd-hackers@freebsd.org, Fehmi Noyan ISI Subject: Re: diff(1) -N behaviour - Bug 233402 In-Reply-To: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> References: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: bapt@FreeBSD.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 09:21:24 -0000 On 2020-05-28 08:26, Chris wrote: > On Wed, 27 May 2020 11:06:52 +0200 Baptiste Daroussin bapt@FreeBSD.org > said > >> On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via >> freebsd-hackers >> wrote: >> > > > > On 23/05/2020, at 11:47 PM, Yuri Pankov wrote: >> > > > > Fehmi Noyan ISI via freebsd-hackers wrote: >> > >>> On 23/05/2020, at 11:21 PM, Yuri Pankov wrote: >> > >>> > >>> Fehmi Noyan ISI via freebsd-hackers wrote: >> > >>>> Hiya >> > >>>> Apparently, after we switched from GNU diff to BSD diff, the -N flag no >> > longer assumes absent files as empty. >> > >>>> There is a bug report about GNU diff compatibility but when I look at >> > diff(1) man page, I see that not treating absent files as empty is intentional >> > rather than a missing functionality. >> > >>>> If this is not the case, I can work on patch to match to GNU diff >> > behaviour, otherwise, this bug report can be closed I think. >> > >>>> What’s your take on this? >> > >>>> -N --new-file >> > >>>> If a file is found in only one directory, act as if it was found >> > >>>> in the other directory too but was of zero size. >> > >>>> man for GNU diff >> > >>>> -N, --new-file >> > >>>> treat absent files as empty >> > >>> > >>> I think both descriptions say the same, i.e. "zero size" == "empty”? >> > >> Maybe it’s my interpretation, but if you do not supply the second >> > argument to diff(1), it complains >> > >> $ echo “test” > a.txt >> > >> $ diff -N a.txt nofile >> > >> diff: nofile: No such file or directory >> > >> $ >> > >> GNU diff assumes an empty file for the missing second file and makes the >> > comparison >> > >> $ echo “test” > a.txt >> > >> $ diff -N a.txt nofile >> > >> 1d0 >> > >> < test >> > >> $ >> > > > > I must admit that I never used -N without -r, so it's probably the only >> > case that needs fixing? >> > > > > $ mkdir a b >> > > $ echo bar > a/foo >> > > $ diff -ruN a b >> > > diff -ruN a/foo b/foo >> > > --- a/foo 2020-05-23 14:44:34.525932000 +0300 >> > > +++ b/foo 1970-01-01 03:00:00.000000000 +0300 >> > > @@ -1 +0,0 @@ >> > > -bar >> > > > > Took me a while to reply… >> > With -N, GNU diff does not give an ENOENT >> > > % echo foo > bar >> > % diff bar nofile.txt >> > diff: nofile.txt no such file or directory >> > % diff -N bar nofile.txt >> > 1d0 >> > < foo >> > > Do we want BSD diff do the same, i.e. match the -N functionality of GNU >> > diff? >> > Yes we do, > Why? If someone wants a GNU diff. Can't they simply install it? If > FreeBSD diff is to become like GNU diff, what's the point of having > a FreeBSD version. > Apologies in advance if I'm missing anything here. > Because When I switched from GNU diff to BSD diff recently, the intent was to be mostly compatible with GNU diff (the one we had for very long, not necessary the very latest version if it) it has been requested by many users to avoid breakage in most script and usage of diff people were having for a long time. while what has been committed is not 100% compatible it is very close, and there is a file that documents what is missing from this implementation. Now back to the -N the behaviour Fehmi is proposing to fix is a bug in what I did implement the intent as always been to get the behaviour he describes not the one we currently have. Side note: the motivation for switching from GNU diff to BSD diff in base is the same as for the rest of the removal of the GNU components in base: we cannot get any update because newer version are in GPLv3). Best regards, Bapt From owner-freebsd-hackers@freebsd.org Thu May 28 12:38:15 2020 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 5A5EB2F15D1 for ; Thu, 28 May 2020 12:38:15 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (mail.metricspace.net [IPv6:2001:470:1f11:617::107]) by mx1.freebsd.org (Postfix) with ESMTP id 49XnKy2YmNz4YBV for ; Thu, 28 May 2020 12:38:14 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:becd]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 902E5C16B for ; Thu, 28 May 2020 12:38:08 +0000 (UTC) To: "freebsd-hackers@freebsd.org" From: Eric McCorkle Subject: Researching for proposals: trust and proactively-secure filesystems Autocrypt: addr=eric@metricspace.net; prefer-encrypt=mutual; keydata= mDMEXonLJBYJKwYBBAHaRw8BAQdA4oHU11A8qtqD0EtRofyORHbGX1ZIT/mnk9eceKQx56q0 JEVyaWMgTWNDb3JrbGUgPGVyaWNAbWV0cmljc3BhY2UubmV0PoiZBBMWCABBAhsDBQsJCAcC BhUKCQgLAgQWAgMBAh4BAheAAhkBFiEEPfuJobsx0Me4pIwLPOOjZtwQVqwFAl6J2DIFCQHh QI4ACgkQPOOjZtwQVqzGAAEAu2D57t8P5L7aE1zQKLrJ4B56ki67sR+N/W1mvKnw26oBANEp vVLbA7zr9q7i9wT/xrAUEnc4jylTEKM4sm60q8gBuDgEXonLJBIKKwYBBAGXVQEFAQEHQCxw rRXlvDoXgDGv2WMrLy9UaJ4fNWXIdlaiiKZIH7lBAwEIB4h+BBgWCAAmAhsMFiEEPfuJobsx 0Me4pIwLPOOjZtwQVqwFAl6J2DoFCQHhQJYACgkQPOOjZtwQVqy4UwEAruwUbIQEmOGkyGmA 8Q7A/LGqCYE7vBzF1OnpcOuV1vYBANIVrBc7ikG6UelcNkUD1o3QCsp9y5U0/KS6Uc1LQ40E Message-ID: Date: Thu, 28 May 2020 08:38:03 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0eKj0QJTHrHYawjA1YSS8ppTu5zhG3quR" X-Rspamd-Queue-Id: 49XnKy2YmNz4YBV X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of eric@metricspace.net has no SPF policy when checking 2001:470:1f11:617::107) smtp.mailfrom=eric@metricspace.net X-Spamd-Result: default: False [-1.43 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.62)[-0.615]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; HAS_ATTACHMENT(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_SPAM_MEDIUM(0.16)[0.157]; DMARC_NA(0.00)[metricspace.net]; NEURAL_SPAM_SHORT(0.13)[0.130]; TO_DN_EQ_ADDR_ALL(0.00)[]; SIGNED_PGP(-2.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 12:38:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0eKj0QJTHrHYawjA1YSS8ppTu5zhG3quR Content-Type: multipart/mixed; boundary="umDHIpLs1NT2RileS7urBip0D8H0RZ012" --umDHIpLs1NT2RileS7urBip0D8H0RZ012 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Hello, I'm gathering information for some proposals I'm working on that build on the public-key trust system idea I proposed back in 2018 (which I haven't been able to work on since, unfortunately). I'm interested in any feedback about feasibility. (Assume there are sponsors and users interested in any features or applications I describe, because there are.) A bit of recap, the public-key trust system would provide a kernel-level trust store which could serve as a system-wide root of trust, and would be designed such that you could configure applications to use a kernel device file as their CA certificate. The kernel would maintain a set of trusted certificates, which could be established and revoked through another device file interface. In the original work, I just had the trust store maintain a list of certificates with no private keys. This could be added, though. I suggested this as future work, and pointed out that you could do some interesting things like remote capability delegations. The first concept is fairly straightforward: tie the public-key trust system together with a hardware TPM. This would limit the cipher selection to what TPMs support (no curve 25519), but seems otherwise feasible to me. The "trust" device interface I described in my initial work was essentially a software-emulated TPM in the kernel anyway. How would this differ from a plain TPM device? Not terribly. The real point of the trust system is to be an abstraction for what the system does and does not trust. So the command interface would look more like "create an attestation at this trust level", versus "sign with this particular key". In keeping with my original work, the goal is that the kernel could issue non-forgeable authorization materials that could be exported from the system and checked for validity later. The second concept deals with filesystems, and particular ZFS (yes, I am aware of existing ZFS encryption work). ZFS is particularly interesting because of its write-once structure. This potentially lets you use ciphers/MACs with "one-shot" keys, such as chacha20/poly1305. It *also* potentially lets you use distinct keys for each individual file. That capability could allow you to grant fine-grained access to sets of files. The use case here is that you can have different "access levels" within an individual filesystem that can be turned on and off. (You can accomplish this with FDE, but it's fairly awkward.) If you tweak the virtual memory/filesystem interface a bit to load data from the filesystem while still encrypted and decrypt it only on demand, you can do away with the notion of turning access levels on at the system-wide level. Here, each individual user either does or does not have the right keys to access the data. (There's some interesting possibilities here with secret-sharing: you could, for example, have data that requires a specific *set* of authorizations to decrypt) There is, of course, a possibility that an adversary could take advantage of a kernel data leak in all these mechanisms. However, there is a smaller window in which that is possible. The theme in all of this is that you're essentially mediating access through possession of keys as opposed to kernel access control (hence the term "proactively secure") Additionally, there's a possible scheme where you essentially view a file as a one-way encrypted channel. You could generate two key-pairs, create the session key, then destroy one side's public key and the other side's private key. The material that gets saved to disk is the public key and data encrypted with the session key. The other private key serves as an access token. I personally can't think of an advantage of this scheme over just saving a portion of a secret-shared symmetric key to the disk, but that doesn't mean there isn't one. --umDHIpLs1NT2RileS7urBip0D8H0RZ012-- --0eKj0QJTHrHYawjA1YSS8ppTu5zhG3quR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQ9+4mhuzHQx7ikjAs846Nm3BBWrAUCXs+wrwAKCRA846Nm3BBW rLMmAQC3cXoGk5MyF9ErYlIHThQeQ6VMheTMNo5U920y+umT2AEAlaDGbuMToCW5 ivylj5gkJGlONMqnJ76KnGUfi0UKXAU= =Tyhc -----END PGP SIGNATURE----- --0eKj0QJTHrHYawjA1YSS8ppTu5zhG3quR-- From owner-freebsd-hackers@freebsd.org Thu May 28 16:50:32 2020 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 15B872F793B for ; Thu, 28 May 2020 16:50:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Xtx32yW1z3SGP; Thu, 28 May 2020 16:50:31 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 04SGoa1w077397 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 28 May 2020 09:50:43 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: Yuri Pankov , , In-Reply-To: From: Chris Reply-To: bsd-lists@BSDforge.com To: Baptiste Daroussin Subject: Re: diff(1) -N behaviour - Bug 233402 Date: Thu, 28 May 2020 09:50:43 -0700 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49Xtx32yW1z3SGP 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.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 16:50:32 -0000 On Thu, 28 May 2020 11:21:16 +0200 Baptiste Daroussin bapt@FreeBSD=2Eorg said > On 2020-05-28 08:26, Chris wrote: > > On Wed, 27 May 2020 11:06:52 +0200 Baptiste Daroussin bapt@FreeBSD=2Eorg= =20 > > said > >=20 > >> On Wed, May 27, 2020 at 08:52:38PM +1200, Fehmi Noyan ISI via=20 > >> freebsd-hackers > >> wrote: > >> > > > > On 23/05/2020, at 11:47 PM, Yuri Pankov > > wrote: > >> > > > > Fehmi Noyan ISI via freebsd-hackers wrote: > >> > >>> On 23/05/2020, at 11:21 PM, Yuri Pankov w= rote: > >> > >>> > >>> Fehmi Noyan ISI via freebsd-hackers wrote: > >> > >>>> Hiya > >> > >>>> Apparently, after we switched from GNU diff to BSD diff, the -N= flag > > no > >> > longer assumes absent files as empty=2E > >> > >>>> There is a bug report about GNU diff compatibility but when I l= ook > > at > >> > diff(1) man page, I see that not treating absent files as empty is > > intentional > >> > rather than a missing functionality=2E > >> > >>>> If this is not the case, I can work on patch to match to GNU di= ff > >> > behaviour, otherwise, this bug report can be closed I think=2E > >> > >>>> What=E2=80=99s your take on this? > >> > >>>> -N --new-file > >> > >>>> If a file is found in only one directory, act as if it was = found > >> > >>>> in the other directory too but was of zero size=2E > >> > >>>> man for GNU diff > >> > >>>> -N, --new-file > >> > >>>> treat absent files as empty > >> > >>> > >>> I think both descriptions say the same, i=2Ee=2E "zero size" = =3D=3D > > "empty=E2=80=9D? > >> > >> Maybe it=E2=80=99s my interpretation, but if you do not supply th= e second > >> > argument to diff(1), it complains > >> > >> $ echo =E2=80=9Ctest=E2=80=9D > a=2Etxt > >> > >> $ diff -N a=2Etxt nofile > >> > >> diff: nofile: No such file or directory > >> > >> $ > >> > >> GNU diff assumes an empty file for the missing second file and ma= kes > > the > >> > comparison > >> > >> $ echo =E2=80=9Ctest=E2=80=9D > a=2Etxt > >> > >> $ diff -N a=2Etxt nofile > >> > >> 1d0 > >> > >> < test > >> > >> $ > >> > > > > I must admit that I never used -N without -r, so it's probably= the > > only > >> > case that needs fixing? > >> > > > > $ mkdir a b > >> > > $ echo bar > a/foo > >> > > $ diff -ruN a b > >> > > diff -ruN a/foo b/foo > >> > > --- a/foo 2020-05-23 14:44:34=2E525932000 +0300 > >> > > +++ b/foo 1970-01-01 03:00:00=2E000000000 +0300 > >> > > @@ -1 +0,0 @@ > >> > > -bar > >> > > > > Took me a while to reply=E2=80=A6 > >> > With -N, GNU diff does not give an ENOENT > >> > > % echo foo > bar > >> > % diff bar nofile=2Etxt > >> > diff: nofile=2Etxt no such file or directory > >> > % diff -N bar nofile=2Etxt > >> > 1d0 > >> > < foo > >> > > Do we want BSD diff do the same, i=2Ee=2E match the -N functionality o= f GNU > >> > diff? > >> > Yes we do, > > Why? If someone wants a GNU diff=2E Can't they simply install it? If > > FreeBSD diff is to become like GNU diff, what's the point of having > > a FreeBSD version=2E > > Apologies in advance if I'm missing anything here=2E > >=20 >=20 > Because When I switched from GNU diff to BSD diff recently, the intent=20 > was to be mostly compatible with GNU diff (the one we had for very long,= =20 > not necessary the very latest version if it) it has been requested by=20 > many users to avoid breakage in most script and usage of diff people=20 > were having for a long time=2E >=20 > while what has been committed is not 100% compatible it is very close,=20 > and there is a file that documents what is missing from this=20 > implementation=2E >=20 > Now back to the -N the behaviour Fehmi is proposing to fix is a bug in=20 > what I did implement the intent as always been to get the behaviour he=20 > describes not the one we currently have=2E >=20 > Side note: the motivation for switching from GNU diff to BSD diff in=20 > base is the same as for the rest of the removal of the GNU components in= =20 > base: we cannot get any update because newer version are in GPLv3)=2E Thank you very much for taking the time to reply=2E That all makes perfect se= nse=2E Apologies for my ignorance, and thanks again=2E --Chris >=20 > Best regards, > Bapt From owner-freebsd-hackers@freebsd.org Thu May 28 17:07:31 2020 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 2DEDA2F777C for ; Thu, 28 May 2020 17:07:31 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49XvJg09f8z3TqV for ; Thu, 28 May 2020 17:07:30 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 04SH7e9X077689 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Thu, 28 May 2020 10:07:46 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: "freebsd-hackers@freebsd.org" In-Reply-To: From: Chris Reply-To: bsd-lists@BSDforge.com To: Eric McCorkle Subject: Re: Researching for proposals: trust and proactively-secure filesystems Date: Thu, 28 May 2020 10:07:46 -0700 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49XvJg09f8z3TqV 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.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2020 17:07:31 -0000 On Thu, 28 May 2020 08:38:03 -0400 Eric McCorkle eric@metricspace=2Enet said > Hello, >=20 > I'm gathering information for some proposals I'm working on that build > on the public-key trust system idea I proposed back in 2018 (which I > haven't been able to work on since, unfortunately)=2E I'm interested in > any feedback about feasibility=2E >=20 > (Assume there are sponsors and users interested in any features or > applications I describe, because there are=2E) >=20 > A bit of recap, the public-key trust system would provide a kernel-level > trust store which could serve as a system-wide root of trust, and would > be designed such that you could configure applications to use a kernel > device file as their CA certificate=2E The kernel would maintain a set of > trusted certificates, which could be established and revoked through > another device file interface=2E >=20 > In the original work, I just had the trust store maintain a list of > certificates with no private keys=2E This could be added, though=2E I > suggested this as future work, and pointed out that you could do some > interesting things like remote capability delegations=2E >=20 >=20 > The first concept is fairly straightforward: tie the public-key trust > system together with a hardware TPM=2E This would limit the cipher > selection to what TPMs support (no curve 25519), but seems otherwise > feasible to me=2E The "trust" device interface I described in my initial > work was essentially a software-emulated TPM in the kernel anyway=2E >=20 > How would this differ from a plain TPM device? Not terribly=2E The real > point of the trust system is to be an abstraction for what the system > does and does not trust=2E So the command interface would look more like > "create an attestation at this trust level", versus "sign with this > particular key"=2E In keeping with my original work, the goal is that the > kernel could issue non-forgeable authorization materials that could be > exported from the system and checked for validity later=2E >=20 >=20 > The second concept deals with filesystems, and particular ZFS (yes, I am > aware of existing ZFS encryption work)=2E ZFS is particularly interesting > because of its write-once structure=2E This potentially lets you use > ciphers/MACs with "one-shot" keys, such as chacha20/poly1305=2E It *also* > potentially lets you use distinct keys for each individual file=2E >=20 > That capability could allow you to grant fine-grained access to sets of > files=2E The use case here is that you can have different "access levels" > within an individual filesystem that can be turned on and off=2E (You can > accomplish this with FDE, but it's fairly awkward=2E) >=20 > If you tweak the virtual memory/filesystem interface a bit to load data > from the filesystem while still encrypted and decrypt it only on demand, > you can do away with the notion of turning access levels on at the > system-wide level=2E Here, each individual user either does or does not > have the right keys to access the data=2E (There's some interesting > possibilities here with secret-sharing: you could, for example, have > data that requires a specific *set* of authorizations to decrypt) >=20 > There is, of course, a possibility that an adversary could take > advantage of a kernel data leak in all these mechanisms=2E However, there > is a smaller window in which that is possible=2E >=20 > The theme in all of this is that you're essentially mediating access > through possession of keys as opposed to kernel access control (hence > the term "proactively secure") >=20 >=20 > Additionally, there's a possible scheme where you essentially view a > file as a one-way encrypted channel=2E You could generate two key-pairs, > create the session key, then destroy one side's public key and the other > side's private key=2E The material that gets saved to disk is the public > key and data encrypted with the session key=2E The other private key > serves as an access token=2E I personally can't think of an advantage of > this scheme over just saving a portion of a secret-shared symmetric key > to the disk, but that doesn't mean there isn't one=2E I think it's a wonderful concept=2E +1 on that=2E How much overhead do you suppose this might impose? Would your concept permit the ability to simply insert say a USB device (stick) with the required material, and be done with it? IOW require no additional effort/action(s) on the administrators part? Thanks for taking something like this on! I think it's a great idea=2E --Chris From owner-freebsd-hackers@freebsd.org Fri May 29 09:13:06 2020 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 97A45333860 for ; Fri, 29 May 2020 09:13:06 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:300:2185:123::1]) (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 49YJkp3RdPz4MR3; Fri, 29 May 2020 09:13:06 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [104.207.135.49]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 04T9CpFL001256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 29 May 2020 10:12:51 +0100 (BST) (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 04T9CoJ1001254; Fri, 29 May 2020 10:12:50 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202005290912.04T9CoJ1001254@donotpassgo.dyslexicfish.net> Date: Fri, 29 May 2020 10:12:50 +0100 Organization: Dyslexic Fish To: bsd-lists@bsdforge.com, bapt@freebsd.org Cc: ypankov@fastmail.com, freebsd-hackers@freebsd.org, fnoyanisi@yahoo.com Subject: Re: diff(1) -N behaviour - Bug 233402 References: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [104.207.135.49]); Fri, 29 May 2020 10:12:51 +0100 (BST) X-Rspamd-Queue-Id: 49YJkp3RdPz4MR3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0::/38, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 09:13:06 -0000 Baptiste Daroussin wrote: > Because When I switched from GNU diff to BSD diff recently, the intent > was to be mostly compatible with GNU diff (the one we had for very long, > not necessary the very latest version if it) it has been requested by > many users to avoid breakage in most script and usage of diff people > were having for a long time. I reported another breakage (and fix) back in early March: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244533 Cheers, Jamie From owner-freebsd-hackers@freebsd.org Fri May 29 09:16:03 2020 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 DCACB333E37 for ; Fri, 29 May 2020 09:16:03 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (static-108-31-38-18.washdc.fios.verizon.net [108.31.38.18]) by mx1.freebsd.org (Postfix) with ESMTP id 49YJpB65xZz4Mn3 for ; Fri, 29 May 2020 09:16:02 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:ca3f] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:ca3f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id A0D19C501 for ; Fri, 29 May 2020 09:15:56 +0000 (UTC) To: freebsd-hackers@freebsd.org References: From: Eric McCorkle Autocrypt: addr=eric@metricspace.net; prefer-encrypt=mutual; keydata= mDMEXonLJBYJKwYBBAHaRw8BAQdA4oHU11A8qtqD0EtRofyORHbGX1ZIT/mnk9eceKQx56q0 JEVyaWMgTWNDb3JrbGUgPGVyaWNAbWV0cmljc3BhY2UubmV0PoiZBBMWCABBAhsDBQkB4TOA BQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEEPfuJobsx0Me4pIwLPOOjZtwQVqwFAl6JzIAC GQEACgkQPOOjZtwQVqy2DgD+IRCNNfb7C16fjEHazDMBwmBIMz+CTJUdhoz73P9iy0cA/ixK 83qOW46q1fpCpaZtPvv0FRpcZ5EppnNQ0Yuh40YLuDgEXonLJBIKKwYBBAGXVQEFAQEHQCxw rRXlvDoXgDGv2WMrLy9UaJ4fNWXIdlaiiKZIH7lBAwEIB4h+BBgWCAAmFiEEPfuJobsx0Me4 pIwLPOOjZtwQVqwFAl6JyyQCGwwFCQHhM4AACgkQPOOjZtwQVqxS7wD+JgzZC4995EL9j2iB qhPUZTIgs61IypLoDx+o1zsSfvkBALs+/jvkQL4plT0hGtfFaa0iMnLeIXKd/1FSNGSD9hQI Subject: Re: Researching for proposals: trust and proactively-secure filesystems Message-ID: <210b23c9-25f0-d965-ba23-34f459b93fe2@metricspace.net> Date: Fri, 29 May 2020 05:15:50 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NJYZub5r4a41BwEybGsEd8ZxoBkeqYSvN" X-Rspamd-Queue-Id: 49YJpB65xZz4Mn3 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of eric@metricspace.net has no SPF policy when checking 108.31.38.18) smtp.mailfrom=eric@metricspace.net X-Spamd-Result: default: False [-1.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.52)[-0.522]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; HAS_ATTACHMENT(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.12)[0.122]; DMARC_NA(0.00)[metricspace.net]; NEURAL_SPAM_SHORT(0.40)[0.405]; SIGNED_PGP(-2.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; ASN(0.00)[asn:701, ipnet:108.31.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 09:16:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NJYZub5r4a41BwEybGsEd8ZxoBkeqYSvN Content-Type: multipart/mixed; boundary="iyC7gOlMvBqBcWzw4AZeXPJqo2xNSRnax"; protected-headers="v1" From: Eric McCorkle To: freebsd-hackers@freebsd.org Message-ID: <210b23c9-25f0-d965-ba23-34f459b93fe2@metricspace.net> Subject: Re: Researching for proposals: trust and proactively-secure filesystems References: In-Reply-To: --iyC7gOlMvBqBcWzw4AZeXPJqo2xNSRnax Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 5/28/20 1:07 PM, Chris wrote: > I think it's a wonderful concept. +1 on that. > How much overhead do you suppose this might impose? I don't imagine it would be much, just the usual cost of disk encryption. If you're decrypting disk pages only on demand and purging them from memory when done, that would impose some cost, but presumably anyone with that level of security needs wouldn't care. > Would your concept permit the ability to simply insert say a USB device= > (stick) with the required material, and be done with it? IOW require no= > additional effort/action(s) on the administrators part? That would be one way of doing it. Given the level of security implied by these proposals, I'd imagine you'd want the actual cryptographic material to reside on some kind of smart card or HSM. I could see the public key technique I described being used to unlock a credential store.= > Thanks for taking something like this on! I think it's a great idea. To be clear, these are ideas for an R&D proposal I'm developing. There's no guarantee it will be funded. --iyC7gOlMvBqBcWzw4AZeXPJqo2xNSRnax-- --NJYZub5r4a41BwEybGsEd8ZxoBkeqYSvN Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQ9+4mhuzHQx7ikjAs846Nm3BBWrAUCXtDSzAAKCRA846Nm3BBW rMAFAQDigkQJXVtq+hDqK7JFwcw6IiQ7j4Sv8SF2DDDjwGzKsQD/QC+t6iB2a79o BfaajCwehl7tFlkJGp6d5Df5f5921gg= =LERZ -----END PGP SIGNATURE----- --NJYZub5r4a41BwEybGsEd8ZxoBkeqYSvN-- From owner-freebsd-hackers@freebsd.org Fri May 29 09:38:57 2020 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 AA7D3334708 for ; Fri, 29 May 2020 09:38:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YKJd3nQPz4Q0T; Fri, 29 May 2020 09:38:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from ivaldir.etoilebsd.net (etoilebsd.net [178.32.217.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 5B0DB2DEF0; Fri, 29 May 2020 09:38:57 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by ivaldir.etoilebsd.net (Postfix, from userid 1001) id 8D066D7DF8; Fri, 29 May 2020 11:38:25 +0200 (CEST) Date: Fri, 29 May 2020 11:38:25 +0200 From: Baptiste Daroussin To: Jamie Landeg-Jones Cc: bsd-lists@bsdforge.com, ypankov@fastmail.com, freebsd-hackers@freebsd.org, fnoyanisi@yahoo.com Subject: Re: diff(1) -N behaviour - Bug 233402 Message-ID: <20200529093825.iudsjzkjpkvr72x2@ivaldir.net> References: <3df104a8139d5252b3426ae1600bfc86@udns.ultimatedns.net> <202005290912.04T9CoJ1001254@donotpassgo.dyslexicfish.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="a37koqsmdg2zvzed" Content-Disposition: inline In-Reply-To: <202005290912.04T9CoJ1001254@donotpassgo.dyslexicfish.net> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 09:38:57 -0000 --a37koqsmdg2zvzed Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 29, 2020 at 10:12:50AM +0100, Jamie Landeg-Jones wrote: > Baptiste Daroussin wrote: >=20 > > Because When I switched from GNU diff to BSD diff recently, the intent= =20 > > was to be mostly compatible with GNU diff (the one we had for very long= ,=20 > > not necessary the very latest version if it) it has been requested by= =20 > > many users to avoid breakage in most script and usage of diff people=20 > > were having for a long time. >=20 > I reported another breakage (and fix) back in early March: https://bugs.f= reebsd.org/bugzilla/show_bug.cgi?id=3D244533 >=20 Thank you, sorry I missed it I will have a look asap. Best regards, Bapt --a37koqsmdg2zvzed Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAl7Q2BEACgkQY4mL3PG3 PlooshAAi0rT/zzfDwdmvQ+WcLzenBGUCP9XGO7Ou5iT0p/3bq3gQkUy90+Rz4lF /O3GxJFLBCp/UMDiPrizsHRl5WaBZ++Lh9pf3cI4F6632YxCSZNON09wbMsbTLHN ZPOOGDV8BsVdrVuKJ7VUC1vOV/nYjAFwwEt74OIO0OBCVOLsWe/CFjAGuLnJfKRm cgd4DOHXVc4us8TED99jtr9R2hAHrZQ22AuSsq72CNOSDeh/GBc+5FgEWiKfRT7l 5JWtfC/nik0zrzOIkOrx/wAt+Q0lX3/o7Hjhy/Bjp9BOO0NM1R5Ngr4JljrlhOQb YJnA3X+yR8ClJFzKYVWM+9T8KxJtXnTKC5RHbH63l2x4HS37bSZZz1WcI87246Mr l6TUc+9tmnQ8qw81JmMSlUc2h+YdbpiJNaNXhOkiBHeMXwQVw2+D9MYi7Mo66s6d k04VOBX9spnEgsy/Hmt0rWi2DgGAsVg23yVvgsWtEcFpHFkhOVnWW2uGPx+PZMLs QaGO/x1kIGIjBSElGTSWrjPLipFa+qWXH5D/nj8dPde/V5SnFrobD0329iClPbrW nTL6aiL4PC2INe6b0nD80PEnMUWYoQwb+Ldk1EZU8Dma+olWZ2X/UzIhPxb/wb69 dy+9bDTeU1oMtAueTyCu+HafpBHrCeoI50TMkHKiNxfZeH/RTz8= =pAV1 -----END PGP SIGNATURE----- --a37koqsmdg2zvzed-- From owner-freebsd-hackers@freebsd.org Fri May 29 12:57:41 2020 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 60CA733857C for ; Fri, 29 May 2020 12:57:41 +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 49YPjv2Z7Vz3S12 for ; Fri, 29 May 2020 12:57:39 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 04TCvPuX014054 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 May 2020 12:57:26 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: Received: from [10.58.0.10] (dadv@dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 04TCvOTU030515 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 29 May 2020 19:57:24 +0700 (+07) (envelope-from eugen@grosbein.net) To: Freebsd hackers list From: Eugene Grosbein Subject: Introduce ifconfig -a -g groupname Message-ID: Date: Fri, 29 May 2020 19:57:23 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, 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_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 49YPjv2Z7Vz3S12 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [1.57 / 15.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.75)[0.752]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[grosbein.net]; NEURAL_SPAM_MEDIUM(0.30)[0.302]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; R_SPF_PERMFAIL(0.00)[empty SPF record]; NEURAL_SPAM_LONG(0.61)[0.614]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 12:57:41 -0000 Hi! Currently "ifconfig -a" command that shows status of network interfaces may be combined with flags -d or -u to limit the list to interfaces that are down or up. The change https://reviews.freebsd.org/D25029 allows it to filter the list by name of interface group with additional flag -g groupname, or -g ^groupname to negate condition (this is different from "ifconfig -g groupname" that shows interface names only and that behaviour is not affected with the change). I chose caret symbol (^) was choosen to ease both scripted and interactive usage so it does not require extra quotation/escaping, but was told that caret would require escaping in the zsh. So I ask for suggestions which symbol to choose instead of caret. Benedict Reuschling suggested @ and I'm fine with it if we don't care about Perl code that would require escaping it when running shell code. For thouse who interested, these are supposed usage examples: to exclude loopback from the list: ifconfig -a -g ^lo to show vlan interfaces only: ifconfig -a -g vlan to show tap interfaces that are up: ifconfig -aug tap From owner-freebsd-hackers@freebsd.org Fri May 29 13:09:26 2020 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 D0EC4338B6D for ; Fri, 29 May 2020 13:09:26 +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 49YPzT6bPJz3SxZ for ; Fri, 29 May 2020 13:09:25 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 04TD9D1V014192 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 May 2020 13:09:14 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: david@catwhisker.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 04TD9DPY030590 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 29 May 2020 20:09:13 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: Introduce ifconfig -a -g groupname To: David Wolfskill , Freebsd hackers list References: <20200529130317.GP1196@albert.catwhisker.org> From: Eugene Grosbein Message-ID: Date: Fri, 29 May 2020 20:09:08 +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: <20200529130317.GP1196@albert.catwhisker.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, 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_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 49YPzT6bPJz3SxZ X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-1.69 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.56)[-0.558]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.95)[-0.949]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_PERMFAIL(0.00)[empty SPF record]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.08)[-0.083]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 13:09:26 -0000 29.05.2020 20:03, David Wolfskill wrote: > Just a quick note before I wake up Spouse to go for a bike ride: I > suggest using ! for negation -- and yes, I realize it would need to be > escaped; I use /bin/csh as my login shell. > > But I'm used to escapiing !; I expect it. So it's part of my "muscle > memory" (and thus, not that big a deal). > > And (IMO) clarity is paramount. :-) > > (I'll try to update the comments in teh review to indicate the above, so > others can react as they see fit.) Interactive usage when you see results and errors immediately is one part only. Other part is scripting, especially nested like: ssh ... 'sudo command "arg1 arg2 args3"' where extra escaping sometimes becomes real PITA. I really like to avoid it. From owner-freebsd-hackers@freebsd.org Fri May 29 13:15:13 2020 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 3716E338F2C for ; Fri, 29 May 2020 13:15:13 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YQ690XDHz3TWM for ; Fri, 29 May 2020 13:15:13 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1471) id 0B2644ECB; Fri, 29 May 2020 13:15:13 +0000 (UTC) Date: Fri, 29 May 2020 15:15:11 +0200 From: Daniel Ebdrup Jensen To: Freebsd hackers list Subject: Re: Introduce ifconfig -a -g groupname Message-ID: <20200529131511.gwahkbg6j7bp33d3@nerd-thinkpad.local> Mail-Followup-To: Daniel Ebdrup Jensen , Freebsd hackers list References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="4zqp7ursyypken3p" Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 13:15:13 -0000 --4zqp7ursyypken3p Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 29, 2020 at 07:57:23PM +0700, Eugene Grosbein wrote: >Hi! > >Currently "ifconfig -a" command that shows status of network interfaces >may be combined with flags -d or -u to limit the list to interfaces that a= re down or up. > >The change https://reviews.freebsd.org/D25029 allows it to filter the list >by name of interface group with additional flag -g groupname, or -g ^group= name to negate condition >(this is different from "ifconfig -g groupname" that shows interface names= only >and that behaviour is not affected with the change). > >I chose caret symbol (^) was choosen to ease both scripted and interactive= usage >so it does not require extra quotation/escaping, but was told >that caret would require escaping in the zsh. > >So I ask for suggestions which symbol to choose instead of caret. >Benedict Reuschling suggested @ and I'm fine with it >if we don't care about Perl code that would require escaping it when runni= ng shell code. > >For thouse who interested, these are supposed usage examples: > >to exclude loopback from the list: > ifconfig -a -g ^lo >to show vlan interfaces only: > ifconfig -a -g vlan >to show tap interfaces that are up: > ifconfig -aug tap >_______________________________________________ >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" Hi Eugene, There is at least some precedence for using @, because it is used to popula= te=20 SES information into /dev; see the example below: stat -s /dev/enc@n5006048005f1ebbe/type@0/slot@f/da11 [snip irrelevant information] So I don't mind it at all, and in fact look forward to it. :) Yours, Daniel Ebdrup Jensen --4zqp7ursyypken3p Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAl7RCt9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87rkVQgAhgvbpUgQlOsG50bvDYtxlaE0QPLu8m8NQGJVK9Yzn2TE2FiQzrriicel pLUekzHR5HZQPW0DGbbDn8qznEfZ9xqRlNpZWW902BuPtm615s9GCJbMzlAyAIuA 6dIujM7ydYPghz6QVS4/y47kthOtAk/0+o3p/ostSOTUpkdf9zv0HvEoLKxDOtVO QbwM30j/SSvyyaa/kI0maPaW/lvxAkbTuYNBS8PlHPQTbfN2lkTPg8kX8rBVtI4O i3eQEakaOH/WGUhSt/M4+H3l5tZH/y2NA0B+FzKd4pvn/j2cTpui0eIiCNemnCBd ihbkBprrFg4Y4Y1tq36zM0ADBtWAkQ== =jEF8 -----END PGP SIGNATURE----- --4zqp7ursyypken3p-- From owner-freebsd-hackers@freebsd.org Fri May 29 17:39:15 2020 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 E2F6533DBA5 for ; Fri, 29 May 2020 17:39:15 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (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 49YWyq3FWsz46wP for ; Fri, 29 May 2020 17:39:15 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1590773953; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=nZ4J28g071wV3fySPRbusHBkvQG7VD5KXuPB35znEtzOcMi/BWR6mxtRUSyI7UZ4sg0/0/4faMeCh 20jpuzS9qYA+26xrmZxBbfT6l8bePBCoQhV8eL9Ty2p758gl0degA6iVuhzZLRldpIbol9hqT0/Uex TxX1r4XQWXCRgqZtuCLAh9VGppNclounVZ2UtglmX5Z8qLU50YaYqW1G0qQ7NHxcNQa6cHO877MP9R HiwgkNgG9YBn7JySo2PbJ0BL1AVQQ2uC1JGSqOUnAW7JpEvlCFvr5UClJXC5EEXpYlRrZzjbgioQCJ 8jIC/J4RpjTs8YlhG8UwA5kjQHipKVQ== 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=05JXMmekUGCLBU4zvWJEQEvo1PC42xVlBENHMD674jY=; b=b4sTU4YC1YX7QT0Rb0WyZY4rHVRpjKzdLVcJle0jqOZJYzmmvfC8oMJo9I2Vhr0bWE7arF1QtkeCU M+PWJuZIpk78UCkGJzQDvLc5iIxndSKvEPCLR5rBNVmin54hjVQAKEbrl4wsyHkIGE7ozjVFTAAn/g +Sxoay6TJ37AT9mifQJqZw/6cyz6DJBh/RYZq6BXJP9q3IFIQevQk9M6xbSM36rb4xpKNydAucOXbo QkLcHE87mvfh0EGMoJGRA7X5l10EM8x84/FaV97ZLnsD78/2yBJAdbxoi5MWxYjARpRgkDN0dAvI5I D2axM9uzwKA2M3REy3tyclVNgbDqoCA== 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:to:from:subject:message-id:from; bh=05JXMmekUGCLBU4zvWJEQEvo1PC42xVlBENHMD674jY=; b=BXd2rmDsxvqV9o6EtNV3MSnpkSqAu1oZhpa7RMjpqv4zsw0nWQLRzK8cDDT2ATS3IL/RJW0wsQBwk aW88Rr4jAEFlMd/ym7B2VTGf4knVJelKl0OUJsHy0FPDFqg+QlQS4c4i+Uqop+/4cIUF2DBfDDYejU y6sUKQryY5DWuoOKreO1QwlTO6SbLHIUO76j8Kg1tl55t8N37yYLnbcQ3M8LELUvUvNmUyR6jf8sNf loovuRjch5o3NFJedw9NJ3QSKxNwvA+RO6Ebw18RvtzUQpuBLQw5GkC4dcydtupzWSvvLrvJJLCUrI wZAxOWYD60a28uInCHjZ+LI/Fx67vGg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 4d0998e5-a1d3-11ea-a067-6d02e42e573a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 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 4d0998e5-a1d3-11ea-a067-6d02e42e573a; Fri, 29 May 2020 17:39:12 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 04THd8iV049452; Fri, 29 May 2020 11:39:08 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1bb658e41c849e9ea2c623ffdc70b0b934d4053d.camel@freebsd.org> Subject: Re: Introduce ifconfig -a -g groupname From: Ian Lepore To: Eugene Grosbein , Freebsd hackers list Date: Fri, 29 May 2020 11:39:08 -0600 In-Reply-To: References: Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49YWyq3FWsz46wP 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.148.0.0/15, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 17:39:15 -0000 On Fri, 2020-05-29 at 19:57 +0700, Eugene Grosbein wrote: > Hi! > > Currently "ifconfig -a" command that shows status of network > interfaces > may be combined with flags -d or -u to limit the list to interfaces > that are down or up. > > The change https://reviews.freebsd.org/D25029 allows it to filter the > list > by name of interface group with additional flag -g groupname, or -g > ^groupname to negate condition > (this is different from "ifconfig -g groupname" that shows interface > names only > and that behaviour is not affected with the change). > > I chose caret symbol (^) was choosen to ease both scripted and > interactive usage > so it does not require extra quotation/escaping, but was told > that caret would require escaping in the zsh. > > So I ask for suggestions which symbol to choose instead of caret. > Benedict Reuschling suggested @ and I'm fine with it > if we don't care about Perl code that would require escaping it when > running shell code. > > For thouse who interested, these are supposed usage examples: > > to exclude loopback from the list: > ifconfig -a -g ^lo > to show vlan interfaces only: > ifconfig -a -g vlan > to show tap interfaces that are up: > ifconfig -aug tap > An @ to express negation is insane. The only characters that have some precedent for meaning negation are ~ and !. Escaping is a fact of life, asking people to remember crazy things like @ meaning not is far more onerous than occasionally needing to put quotes or escapes on something. -- Ian From owner-freebsd-hackers@freebsd.org Fri May 29 17:49:54 2020 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 0CF5A33E00E for ; Fri, 29 May 2020 17:49:54 +0000 (UTC) (envelope-from joe@via.net) Received: from smtp1.via.net (smtp1.via.net [157.22.3.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "via.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YXC508fmz480H for ; Fri, 29 May 2020 17:49:52 +0000 (UTC) (envelope-from joe@via.net) Received: from [209.81.2.65] ([209.81.2.65]) by smtp1.via.net (8.15.2/8.14.1-VIANET) with ESMTPS id 04THnpFd021818 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 29 May 2020 10:49:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.97.3 at smtp1.via.net From: joe mcguckin 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: Request: show interfaces Message-Id: Date: Fri, 29 May 2020 10:49:40 -0700 To: Freebsd hackers list X-Mailer: Apple Mail (2.3445.104.11) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (smtp1.via.net [157.22.3.5]); Fri, 29 May 2020 10:49:51 -0700 (PDT) X-Rspamd-Queue-Id: 49YXC508fmz480H X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of joe@via.net designates 157.22.3.5 as permitted sender) smtp.mailfrom=joe@via.net X-Spamd-Result: default: False [-1.46 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; NEURAL_SPAM_SHORT(0.38)[0.379]; NEURAL_HAM_MEDIUM(-0.92)[-0.924]; FROM_HAS_DN(0.00)[]; MV_CASE(0.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[via.net]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.01)[-1.012]; TO_DN_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+MX]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7091, ipnet:157.22.0.0/16, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[157.22.3.5:from] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 17:49:54 -0000 It=E2=80=99s always bugged me that Unix doesn=E2=80=99t show as much = information as a typical router=20 does about ethernet interface statistics. What we really need is the equivalent of Cisco =E2=80=99show = interface=E2=80=99 This shows the bit rate, packet rate, count, all the various type of = errors, etc. Cisco allows a description field to be set for each interface, and that = shows up also in a =E2=80=99show int=E2=80=99 output. I think these would be great features, considering how ofter FreeBSD is = used for routers and firewalls. Thanks, Joe Joe McGuckin ViaNet Communications joe@via.net 650-207-0372 cell 650-213-1302 office 650-969-2124 fax From owner-freebsd-hackers@freebsd.org Fri May 29 18:35:37 2020 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 CD26133EA61 for ; Fri, 29 May 2020 18:35:37 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YYCs4vQZz4CH4 for ; Fri, 29 May 2020 18:35:37 +0000 (UTC) (envelope-from debdrup@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1471) id A0A5CF5F7; Fri, 29 May 2020 18:35:37 +0000 (UTC) Date: Fri, 29 May 2020 20:35:35 +0200 From: Daniel Ebdrup Jensen To: Freebsd hackers list Subject: Re: Request: show interfaces Message-ID: <20200529183535.6lm4xk6pkq7n25do@nerd-thinkpad.local> Mail-Followup-To: Daniel Ebdrup Jensen , Freebsd hackers list References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j6zkxdhjqcnqdc3v" Content-Disposition: inline In-Reply-To: X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 18:35:37 -0000 --j6zkxdhjqcnqdc3v Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 29, 2020 at 10:49:40AM -0700, joe mcguckin wrote: >It=E2=80=99s always bugged me that Unix doesn=E2=80=99t show as much infor= mation as a typical router >does about ethernet interface statistics. > >What we really need is the equivalent of Cisco =E2=80=99show interface=E2= =80=99 > >This shows the bit rate, packet rate, count, all the various type of error= s, etc. > >Cisco allows a description field to be set for each interface, and that sh= ows up also in a =E2=80=99show int=E2=80=99 output. > >I think these would be great features, considering how ofter FreeBSD is us= ed for routers and firewalls. > >Thanks, > >Joe > > >Joe McGuckin >ViaNet Communications > >joe@via.net >650-207-0372 cell >650-213-1302 office >650-969-2124 fax > > > >_______________________________________________ >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" Hi Joe, FreeBSD, and other Unix-likes historically, exposes this differently from h= ow=20 it's available on IOS (and not even IOS is consistent about OID namespacing= ),=20 which tends to have a more CLI based approach than a real vty; this is of= =20 course a matter of preference, but I think I'm partial to a vty rather than= a CLI. For FreeBSD, most of the information you're seeking is available via 'sysct= l -a'=20 where you can often grep the dev..%d.mac_stats. namespace for the v= arious counts - from which you can figure a rate by dividing into number of=20 seconds and assuming an IMIX distribution, unless you know your distributio= n to=20 be, also get a rough count of the actual bandwidth. If you need more detail= ed=20 information there's either the SIFTR(4) framework or dtrace (though at leas= t the=20 latter has quite noticable probe effect if you're tracing individual packet= s) if you aren't using a firewall. There's also a lot of additional information available, at least if you're= =20 running ipfw. I can't speak to pf, but I'd be surprised if it's lacking. There's also information about the physical hardware itself available in in= =20 'pciconf -BcelvV' - although I imagine this might depend on the hardware it= self=20 to some degree. Hope this helps, because I think I might not be the only one that doesn't l= ike=20 the CLI-ification of a certain piece of opensource software. :) Yours, Daniel Ebdrup Jensen --j6zkxdhjqcnqdc3v Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAABCgB9FiEEDonNJPbg/JLIMoS6Ps5hSHzN87oFAl7RVfdfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDBF ODlDRDI0RjZFMEZDOTJDODMyODRCQTNFQ0U2MTQ4N0NDREYzQkEACgkQPs5hSHzN 87pVBAf/aGlYbAsEY+X8CyAjS3+rff1/nm/VCOo/dNSNV672QA8DcHBamROGdrD8 DEe+zGbjCAX70hY/wrGGnrWqN3pxG6MXmWtKykuMp2allTwGl3c8rcR3SIO/T+KB pXcsUnld0PY2a4ERUDqPD1svf3bnaXUQ6/oi6kvMxTfuxZItkOX0N2g9P814j/gs jY9CbKzjdV4CkWclmPFJMRXee1jmIEjYI8FSqs8UmEIdGsTaGhWJwrtBjFf6xlRw Bq9EawWdnpuUriNjCUSk13I7biZDhSF3efK0jVOmsOeR963PT+2MOoodgPK7Y4Op FBXrrkyp7io4RWonczVjv80B1Vz/BQ== =ylE7 -----END PGP SIGNATURE----- --j6zkxdhjqcnqdc3v-- From owner-freebsd-hackers@freebsd.org Fri May 29 18:42:34 2020 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 EA0F333EB57 for ; Fri, 29 May 2020 18:42:34 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (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 49YYMt222Sz4DR5; Fri, 29 May 2020 18:42:33 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 04TIgPcK099580; Fri, 29 May 2020 11:42:25 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 04TIgPJC099579; Fri, 29 May 2020 11:42:25 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202005291842.04TIgPJC099579@gndrsh.dnsmgr.net> Subject: Re: Introduce ifconfig -a -g groupname In-Reply-To: <1bb658e41c849e9ea2c623ffdc70b0b934d4053d.camel@freebsd.org> To: Ian Lepore Date: Fri, 29 May 2020 11:42:25 -0700 (PDT) CC: Eugene Grosbein , Freebsd hackers list X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49YYMt222Sz4DR5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; REPLY(-4.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 18:42:35 -0000 > On Fri, 2020-05-29 at 19:57 +0700, Eugene Grosbein wrote: > > Hi! > > > > Currently "ifconfig -a" command that shows status of network > > interfaces > > may be combined with flags -d or -u to limit the list to interfaces > > that are down or up. > > > > The change https://reviews.freebsd.org/D25029 allows it to filter the > > list > > by name of interface group with additional flag -g groupname, or -g > > ^groupname to negate condition > > (this is different from "ifconfig -g groupname" that shows interface > > names only > > and that behaviour is not affected with the change). > > > > I chose caret symbol (^) was choosen to ease both scripted and > > interactive usage > > so it does not require extra quotation/escaping, but was told > > that caret would require escaping in the zsh. > > > > So I ask for suggestions which symbol to choose instead of caret. > > Benedict Reuschling suggested @ and I'm fine with it > > if we don't care about Perl code that would require escaping it when > > running shell code. > > > > For thouse who interested, these are supposed usage examples: > > > > to exclude loopback from the list: > > ifconfig -a -g ^lo > > to show vlan interfaces only: > > ifconfig -a -g vlan > > to show tap interfaces that are up: > > ifconfig -aug tap > > > > An @ to express negation is insane. The only characters that have some > precedent for meaning negation are ~ and !. And perhaps the original ^, for me anyway. > Escaping is a fact of life, asking people to remember crazy things like > @ meaning not is far more onerous than occasionally needing to put > quotes or escapes on something. Agree with that fully. I actually do not like special tokens in arguments to options, and prefer the suggested use of a different option for exclude, as in -G vlan to exclude gruop vlan. I can not think of a command of the top of my head that does exclusion by special token in option argument and can think of many with --include --exclude type options. > -- Ian -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-hackers@freebsd.org Fri May 29 19:01:35 2020 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 75B8933F5A0 for ; Fri, 29 May 2020 19:01:35 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (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 49YYnp1GXKz4Fxk for ; Fri, 29 May 2020 19:01:33 +0000 (UTC) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 04TJ1WNS099678; Fri, 29 May 2020 12:01:32 -0700 (PDT) (envelope-from freebsd-rwg@gndrsh.dnsmgr.net) Received: (from freebsd-rwg@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 04TJ1WPc099677; Fri, 29 May 2020 12:01:32 -0700 (PDT) (envelope-from freebsd-rwg) From: "Rodney W. Grimes" Message-Id: <202005291901.04TJ1WPc099677@gndrsh.dnsmgr.net> Subject: Re: Request: show interfaces In-Reply-To: To: joe mcguckin Date: Fri, 29 May 2020 12:01:32 -0700 (PDT) CC: Freebsd hackers list X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 49YYnp1GXKz4Fxk X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd-rwg@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd-rwg@gndrsh.dnsmgr.net X-Spamd-Result: default: False [1.85 / 15.00]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.33)[0.332]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.54)[0.536]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_SPAM_LONG(0.08)[0.077]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 19:01:35 -0000 > It?s always bugged me that Unix doesn?t show as much information as a typical router > does about ethernet interface statistics. > > What we really need is the equivalent of Cisco ?show interface? One could write that, or enhance bird or frr to have additional output in there show interfaces command. Bird is a bit sparse: rgrimes {1001}% birdc show interfaces BIRD 1.5.0 ready. vmx0 up (index=1) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 64.62.249.151/27 (Primary, scope univ) vmx1 DOWN (index=2) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 vmx2 up (index=3) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 10.4.0.4/24 (Primary, scope site) Infact an ifconfig -a gives you at least the negotiated interface rate in addition to some other fields. > > This shows the bit rate, packet rate, count, all the various type of errors, etc. By bit rate do you mean interface configured bit rate, or bit rate over last short interval? Cisco shows both, short interval being 5 minutes. BSD ifconfig shows former. Adding some of the Cisco like stats would not be hard, and possibly useful, especially for me the Input queue size/max/drops/flushes, though much of that may be very device specific due to offload. > > Cisco allows a description field to be set for each interface, and that shows up also in a ?show int? output. That feature already exists, see ifconfig(8) "description value". > I think these would be great features, considering how ofter FreeBSD is used for routers and firewalls. ifconfig --format=cisco -a ?? > Thanks, > Joe > Joe McGuckin -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-hackers@freebsd.org Fri May 29 20:37:19 2020 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 03C2E2F0D95 for ; Fri, 29 May 2020 20:37:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ultimatedns.net", Issuer "Let's Encrypt Authority X3" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49YbwF4pV6z4NDN; Fri, 29 May 2020 20:37:16 +0000 (UTC) (envelope-from bsd-lists@BSDforge.com) Received: from udns.ultimatedns.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by udns.ultimatedns.net (8.15.2/8.15.2) with ESMTPS id 04TKbRlU075428 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Fri, 29 May 2020 13:37:34 -0700 (PDT) (envelope-from bsd-lists@BSDforge.com) X-Mailer: Cypht MIME-Version: 1.0 Cc: Eugene Grosbein , Ian Lepore , In-Reply-To: <202005291842.04TIgPJC099579@gndrsh.dnsmgr.net> From: Chris Reply-To: bsd-lists@BSDforge.com To: "Rodney W. Grimes" Subject: Re: Introduce ifconfig -a -g groupname Date: Fri, 29 May 2020 13:37:33 -0700 Message-Id: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49YbwF4pV6z4NDN 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.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 20:37:19 -0000 On Fri, 29 May 2020 11:42:25 -0700 (PDT) Rodney W=2E Grimes freebsd-rwg@gndrs= h=2Ednsmgr=2Enet said > > On Fri, 2020-05-29 at 19:57 +0700, Eugene Grosbein wrote: > > > Hi! > > >=20 > > > Currently "ifconfig -a" command that shows status of network > > > interfaces > > > may be combined with flags -d or -u to limit the list to interfaces > > > that are down or up=2E > > >=20 > > > The change https://reviews=2Efreebsd=2Eorg/D25029 allows it to filter the > > > list > > > by name of interface group with additional flag -g groupname, or -g > > > ^groupname to negate condition > > > (this is different from "ifconfig -g groupname" that shows interface > > > names only > > > and that behaviour is not affected with the change)=2E > > >=20 > > > I chose caret symbol (^) was choosen to ease both scripted and > > > interactive usage > > > so it does not require extra quotation/escaping, but was told > > > that caret would require escaping in the zsh=2E > > >=20 > > > So I ask for suggestions which symbol to choose instead of caret=2E > > > Benedict Reuschling suggested @ and I'm fine with it > > > if we don't care about Perl code that would require escaping it when > > > running shell code=2E > > >=20 > > > For thouse who interested, these are supposed usage examples: > > >=20 > > > to exclude loopback from the list: > > > =09ifconfig -a -g ^lo > > > to show vlan interfaces only: > > > =09ifconfig -a -g vlan > > > to show tap interfaces that are up: > > > =09ifconfig -aug tap > > >=20 > >=20 > > An @ to express negation is insane=2E The only characters that have some > > precedent for meaning negation are ~ and !=2E >=20 > And perhaps the original ^, for me anyway=2E >=20 > > Escaping is a fact of life, asking people to remember crazy things like > > @ meaning not is far more onerous than occasionally needing to put > > quotes or escapes on something=2E >=20 > Agree with that fully=2E >=20 > I actually do not like special tokens in arguments to options, > and prefer the suggested use of a different option for exclude, > as in -G vlan to exclude gruop vlan=2E >=20 > I can not think of a command of the top of my head that does > exclusion by special token in option argument and can think > of many with --include --exclude type options=2E FWIW I'd like to add a +100% on this=2E It just somehow seems an awful lot more intuitive=2E --Chris >=20 > > -- Ian > --=20 > Rod Grimes =20 > rgrimes@freebsd=2Eorg > _______________________________________________ > freebsd-hackers@freebsd=2Eorg mailing list > https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd=2Eorg= " From owner-freebsd-hackers@freebsd.org Fri May 29 21:24:09 2020 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 6355D2F147C for ; Fri, 29 May 2020 21:24:09 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (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 49YcyJ6hkwz4Qw8 for ; Fri, 29 May 2020 21:24:08 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1590787447; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=FKrIOX9e96sF8Oqlcp+iXQRloAwwZVFPcFxc9xz23a0bPU9+0Ki5LSRPt3idFMgZuBmkqIR4dnXmX +E1Ils1Z/r9cH9rz/zqRRvIsS5sgkFE5o0t7g0CiYiVHWA1Tj66lt3kNJHBhtwiokoHjsyQpJ/aJb+ 9+G2657HuCbB3icG90P7PUXD8KQt0xcVDWUDLGNs5cHT2vVY6c+t2gUQvaX0sqIUf1QA9n+/gbwojS UIjp5XItYVhWRDOgdHWt7lqoFRl/tfHnkX/qo9qs1o4Hqx3DOHkDEZ3WaUz7wlSW24/Za10dqTvsQD F2Q/b1iPpufjqkkZYK/FQIwdxK6l+vw== 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=ksntLtjLejpkNQJLt5z+97Lgrf1M4OV7ad3RvxDg3/I=; b=fm7fOgX70wFv1uMXJ0ScRl1tGOg5QNjHVSIeCT5SyzMJlQKqDpBaK8kf5nsaEi0Den8aBsPqp1yH6 sHvlkcESnINqgLJHE88KDVYdMhwT/f6BJ6HwKqxW+vsnTBjfLGmSLQQgKrtqDtP3xOQ7pVT1jPO4LG Zl77/G8SYYTUqO1wQeVlZYbgM0UpekZEXR041Qn/7q+b5duYy0FTHljINXJfVOaYNvOiZXevs9qrOa n97vHNtl9zaew/mZpBHqHQgKkTsKiwjo7J3IWYwFkm++n5VeeHDI8KK51RQpH53PgpMBaZKcYaFD+h NGLy+J2rrwC7HOzfv7XDMd+4MBe3HkQ== 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=ksntLtjLejpkNQJLt5z+97Lgrf1M4OV7ad3RvxDg3/I=; b=MRjZsxSgWTUsPKQXX+33eJrxiYr5PbNZu4Pyrr4UoHID4sKC+2DSZiAQYT4gVuWYLW9qop4v8vf/Z pQ3oweGRTuGaTmNQs1ijrLlggltiWeE4niqrhAGylHYxVhK6OZaavTTuDJmR5xsxGOFFMU3ALCmT3b OyiiMYMfCfKT3kYGLBnxJWxVipNWbSfVKZk0WGnZDB3WX1pAxTe8iNSv/oGGTZqJC+gDcrpr6p5A9z XxYNu7ethAE6B6ABkdSkEGGG5D824p8Q5jPRc/Ee9mDkeMPVBw79/grLxY6KlwoyIS1PP+5hLo7hBZ gFCBTlJxSCJOQIahVqdcCv/kY2HjM9A== X-MHO-RoutePath: aGlwcGll X-MHO-User: b8d1c681-a1f2-11ea-a067-6d02e42e573a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 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 b8d1c681-a1f2-11ea-a067-6d02e42e573a; Fri, 29 May 2020 21:24:05 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 04TLO4Z1050085; Fri, 29 May 2020 15:24:04 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <432af2b7b4c0b9f2314a62a600818ea3b5ea6c00.camel@freebsd.org> Subject: Re: Request: show interfaces From: Ian Lepore To: "Rodney W. Grimes" , joe mcguckin Cc: Freebsd hackers list Date: Fri, 29 May 2020 15:24:04 -0600 In-Reply-To: <202005291901.04TJ1WPc099677@gndrsh.dnsmgr.net> References: <202005291901.04TJ1WPc099677@gndrsh.dnsmgr.net> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49YcyJ6hkwz4Qw8 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.148.0.0/15, country:US] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2020 21:24:09 -0000 On Fri, 2020-05-29 at 12:01 -0700, Rodney W. Grimes wrote: > > It?s always bugged me that Unix doesn?t show as much information as > > a typical router > > does about ethernet interface statistics. > > > > What we really need is the equivalent of Cisco ?show interface? > > One could write that, or enhance bird or frr to have additional > output in > there show interfaces command. Bird is a bit sparse: > rgrimes {1001}% birdc show interfaces > BIRD 1.5.0 ready. > vmx0 up (index=1) > MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 > 64.62.249.151/27 (Primary, scope univ) > vmx1 DOWN (index=2) > MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 > vmx2 up (index=3) > MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 > 10.4.0.4/24 (Primary, scope site) > > Infact an ifconfig -a gives you at least the negotiated interface > rate in addition to some other fields. > > > > > This shows the bit rate, packet rate, count, all the various type > > of errors, etc. > > By bit rate do you mean interface configured bit rate, > or bit rate over last short interval? > Cisco shows both, short interval being 5 minutes. BSD ifconfig shows > former. > > Adding some of the Cisco like stats would not be hard, and possibly > useful, > especially for me the Input queue size/max/drops/flushes, though much > of that may be very device specific due to offload. > > > > > Cisco allows a description field to be set for each interface, and > > that shows up also in a ?show int? output. > > That feature already exists, see ifconfig(8) "description value". > > > I think these would be great features, considering how ofter > > FreeBSD is used for routers and firewalls. > > ifconfig --format=cisco -a ?? > > > Thanks, > > Joe > > Joe McGuckin > > Doesn't "netstat -i" already provide all the statistical info except bitrate in the last short period? Maybe it could be enhanced with a different output format that provides a set of info more like the cisco show interface output (maybe when invoked with -I as oppposed to -i). -- Ian From owner-freebsd-hackers@freebsd.org Sat May 30 03:24:13 2020 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 9E2B32FBC89 for ; Sat, 30 May 2020 03:24: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 49Ymxm3Sljz42x7 for ; Sat, 30 May 2020 03:24:11 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (eg.sd.rdtc.ru [IPv6:2a03:3100:c:13:0:0:0:5]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 04U3O1gp025641 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 30 May 2020 03:24:02 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: joe@via.net Received: from [10.58.0.10] (dadv@dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id 04U3Nx6a035987 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 30 May 2020 10:24:00 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: Request: show interfaces To: joe mcguckin , Freebsd hackers list References: From: Eugene Grosbein Message-ID: Date: Sat, 30 May 2020 10:24:00 +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=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, SPF_HELO_NONE,SPF_PASS,T_DATE_IN_FUTURE_Q_PLUS 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 T_DATE_IN_FUTURE_Q_PLUS Date: is over 4 months after Received: * date * 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record * -0.0 SPF_PASS SPF: sender matches SPF record * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 49Ymxm3Sljz42x7 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=permerror (mx1.freebsd.org: domain of eugen@grosbein.net uses mechanism not recognized by this client) smtp.mailfrom=eugen@grosbein.net X-Spamd-Result: default: False [-1.72 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.75)[-0.749]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.04)[0.035]; NEURAL_HAM_LONG(-0.90)[-0.905]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[grosbein.net]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; R_SPF_PERMFAIL(0.00)[empty SPF record]; 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:24940, ipnet:2a01:4f8::/29, country:DE]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2020 03:24:13 -0000 30.05.2020 0:49, joe mcguckin wrote: > It’s always bugged me that Unix doesn’t show as much information as a typical router > does about ethernet interface statistics. > > What we really need is the equivalent of Cisco ’show interface’ > > This shows the bit rate, packet rate, count, all the various type of errors, etc. > > Cisco allows a description field to be set for each interface, and that shows up also in a ’show int’ output. > > I think these would be great features, considering how ofter FreeBSD is used for routers and firewalls. We already have most of these values available. Both rc.conf(5) and ifconfig(8) manual pages document how do you set and view interface description with ifconfig and via SNMP. "netstat -I em0 -dnW" shows total number of input/output packets, errors, drops and collisions. "netstat -I em0 -dnW 5" shows rates you mentioned per specified interval of 5 seconds. Hardware-specific MAC-level counters generally exposed by driver(s) via sysctl: # sysctl dev.bce.0 | wc -l 66 # sysctl dev.igb.0 | wc -l 187 There are too many values to include in single command output and while I work with Cisco over 20 years, I don't really like its "show interface" format because its too "fat". If you do, you can (almost) easily reproduce it with custom script if you read ifconfig(8) and netstat(1) manual pages carefully.