From owner-freebsd-hackers@freebsd.org Mon May 21 02:38:58 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C929EB097D for ; Mon, 21 May 2018 02:38:58 +0000 (UTC) (envelope-from munro@penski.net) Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A357F68535 for ; Mon, 21 May 2018 02:38:57 +0000 (UTC) (envelope-from munro@penski.net) Received: by mail-wm0-x241.google.com with SMTP id a8-v6so22706557wmg.5 for ; Sun, 20 May 2018 19:38:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=penski-net.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=ZovT81ibI73PUgO2srKcJ3AYo5sOwrDCKn5bZ7A+Cqg=; b=YouQv/CR6ZMhqCExb7rxknjsJ8sLKFJQD/NxHB+hn1MRQKj8yVEop1Ta8krYq8YXTo 7zBCAbtBe6gC+SEpjYOUn4QVnxC9F9XSRZIBl2KhxEsB8KBauE2CmzxQYE30bdCcL+73 UNBlSTD92dS30nZb7WyPhNGmxjsj+gIiYbj6u5K3UCYUqFS4exepMV6BNY/m1uvpL3Xg +xrakaYD2lXZY5v8xfCZPfaaBKuBb157fqJfeTOSVGYy8w6CzSnftCfybos648kHjXv+ Fxh9K3fvp3kbJ+aMr7dWYcAriARP9P8Eyt3miPicj5RAPRn74Npp/H17l9Gnundd5Nu5 Fb+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=ZovT81ibI73PUgO2srKcJ3AYo5sOwrDCKn5bZ7A+Cqg=; b=seNvHbvk4fT5T06az9k4O3GdERVJK/qFLmwFoFs347pBvVs4XkWk2bd0chuoiF6BSH EsSb5eqlludNzkk3IEkKmuKmkAbubyhH2+mS/3D0R3RtGWmUqA8rtDOGpFOXzcC8vIXp 4zQ7DjtgDWRuylxmEVLyRM3WG5UkF2XXd4GkwkP+OBEv+G64ErQQVChuNTMwuOYDcDav ZI9xa7WOZv5tblUZ0krT/XflGbQgvq4We7TYSao6ppaYzKpzf/WCYMSUNhDHmiLJd+RT 072LdmYMoGILS6RG7iEfjdIywYvQz93VMd4uEmK3xqOlaeSKRhGDodkkXVaUr79Nwyor dryg== X-Gm-Message-State: ALKqPwdqia8IkCmeK6WAQS8EI56Q55ZAgtodYYOOZRZueK+Eg+ZRIcz4 uySq9eyIk52730Q/kvy+Y9+FGtk3vBQdYBeviLyNYiJY X-Google-Smtp-Source: AB8JxZp8YyXqixmyLANPS31ouHWcwU8WpsOsfZOo/ouxL1Dg8SxegW3fIG/VJ40Jeam0tK9tukcbSRarN9sic5Rtr8Y= X-Received: by 2002:a50:b706:: with SMTP id g6-v6mr21231487ede.228.1526870336236; Sun, 20 May 2018 19:38:56 -0700 (PDT) MIME-Version: 1.0 Sender: munro@penski.net Received: by 10.80.169.225 with HTTP; Sun, 20 May 2018 19:38:55 -0700 (PDT) X-Originating-IP: [121.73.38.77] From: Thomas Munro Date: Mon, 21 May 2018 14:38:55 +1200 X-Google-Sender-Auth: Qpbtg9rEk-jqYmiWodrYtzpi_RI Message-ID: Subject: printf("%m") doesn't generate a warning -- shouldn't it? To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 02:38:58 -0000 Hi, As discussed on the PostgreSQL[1] and NetBSD mailing lists[2][3], syslog-like printf("%m") is a GNU extension that doesn't generate a warning from Clang or GCC on other operating systems even though when it doesn't actually work. That's because the __printf__ attribute that our __printflike macro in /usr/include/stdio.h expands to effectively means "like printf in glibc, allowing %m", not like POSIX or our actual libc which just prints out "m" when it sees it. It'd sure be nice to get a compiler warning on FreeBSD when porting software that uses that if it doesn't actually work (or ... to support it). Concretely, contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h thinks that 'm' is valid but lib/libc/stdio/vfprintf.c doesn't. Apologies if this was already discussed, it's quite hard to search for a short squiggly format control string... Thanks, [1] https://www.postgresql.org/message-id/2975.1526862605%40sss.pgh.pa.us [2] https://mail-index.netbsd.org/tech-userlevel/2015/08/21/msg009282.html [3] https://mail-index.netbsd.org/tech-userlevel/2015/10/23/msg009371.html From owner-freebsd-hackers@freebsd.org Mon May 21 11:19:08 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA7F7EED454 for ; Mon, 21 May 2018 11:19:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 491C5791F7 for ; Mon, 21 May 2018 11:19:08 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 80C99F072; Mon, 21 May 2018 13:19:06 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_9681DDA2-FCE7-42EC-8128-C7000E8F487A"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? Date: Mon, 21 May 2018 13:19:01 +0200 In-Reply-To: Cc: freebsd-hackers@freebsd.org To: Thomas Munro References: X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 11:19:08 -0000 --Apple-Mail=_9681DDA2-FCE7-42EC-8128-C7000E8F487A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 21 May 2018, at 04:38, Thomas Munro wrote: > > As discussed on the PostgreSQL[1] and NetBSD mailing lists[2][3], > syslog-like printf("%m") is a GNU extension that doesn't generate a > warning from Clang or GCC on other operating systems even though when > it doesn't actually work. That's because the __printf__ attribute > that our __printflike macro in /usr/include/stdio.h expands to > effectively means "like printf in glibc, allowing %m", not like POSIX > or our actual libc which just prints out "m" when it sees it. > > It'd sure be nice to get a compiler warning on FreeBSD when porting > software that uses that if it doesn't actually work (or ... to support > it). Please submit upstream bug(s) for clang and gcc. It turns out clang has a -Wformat-non-iso warning flag which should warn about this, but I can't get it to emit it: $ cat printf-m.c #include int main(void) { printf("error: %m\n"); return 0; } $ clang -std=c99 -Wformat-non-iso -c printf-m.c -Dimitry --Apple-Mail=_9681DDA2-FCE7-42EC-8128-C7000E8F487A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWwKrJQAKCRCwXqMKLiCW ozjeAJ4kfsJA3bcHbolMhV6Fi2shwU00IgCfff9mwhKHxENrR2HH8tJ78MyMU7o= =1T66 -----END PGP SIGNATURE----- --Apple-Mail=_9681DDA2-FCE7-42EC-8128-C7000E8F487A-- From owner-freebsd-hackers@freebsd.org Mon May 21 13:43:22 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D555CEF1574 for ; Mon, 21 May 2018 13:43:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 521867E366; Mon, 21 May 2018 13:43:21 +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 w4LDh68r063214 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 May 2018 16:43:09 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w4LDh68r063214 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w4LDh6iC063213; Mon, 21 May 2018 16:43:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 21 May 2018 16:43:06 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: Thomas Munro , freebsd-hackers@freebsd.org Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? Message-ID: <20180521134306.GT6887@kib.kiev.ua> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2018 13:43:22 -0000 On Mon, May 21, 2018 at 01:19:01PM +0200, Dimitry Andric wrote: > On 21 May 2018, at 04:38, Thomas Munro wrote: > > > > As discussed on the PostgreSQL[1] and NetBSD mailing lists[2][3], > > syslog-like printf("%m") is a GNU extension that doesn't generate a > > warning from Clang or GCC on other operating systems even though when > > it doesn't actually work. That's because the __printf__ attribute > > that our __printflike macro in /usr/include/stdio.h expands to > > effectively means "like printf in glibc, allowing %m", not like POSIX > > or our actual libc which just prints out "m" when it sees it. > > > > It'd sure be nice to get a compiler warning on FreeBSD when porting > > software that uses that if it doesn't actually work (or ... to support > > it). > > Please submit upstream bug(s) for clang and gcc. It turns out clang has > a -Wformat-non-iso warning flag which should warn about this, but I > can't get it to emit it: > > $ cat printf-m.c > #include > > int main(void) > { > printf("error: %m\n"); > return 0; > } > > $ clang -std=c99 -Wformat-non-iso -c printf-m.c > Why not add %m instead ? It is very easy and several people did it in round-about ways. diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c index 29fbd95b399..70f5074e2f7 100644 --- a/lib/libc/stdio/vfprintf.c +++ b/lib/libc/stdio/vfprintf.c @@ -317,6 +317,7 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) int ret; /* return value accumulator */ int width; /* width from format (%8d), or 0 */ int prec; /* precision from format; <0 for N/A */ + int saved_errno; char sign; /* sign prefix (' ', '+', '-', or \0) */ struct grouping_state gs; /* thousands' grouping info */ @@ -466,6 +467,7 @@ __vfprintf(FILE *fp, locale_t locale, const char *fmt0, va_list ap) savserr = fp->_flags & __SERR; fp->_flags &= ~__SERR; + saved_errno = errno; convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; @@ -776,6 +778,11 @@ reswitch: switch (ch) { } break; #endif /* !NO_FLOATING_POINT */ + case 'm': + cp = strerror(saved_errno); + size = (prec >= 0) ? strnlen(cp, prec) : strlen(cp); + sign = '\0'; + break; case 'n': /* * Assignment-like behavior is specified if the From owner-freebsd-hackers@freebsd.org Tue May 22 08:17:28 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28D4EEEC6FA for ; Tue, 22 May 2018 08:17:28 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0F8E6903B for ; Tue, 22 May 2018 08:17:27 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-wm0-x234.google.com with SMTP id n10-v6so30929537wmc.1 for ; Tue, 22 May 2018 01:17:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SePwEy7VLFQAIXgfeQq7WFOnv+V5H3h1A9Xlbxh076k=; b=Z6buLvgTw4MLWoQgo7Ae7gUHgWOIw65aRvqmHEotyip0prXkCHB7WoOeAF8kJtRoo/ 61JZzdbgzKYjryTtSVsjH2vnasWuImcp0+7r/qUwiM0EKu9govBydZkmG1T4HUmedJSX NcPwa4XICfyHPXZ/plQii/7qr9s8B37fDrGRiq4xwh8M9xnIAwvlKsLrXKBXosiXXJaP CtA87ratRvH+bA3QgGuMODFOsf0m6PlkvU4GecOFTViVVC9UGBMM41rpUrKSPQWoa/Ym tgdufjxM7tnKpDbeEXJk9VXprd7+uNeAN90Z1P9ai9N/2raL/2/qoO9eABNJbPW86NsY gI+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SePwEy7VLFQAIXgfeQq7WFOnv+V5H3h1A9Xlbxh076k=; b=ZM9aayfDN9HphaiUJL5HJm26QO2evAOFwad4o7NWc9++tEjkmgW3oqtCgK+HS21gkr F8r488tneyEM73P9lzpWwhOsiWO4bgZmQsMBdosTR4nPVX0CWdkiktyq9jFmBadA/eIA 9NKmwjChcEBVM4j3SGECS7wfQ1lpeHG24U22zeS8iabTjOy0DxAEg26i6cFwUZ592os8 bpU4Vt4lh9p6oEmdLpgAB5cHKWKyU13vURSPoTKHn8m626T7oxrWsYHQTTLerXG1umq/ Cb/f16ldeQjlRY37MV9ZeOPYeLvnspGDNaGzZe9p8TBXMJ6OFjt/rqie155EXFR5B7fy 4vMQ== X-Gm-Message-State: ALKqPwdDcQHFc/5QYCeStteWGWu+W4tVKlOAgvtKsE95EC4SP8ybmxF7 CzYSaim1tftgSy020X5JvnyCNjppn6Yv8XmNSOYnDQ== X-Google-Smtp-Source: AB8JxZqoRQU41dS8XqR00fiQ83j6nQ9OcVzNzCGhPzFOmk5dxf5jJ8LfIf89rhmZpZDjBQtPd0s3BpB5FnODEqt1GpM= X-Received: by 2002:a50:a722:: with SMTP id h31-v6mr920350edc.288.1526977046115; Tue, 22 May 2018 01:17:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.148.173 with HTTP; Tue, 22 May 2018 01:16:55 -0700 (PDT) In-Reply-To: <20180521134306.GT6887@kib.kiev.ua> References: <20180521134306.GT6887@kib.kiev.ua> From: Ed Schouten Date: Tue, 22 May 2018 10:16:55 +0200 Message-ID: Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? To: Konstantin Belousov Cc: Dimitry Andric , FreeBSD Hackers , Thomas Munro Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 08:17:28 -0000 2018-05-21 15:43 GMT+02:00 Konstantin Belousov : > Why not add %m instead ? It is very easy and several people did it in > round-about ways. Added advantage of that approach is that it allows the syslog() function to be simplified significantly. No need to expand the %m there, which ends up being quite messy. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-freebsd-hackers@freebsd.org Tue May 22 09:37:26 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 54826EEF175 for ; Tue, 22 May 2018 09:37:26 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id E17366BD52; Tue, 22 May 2018 09:37:25 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.55.3]) by phk.freebsd.dk (Postfix) with ESMTP id 610A414888; Tue, 22 May 2018 09:37:19 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.15.2/8.15.2) with ESMTPS id w4M9bI4k005223 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 May 2018 09:37:18 GMT (envelope-from phk@critter.freebsd.dk) Received: (from phk@localhost) by critter.freebsd.dk (8.15.2/8.15.2/Submit) id w4M9bIQe005222; Tue, 22 May 2018 09:37:18 GMT (envelope-from phk) To: Ed Schouten cc: Konstantin Belousov , FreeBSD Hackers , Dimitry Andric , Thomas Munro Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? In-reply-to: From: "Poul-Henning Kamp" References: <20180521134306.GT6887@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5220.1526981837.1@critter.freebsd.dk> Content-Transfer-Encoding: quoted-printable Date: Tue, 22 May 2018 09:37:18 +0000 Message-ID: <5221.1526981838@critter.freebsd.dk> X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 09:37:26 -0000 -------- In message , Ed Schouten writes: >2018-05-21 15:43 GMT+02:00 Konstantin Belousov : >> Why not add %m instead ? It is very easy and several people did it in >> round-about ways. > >Added advantage of that approach is that it allows the syslog() >function to be simplified significantly. No need to expand the %m >there, which ends up being quite messy. We have an cleanly expandable printf implementation for exactly this kind of stuff, so that is not really the case. However, expandable printf is close to useless when there is no sane/portable way to teach compilers about new formatting arguments. -- = Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe = Never attribute to malice what can adequately be explained by incompetence= . From owner-freebsd-hackers@freebsd.org Tue May 22 09:49:45 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 349EAEEF636 for ; Tue, 22 May 2018 09:49:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 8711E6C487; Tue, 22 May 2018 09:49:44 +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 w4M9nXBJ033678 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 22 May 2018 12:49:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w4M9nXBJ033678 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w4M9nXLq033677; Tue, 22 May 2018 12:49:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 22 May 2018 12:49:33 +0300 From: Konstantin Belousov To: Poul-Henning Kamp Cc: Ed Schouten , FreeBSD Hackers , Dimitry Andric , Thomas Munro Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? Message-ID: <20180522094933.GC88128@kib.kiev.ua> References: <20180521134306.GT6887@kib.kiev.ua> <5221.1526981838@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5221.1526981838@critter.freebsd.dk> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 09:49:45 -0000 On Tue, May 22, 2018 at 09:37:18AM +0000, Poul-Henning Kamp wrote: > -------- > In message > , Ed Schouten writes: > >2018-05-21 15:43 GMT+02:00 Konstantin Belousov : > >> Why not add %m instead ? It is very easy and several people did it in > >> round-about ways. > > > >Added advantage of that approach is that it allows the syslog() > >function to be simplified significantly. No need to expand the %m > >there, which ends up being quite messy. > > We have an cleanly expandable printf implementation for exactly > this kind of stuff, so that is not really the case. > > However, expandable printf is close to useless when there is no > sane/portable way to teach compilers about new formatting arguments. Expandable printf(3) could serve a situation when application wants and implements an extenstion. It does not work, or is rather weird thing to try to make it work, when application assumes that the extension is provided by the operating system. There was at least one patch which tried to add %m as an extension, and of course the problem with this approach is that errno may be already obliterated when the format handler for %m got called. From owner-freebsd-hackers@freebsd.org Tue May 22 10:40:05 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FF47EF0E32 for ; Tue, 22 May 2018 10:40:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3C7E6E407 for ; Tue, 22 May 2018 10:40:04 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D64263609F; Tue, 22 May 2018 12:39:56 +0200 (CEST) From: Dimitry Andric Message-Id: <77D988F8-ED6A-4F74-B81B-69BE4CC1D5FA@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_5CE689C0-86AF-451E-BF75-E7749DA9771C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? Date: Tue, 22 May 2018 12:39:53 +0200 In-Reply-To: <20180521134306.GT6887@kib.kiev.ua> Cc: Thomas Munro , freebsd-hackers@freebsd.org To: Konstantin Belousov References: <20180521134306.GT6887@kib.kiev.ua> X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 10:40:05 -0000 --Apple-Mail=_5CE689C0-86AF-451E-BF75-E7749DA9771C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 May 2018, at 15:43, Konstantin Belousov = wrote: >=20 > On Mon, May 21, 2018 at 01:19:01PM +0200, Dimitry Andric wrote: >> On 21 May 2018, at 04:38, Thomas Munro wrote: >>>=20 >>> As discussed on the PostgreSQL[1] and NetBSD mailing lists[2][3], >>> syslog-like printf("%m") is a GNU extension that doesn't generate a >>> warning from Clang or GCC on other operating systems even though = when >>> it doesn't actually work. That's because the __printf__ attribute >>> that our __printflike macro in /usr/include/stdio.h expands to >>> effectively means "like printf in glibc, allowing %m", not like = POSIX >>> or our actual libc which just prints out "m" when it sees it. >>>=20 >>> It'd sure be nice to get a compiler warning on FreeBSD when porting >>> software that uses that if it doesn't actually work (or ... to = support >>> it). >>=20 >> Please submit upstream bug(s) for clang and gcc. It turns out clang = has >> a -Wformat-non-iso warning flag which should warn about this, but I >> can't get it to emit it: >>=20 >> $ cat printf-m.c >> #include >>=20 >> int main(void) >> { >> printf("error: %m\n"); >> return 0; >> } >>=20 >> $ clang -std=3Dc99 -Wformat-non-iso -c printf-m.c >> >=20 > Why not add %m instead ? It is very easy and several people did it in > round-about ways. Sure, that is certainly a nice thing to have, and let's commit it. But it's still an upstream bug if an explicit warning flag for non-ISO printf specifiers doesn't work. I'll take that discussion to the LLVM bug tracker. > diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c > index 29fbd95b399..70f5074e2f7 100644 > --- a/lib/libc/stdio/vfprintf.c > +++ b/lib/libc/stdio/vfprintf.c > @@ -317,6 +317,7 @@ __vfprintf(FILE *fp, locale_t locale, const char = *fmt0, va_list ap) > int ret; /* return value accumulator */ > int width; /* width from format (%8d), or 0 */ > int prec; /* precision from format; <0 for N/A */ > + int saved_errno; > char sign; /* sign prefix (' ', '+', '-', or \0) */ > struct grouping_state gs; /* thousands' grouping info */ >=20 > @@ -466,6 +467,7 @@ __vfprintf(FILE *fp, locale_t locale, const char = *fmt0, va_list ap) > savserr =3D fp->_flags & __SERR; > fp->_flags &=3D ~__SERR; >=20 > + saved_errno =3D errno; > convbuf =3D NULL; > fmt =3D (char *)fmt0; > argtable =3D NULL; > @@ -776,6 +778,11 @@ reswitch: switch (ch) { > } > break; > #endif /* !NO_FLOATING_POINT */ > + case 'm': > + cp =3D strerror(saved_errno); > + size =3D (prec >=3D 0) ? strnlen(cp, prec) : = strlen(cp); > + sign =3D '\0'; > + break; > case 'n': > /* > * Assignment-like behavior is specified if the LGTM. -Dimitry --Apple-Mail=_5CE689C0-86AF-451E-BF75-E7749DA9771C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWwPzeQAKCRCwXqMKLiCW o9/MAJ4/KUmhGqZFxC4W/KAOi0VXQlOLQwCeLmazNogPYWcaVKVSRbki7dIoChE= =/GuJ -----END PGP SIGNATURE----- --Apple-Mail=_5CE689C0-86AF-451E-BF75-E7749DA9771C-- From owner-freebsd-hackers@freebsd.org Tue May 22 21:39:06 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2FF0EB02A2 for ; Tue, 22 May 2018 21:39:05 +0000 (UTC) (envelope-from munro@penski.net) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A9666A13B for ; Tue, 22 May 2018 21:39:05 +0000 (UTC) (envelope-from munro@penski.net) Received: by mail-wm0-x22f.google.com with SMTP id j4-v6so3573481wme.1 for ; Tue, 22 May 2018 14:39:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=penski-net.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OPTBiJX2CStXDVGv1w1jwi5Tm/jy5mNTa/gXTrq2XM0=; b=gK9Gf5z6JIPYPVfJlXd9saYORZEDVC4jIR/XK5M90spEsiS8qn0L6VYvFKqxfhiYpC jB4Te450ATDkvcEgzto/cAcVlfGLnTIvyUv0soQ9O/0UXWjvauWFBhuLPGfMnb25xll+ 0oDdwxH38lu8wy4dk3jrM3msl8MIciekQ2Ji6G9jauPCsiG9NQP27g9S41lNSbTNt8WB Lz29ng1Tml+ZDMGjadzjOqWYwnKUjl8Qla4qWgOET7LN4z0YU0y3trCbDsGe3g8GKLsO dQsP9d83e89ErfqFSfV/FqwmsRpshTkV+ta+QFlGPgBsKyhjPK48nOZFHp0g0LdAPA3+ dxxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OPTBiJX2CStXDVGv1w1jwi5Tm/jy5mNTa/gXTrq2XM0=; b=d+Xx5gyezzWbeDWU9aE+Vh4ypVTM5eEtEn3oEPSJYFVr/Ca2+6PRSDPyQlAH+lUR3v oFQrRGyZdY9nfnSrjSL/CKhSWkXa6KbYQqz8qyL5EpSF1gW9Fg00VcSfpS5tVsJ2ZCwb SMRkUPfWdX1JYBFoOQAy64sExeJ87/47+dJL4QuELFrccr5Ceviim5/VTZ5jtMmqMobh iNrsWkph9SgFWTYcsVQMc4T/8jzBiUgYl4KS0ZvpSjhatKt77PWhyT3PuiLIFwgLddO3 gC/BQKC/bDAqgbkU25Fh33yxvNF+ZybhqExtVGyrERzP87tg6v34NPx6LvNvy9DnLx/G IUMg== X-Gm-Message-State: ALKqPwc9HwRhaegepnBG6+UK2N+C04soHLix2dEEVBh+DmBMX9Z85VjV E3jlyhwsSy/JVdScr4GL02EhFz7RAEeWX9FK+HPiNA== X-Google-Smtp-Source: AB8JxZpXnuxjNU6T1ev7LrBmrRNWdleaIRW5rVrBPLi/2Wj9nLQuWbn9GzFmj0EOZDqDbsXKW9+X3sFKHY+fiVg+ge4= X-Received: by 2002:a50:b706:: with SMTP id g6-v6mr4065701ede.228.1527025144210; Tue, 22 May 2018 14:39:04 -0700 (PDT) MIME-Version: 1.0 Sender: munro@penski.net Received: by 2002:a50:a9e1:0:0:0:0:0 with HTTP; Tue, 22 May 2018 14:39:03 -0700 (PDT) X-Originating-IP: [121.73.38.77] In-Reply-To: <77D988F8-ED6A-4F74-B81B-69BE4CC1D5FA@FreeBSD.org> References: <20180521134306.GT6887@kib.kiev.ua> <77D988F8-ED6A-4F74-B81B-69BE4CC1D5FA@FreeBSD.org> From: Thomas Munro Date: Wed, 23 May 2018 09:39:03 +1200 X-Google-Sender-Auth: V2uT8MsFme9uwp8sgXt3Wu6YpEA Message-ID: Subject: Re: printf("%m") doesn't generate a warning -- shouldn't it? To: Dimitry Andric Cc: Konstantin Belousov , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 21:39:06 -0000 On 22 May 2018 at 22:39, Dimitry Andric wrote: > On 21 May 2018, at 15:43, Konstantin Belousov wrote: >> Why not add %m instead ? It is very easy and several people did it in >> round-about ways. > > Sure, that is certainly a nice thing to have, and let's commit it. +1 > But > it's still an upstream bug if an explicit warning flag for non-ISO > printf specifiers doesn't work. I'll take that discussion to the LLVM > bug tracker. Thanks. Agreed. Also, even if %m is committed, older FreeBSD releases will be affected for some time, and many other operating systems are too. From owner-freebsd-hackers@freebsd.org Sat May 26 09:08:44 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B018F6E8D2 for ; Sat, 26 May 2018 09:08:44 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 208CC68691; Sat, 26 May 2018 09:08:44 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: by mail-wm0-f43.google.com with SMTP id v131-v6so1048296wma.1; Sat, 26 May 2018 02:08:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=yyyaTBKkAuQ+RU1ygBQTVvvb/gt+7NH5RroOGAdVAm8=; b=c5mhDWe5mKhDGkYGl92L++q5UPfMqvkMWlGNhmHWR304fUh/jYDVvRA8grsR2FdM+k CytpI+mYm2es+Uo+ha0OXGkrrPD0Fl2EyyjTQGPBg3J1wmt+DIpxK1bttDzY9VZlKjlZ idSX4XqvCvzTNEQN+Rn9LvbFsOOuSe/D1rnRLo9D7PG3n6cBg04soqBLAI5NRYetbMjc AWaaQZ44RgT+Rd7sUY2nucS9cmPx1QPKZiziNBJ93petaYsh/gQ69r34oeQuJbPoD6AN Pkf+LiRqqM8XvWgIDk2KYupdeGFcsaf/8eWwKdDeCnZRGnNbK9XuRwlWg6Q44qR0XlEC lWWg== X-Gm-Message-State: ALKqPwfRHoUA0oNgh1XoaAQoDuE6HMjIpraugt6CffgKM3eglWY5Znze r+YQLBKsVlNSY2TPwnC9yUybzYvm X-Google-Smtp-Source: AB8JxZoKJFcuAWOflOqjGQRdsZSlQ/REh0qAGQUOxxHQaA02O84aOsYwrcBPx2sMMxUCw1mWON6nuA== X-Received: by 2002:a50:ddc4:: with SMTP id x4-v6mr6572466edk.221.1527325716947; Sat, 26 May 2018 02:08:36 -0700 (PDT) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com. [74.125.82.53]) by smtp.gmail.com with ESMTPSA id f11-v6sm2832628ede.45.2018.05.26.02.08.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 May 2018 02:08:36 -0700 (PDT) Received: by mail-wm0-f53.google.com with SMTP id j4-v6so20061712wme.1; Sat, 26 May 2018 02:08:36 -0700 (PDT) X-Received: by 2002:a50:ec94:: with SMTP id e20-v6mr60748edr.119.1527325716291; Sat, 26 May 2018 02:08:36 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:aa21:0:0:0:0:0 with HTTP; Sat, 26 May 2018 02:07:55 -0700 (PDT) From: Pratyush Yadav Date: Sat, 26 May 2018 14:37:55 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Why is there no bus_dmamap_load_sg()? To: freebsd-hackers@freebsd.org Cc: Edward Napierala , Akshay Jaggi Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 09:08:44 -0000 Hi all, I am working on Xen this summer [0], and I have to use the bus_dma(9) interface extensively during the course of the project. I was looking at the man page and I notice the function bus_dmamap_load_mbuf_sg() which directly returns the segment array to the client. But a similar variant of bus_dmamap_load() is missing. This variant would be useful to me and help me in my work. Is there a reason the sg variant was only implemented for mbufs? I was looking at the code in sys/kern/subr_bus_dma.c and a bus_dmamap_load_sg() does not look too difficult to implement. Is it ok if I submit a patch implementing it? -- Regards, Pratyush Yadav [0] https://wiki.freebsd.org/SummerOfCode2018Projects/ImportXenbus_dmaFromOpenBSD From owner-freebsd-hackers@freebsd.org Sat May 26 13:38:22 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88844F763AA for ; Sat, 26 May 2018 13:38:22 +0000 (UTC) (envelope-from lakhanshiva@gmail.com) Received: from mail-ot0-x244.google.com (mail-ot0-x244.google.com [IPv6:2607:f8b0:4003:c0f::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F1B1270092; Sat, 26 May 2018 13:38:21 +0000 (UTC) (envelope-from lakhanshiva@gmail.com) Received: by mail-ot0-x244.google.com with SMTP id 77-v6so9064547otd.4; Sat, 26 May 2018 06:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bAlx7sz6cuMusvxuxYef0o/t5YmWMSHUmNXWOFjbfMY=; b=KucijM0xhdMwI2ASEbrWh41PeVDK1cYcA04Yt7C001VYC4TppSeLX9+BNUG6Z2fZ0x mFcqDtfMyTvARxLDorc9KgjQMKA2F3T2MHvIX9lSbvqBGVMEmrZx7OW7PcmiTZDplhJh lopCEQpOTy1GPXUNaTAsFP6Q6q083uN+dHD2mhLGAAdwa+TJwIVTN+qRxLJ+CUJ9TJwn UPUxFUlMGDvwhpYZT/H9H9Q9kMpO7jt4A76m8RgP5bdNZAsYb/UB3R6pnfHQJXN6vHI+ OfCKdyOSjtQhwKB/QL/zq29rgGw0f9SH9LMMlfOgOeyAWJ1Og4zD7EdBgXF0z/7EiYhJ aDDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bAlx7sz6cuMusvxuxYef0o/t5YmWMSHUmNXWOFjbfMY=; b=Ek/05sycfmEZopWiHCUa5R2d3lWUabmfdcaVdj06K6YTDbiOm8H1lnEqKYvkmu7vfs 8yzzSP9BOyV6h48cTOrH+UqmFcTLyjaat8H2n8NEwXEEQJYtL/ohJpo8ZEVBcEXNMdyX ExYmGLrIU/IGu6YggUzR9KRQDTSV1b4S7N36rfy0RjTgNjdXNUamOWsQb0w7oL0Dx3FB NEZ+cc/ob7ggj6SZ7Z9MyWZrevle9VbUsM9eqkDinkW8/cAPi4U+m1UtuHT36oe3apE8 xnr4XsGDa46BRZEHZ+orQ3Cg1YPK1VGUUYflk347oTbT/x+rn2BOYBsuFssoBXHX/rjy An0Q== X-Gm-Message-State: ALKqPwcFPMS/BrxJWPoWWz4qP36zxyZTb6RdatPJ1se/Wa2/w3/1p5zN 8jyUgnYNpku4/X9xhCWbn0UlGolvYnr+G01pVCLYjw== X-Google-Smtp-Source: ADUXVKL8EIJ6WtOJCD/1drlywf+512dv1G3N0zvnlT82ItRuMkrnJIgxVpMGN+S1iv0lbL2APvsncSFYv+ZFEjBte2U= X-Received: by 2002:a9d:330b:: with SMTP id f11-v6mr3805538otc.299.1527341900657; Sat, 26 May 2018 06:38:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Lakhan Shiva Date: Sat, 26 May 2018 19:08:08 +0530 Message-ID: Subject: Re: Why is there no bus_dmamap_load_sg()? To: pratyush@freebsd.org Cc: freebsd-hackers@freebsd.org, jaggi@freebsd.org, Edward Tomasz Napierala Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 13:38:22 -0000 Hi, I think nobody wanted this before. As you have the need for it in your project you should go ahead and create the service. Again, I am not 100% sure, correct me if i am wrong. Thanks, Lakhan On Sat, May 26, 2018 at 2:41 PM Pratyush Yadav wrote: > Hi all, > > I am working on Xen this summer [0], and I have to use the bus_dma(9) > interface extensively during the course of the project. > > I was looking at the man page and I notice the function > bus_dmamap_load_mbuf_sg() which directly returns the segment array to > the client. But a similar variant of bus_dmamap_load() is missing. > This variant would be useful to me and help me in my work. > > Is there a reason the sg variant was only implemented for mbufs? > > I was looking at the code in sys/kern/subr_bus_dma.c and a > bus_dmamap_load_sg() does not look too difficult to implement. Is it > ok if I submit a patch implementing it? > > -- > Regards, > Pratyush Yadav > > > [0] > https://wiki.freebsd.org/SummerOfCode2018Projects/ImportXenbus_dmaFromOpenBSD > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@freebsd.org Sat May 26 14:10:31 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0898EF7711A for ; Sat, 26 May 2018 14:10:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22f.google.com (mail-io0-x22f.google.com [IPv6:2607:f8b0:4001:c06::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8098770F1D for ; Sat, 26 May 2018 14:10:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22f.google.com with SMTP id f21-v6so9453766iob.13 for ; Sat, 26 May 2018 07:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=bm7j3enUwTCfcD7tUpD90kbMbLVkp/d2uM4ddHijAXI=; b=KSyCgN/M2pgaqpwdw3D6srutkQv7RKM4tIfL7jWFLcGToMK/G72xFFzj7Xs8mT3tKs DeMgZaGPW3W7zFPawZcc/nr7lHp4gtoEuh7GdaNebVQeA7FPk7EBgDF/J4e+l0317tAY 9i3YIhI4LA9bKU3KoOpnSNO/SJK6Vz+vtvh1cSO9ijwsdUfpKrRujGJwSxEkvSRsJO+h 47KbS4Y/bglaDsFzh2M10nn1tWZ5/O4tYY5mz1UiAVxCXPTwQtC+0ShqVDYT0vf10jcH 2ymeTRfZwPdWHfXcq4VOvXn1ntMTzCFZBAqFe1T1xrB3fCVjj93u1as6MAY41OxkJbdl 8yyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=bm7j3enUwTCfcD7tUpD90kbMbLVkp/d2uM4ddHijAXI=; b=X0ScTqewqzYUTLWzcHHtsLQiJ86HVkFkELFeEApOdS37+iR8SicmJnZvaWtZizldtG Q9V4jst97goiMDEkYgbqvfMRxD13dyZYCPn5vCSdLxcFjfGgHH6Ept7Jrc/A5EDQD5Lh wmFp5+u76WWnmdGCYFyexodmonwOZvtvBbNg0Femc3kq11MX3+L23k9B9qnRI9169QpG RvMtsK8b0RmPfs1G9DnogUvmvBjiyrgsGsaipqz9388fLIHx0QzLB2RS7pODaCGLe4Mc xRQ9glEG0L6AWqeBl4Ngx3W0fzLCKGLYztO7BKcQQ3YJTMKS99pv7bwj0Ehn+Mj3cjZ2 W1bw== X-Gm-Message-State: ALKqPwe1CxPeCkAEkN55tm8s8luqR8fWQk1PJAJf1v+QamrK9MdX9NmL GYq+WEcb461cG+dhHhN9LXk59eDQJGYW/ISBzlb0hw== X-Google-Smtp-Source: ADUXVKKidq1rNIe7PqKT/dAJPghEq6y7p9a7CzEjkA1hul6r0lj5ZtOWHdxKK6drm8dAhdhMzWgg1bu/7F/Rrv+Hs5s= X-Received: by 2002:a6b:1c87:: with SMTP id c129-v6mr539550ioc.39.1527343829800; Sat, 26 May 2018 07:10:29 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:d028:0:0:0:0:0 with HTTP; Sat, 26 May 2018 07:10:29 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: References: From: Warner Losh Date: Sat, 26 May 2018 08:10:29 -0600 X-Google-Sender-Auth: fBYKPfyfUxMogUkn2HxkaeTnIN8 Message-ID: Subject: Re: Why is there no bus_dmamap_load_sg()? To: Pratyush Yadav Cc: "freebsd-hackers@freebsd.org" , Akshay Jaggi , Edward Napierala Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 14:10:31 -0000 On Sat, May 26, 2018 at 3:07 AM, Pratyush Yadav wrote: > I was looking at the man page and I notice the function > bus_dmamap_load_mbuf_sg() which directly returns the segment array to > the client. But a similar variant of bus_dmamap_load() is missing. > This variant would be useful to me and help me in my work. > > Is there a reason the sg variant was only implemented for mbufs? > > I was looking at the code in sys/kern/subr_bus_dma.c and a > bus_dmamap_load_sg() does not look too difficult to implement. Is it > ok if I submit a patch implementing it? > The biggest reason is because of the failure modes. If there's not sufficient memory or other resources to honor the request, we defer until there is such memory / resources and then call the callback. There's no convenient hook the drivers can connect to so they can retry the allocation when memory becomes available (busdma has one since eventually a request will complete and unload). The original port was for CAM SIMs which had stringent requirements to always make progress on I/Os to avoid deadlock. Rather than put this tricky code in all the CAM SIMs, it's centralized to retry as soon and as robustly as it can. Network drivers, however, don't have such requirements and often don't care. If they can't load a map, they can put the packet back on the transmit queue (or whatever), set a flag and return without putting it into the NIC's buffer rings. Eventually, a packet will finish transmitting and there will be a chance to send it again (or one of a number of other events, I'm glossing heavily here). It's a better fit for network drivers than storage drivers. Since bus_dmamap_load_mbuf* is used only for network drivers, it makes sense. So, it would only make sense to add if you can cope with BUS_DMA_NOWAIT always, and that error handling is simpler than letting busdma call you back when the shortage is over. Is that the case for your port? Or is it just because OpenBSD doesn't have this sort of interface (the callback difference dates back to the initial port to FreeBSD by Justin Gibbs because it never got folded back into NetBSD for reasons too long, too old and only half remembered by me for this post)? Can the code you are porting cope with error returns and retry again later? Warner From owner-freebsd-hackers@freebsd.org Sat May 26 17:26:48 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 95BFFEEF3A9 for ; Sat, 26 May 2018 17:26:48 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0C4227853D for ; Sat, 26 May 2018 17:26:47 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yv.noip.me (c-24-4-131-132.hsd1.ca.comcast.net [24.4.131.132]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id w4QHQkb1090066 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Sat, 26 May 2018 10:26:46 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-24-4-131-132.hsd1.ca.comcast.net [24.4.131.132] claimed to be yv.noip.me To: Freebsd hackers list From: Yuri Subject: psm(4) doesn't recognize the Elantech touchpad Message-ID: Date: Sat, 26 May 2018 10:26:45 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 17:26:48 -0000 FreeBSD is installed on Lenovo Ideapad 320-15AST. Based on several web hits, this model contains the Elantech touchad. There is hw.psm.elantech_support=1 in /boot/loader.conf. This is supposed to make the psm(4) driver to pick it up and create /dev/psm0, but this doesn't happen, and there is no /dev/psm* device. How to troubleshoot this? Yuri From owner-freebsd-hackers@freebsd.org Sat May 26 18:24:39 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1595EF1CE6 for ; Sat, 26 May 2018 18:24:39 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 31E327C405; Sat, 26 May 2018 18:24:39 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: by mail-wm0-f46.google.com with SMTP id v131-v6so3178869wma.1; Sat, 26 May 2018 11:24:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bErhvcNqtS1EUw6Lx+1iQsCl/gZ2hzXzPpiOQp8/3b8=; b=Aixvftn2/swPEEo5GYRZe3fN3SFkp7C69xggQfjgdWZcxFsHoqB1r+TxkheSLuPH+M 7K/4/JmkjWzxB5rbilcWFfWvvpqwmNxY5BbTmFwZbykJ7JstKRtAhMaeQZ+yejgRW6+i 7QK8gd+IJLyL4ktGsNvRTu2sYWzbm2bWci2Z75B4V8VZzv62JMd5KDxcHr2Y/6bzfeNX HwvLwUVikV4A3aWGJBeu2Zpj9qLm0GH5k88hQb7HkOKAAmtncJvHaHVh6jbMmTeeE5a2 +mFc4YhBNtA6wBLUEY4iR8jmVZM5OCOxyU2+41vHEcOvQnCE9JMRf/HCexCv5LYBQtq8 hoIA== X-Gm-Message-State: ALKqPwdAshRqnIrcn4TZHRcBkqGKEt7/ZOF/y3wLQWF28f4uAMw0Vn3t PSe6mhnz+5WHAcmke3fRrHkO4X9A X-Google-Smtp-Source: AB8JxZoPTNhde+0FHRKRRkEbS7nTLAwxls/oLS9Ob8tpgKmQWPWYNSBZxnyXqj2UVAJK34vYEC7qxQ== X-Received: by 2002:aa7:d34e:: with SMTP id m14-v6mr7959965edr.108.1527359071600; Sat, 26 May 2018 11:24:31 -0700 (PDT) Received: from mail-wm0-f54.google.com (mail-wm0-f54.google.com. [74.125.82.54]) by smtp.gmail.com with ESMTPSA id h38-v6sm1612567eda.43.2018.05.26.11.24.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 May 2018 11:24:31 -0700 (PDT) Received: by mail-wm0-f54.google.com with SMTP id t11-v6so22147806wmt.0; Sat, 26 May 2018 11:24:31 -0700 (PDT) X-Received: by 2002:a50:ec94:: with SMTP id e20-v6mr1641266edr.119.1527359070933; Sat, 26 May 2018 11:24:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pratyush Yadav Date: Sat, 26 May 2018 23:54:17 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Why is there no bus_dmamap_load_sg()? To: Warner Losh Cc: freebsd-hackers@freebsd.org, Akshay Jaggi , Edward Napierala Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 18:24:39 -0000 Hi Warner, On Sat 26 May, 2018, 7:40 PM Warner Losh, wrote: > > > On Sat, May 26, 2018 at 3:07 AM, Pratyush Yadav > wrote: > >> I was looking at the man page and I notice the function >> bus_dmamap_load_mbuf_sg() which directly returns the segment array to >> the client. But a similar variant of bus_dmamap_load() is missing. >> This variant would be useful to me and help me in my work. >> >> Is there a reason the sg variant was only implemented for mbufs? >> >> I was looking at the code in sys/kern/subr_bus_dma.c and a >> bus_dmamap_load_sg() does not look too difficult to implement. Is it >> ok if I submit a patch implementing it? >> > > The biggest reason is because of the failure modes. If there's not > sufficient memory or other resources to honor the request, we defer until > there is such memory / resources and then call the callback. There's no > convenient hook the drivers can connect to so they can retry the allocation > when memory becomes available (busdma has one since eventually a request > will complete and unload). The original port was for CAM SIMs which had > stringent requirements to always make progress on I/Os to avoid deadlock. > Rather than put this tricky code in all the CAM SIMs, it's centralized to > retry as soon and as robustly as it can. > > Network drivers, however, don't have such requirements and often don't > care. If they can't load a map, they can put the packet back on the > transmit queue (or whatever), set a flag and return without putting it into > the NIC's buffer rings. Eventually, a packet will finish transmitting and > there will be a chance to send it again (or one of a number of other > events, I'm glossing heavily here). It's a better fit for network drivers > than storage drivers. Since bus_dmamap_load_mbuf* is used only for network > drivers, it makes sense. > > So, it would only make sense to add if you can cope with BUS_DMA_NOWAIT > always, and that error handling is simpler than letting busdma call you > back when the shortage is over. Is that the case for your port? > I'm not sure. I looked at the OpenBSD code and they always call with a BUS_DMA_NOWAIT flag, but I'm not sure what the answer is for FreeBSD. Or is it just because OpenBSD doesn't have this sort of interface (the > callback difference dates back to the initial port to FreeBSD by Justin > Gibbs because it never got folded back into NetBSD for reasons too long, > too old and only half remembered by me for this post)? Can the code you are > porting cope with error returns and retry again later? > The other problem with using callbacks is that because I pass the xen-specific callback to the dma load, the driver using the xen specific dma operation can't pass it's own callback. I thought using the _sg() variant would allow the driver to use a callback. But the way you put it, that kind of defeats the purpose of the callback, which is to use it when allocation is defered. The bottom line is, I need to re-evaluate. I will spend some more time on this and discuss it with my mentors. I'll let you (and everyone else) know if I do decide we need it. Thanks for the enlightening answer. Regards, Pratyush Yadav From owner-freebsd-hackers@freebsd.org Sat May 26 19:52:13 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2C7A5EF45EE for ; Sat, 26 May 2018 19:52:13 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-ot0-x229.google.com (mail-ot0-x229.google.com [IPv6:2607:f8b0:4003:c0f::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE8377F03E for ; Sat, 26 May 2018 19:52:12 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-ot0-x229.google.com with SMTP id t1-v6so9648668oth.8 for ; Sat, 26 May 2018 12:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=B+ti/RgkDTByu+Rd61znGJhxkEF0HxDgHhEdOmARTyI=; b=W0HGtPG1U9dPIJQk1cry44ATYcvtgYa+dcL2GHOSIZg8/nD9/54QtCrxRowvZM7X5k NsSBOOY3X8HBPfNP3hI5j4PGnomkR9cJJKIK7naeriYPhXyVcULXaE2A1XL9oyP/BsVb UUb6VeRQhaUlbHeDYgV8eaVtfVBRBrJ46lHcOAp6FdL211siCfBA2+0WeQSIvNQvkMLK OUJ4CWGoEbPAOcTKkKs1PzOS94QfyOT70iJFg97Nc340rQvmjtkvX8Id0mTMJoLEezsp QPv1qnKUbHsMjsT/BiHiz2t0DaRqEit0OPdu9hCO734gn1ig15SAsFta9uRjYN/7fO0P kBVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=B+ti/RgkDTByu+Rd61znGJhxkEF0HxDgHhEdOmARTyI=; b=bFtA/fKi/dyZq8taItx+XocE2x1uTROt2hrcWaPdKmZwS++c8Q1ZnkgonXRmYfoBda GZIr3mjXIRvV5SjGRUNATv+MB+jTA5SCpbSLNBZ4MC718T7YSTZ22XoCkbgmIPi/ZOre QudwkPCqqSzv4VpDVgHxAvKcGbPmnKez67UwH/XL6dqyw35UArFT7EPT4PstVpr+dmky UFx5MJAIo/0PL6y+5UeGd1JXMBIyts6p8fnj3gqGqZc1gqWCKr7bHjV/JYDjZkNYdqhE QhZ7UHYYa41a6gcStOHzEOzXNe28XIkILHEdUdxYdUI2vQOFUTaHZ90PsdR5MVaJlBNe aWTQ== X-Gm-Message-State: ALKqPwcF8MW4AzrlL/TvK5m6ANArTxBveXYabgEb1KXbs8WclWKmtfHg KNfdJvI/haA0grCuiAprN7xGdg== X-Google-Smtp-Source: ADUXVKIiL13ieu/Sjmu9EZvXWRTO+8xPeY1XbtScA3SLEYNmH/5GiMVBwVxaaiBviK1mJmtZO26R9A== X-Received: by 2002:a9d:2339:: with SMTP id j54-v6mr4978157otb.235.1527364331644; Sat, 26 May 2018 12:52:11 -0700 (PDT) Received: from jd.gmail.com ([81.174.250.12]) by smtp.gmail.com with ESMTPSA id t37-v6sm17780814otf.26.2018.05.26.12.52.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 May 2018 12:52:10 -0700 (PDT) References: User-agent: mu4e 1.0; emacs 25.3.1 From: Johannes Lundberg To: Yuri Cc: Freebsd hackers list Subject: Re: psm(4) doesn't recognize the Elantech touchpad In-reply-to: Date: Sat, 26 May 2018 20:52:08 +0100 Message-ID: <86wovqnqjb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 May 2018 19:52:13 -0000 Yuri writes: > FreeBSD is installed on Lenovo Ideapad 320-15AST. Based on several web > hits, this model contains the Elantech touchad. > > There is hw.psm.elantech_support=1 in /boot/loader.conf. This is > supposed to make the psm(4) driver to pick it up and create /dev/psm0, > but this doesn't happen, and there is no /dev/psm* device. > > > How to troubleshoot this? > Hi! Try with hw.psm.synaptics_support=1 in /boot/loader.conf. Worked for me to get a PS/2 trackpad working with evdev. > > Yuri > > > _______________________________________________ > 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"