From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 03:19:42 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 8AC394CF761; Mon, 28 Dec 2020 03:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D42pk3JhDz4c5F; Mon, 28 Dec 2020 03:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 647FC12753; Mon, 28 Dec 2020 03:19:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3JgY2081689; Mon, 28 Dec 2020 03:19:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3JgB4081688; Mon, 28 Dec 2020 03:19:42 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:19:42 GMT Message-Id: <202012280319.0BS3JgB4081688@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: a3abf6658334 - stable/12 - grep: replace the internal queue with a ring buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: a3abf665833465461030c413f07d324e7d64ae30 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:19:42 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a3abf665833465461030c413f07d324e7d64ae30 commit a3abf665833465461030c413f07d324e7d64ae30 Author: Kyle Evans AuthorDate: 2020-12-09 05:27:45 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:19:26 +0000 grep: replace the internal queue with a ring buffer We know up front how many items we can have in the queue (-B/Bflag), so pay the cost of those particular allocations early on. The reduced queue maintenance overhead seemed to yield about an ~8% improvement for my earlier `grep -C8 -r closefrom .` test. (cherry picked from commit df546c3b730d4abcace1da24226bd5f01280588e) --- usr.bin/grep/grep.c | 2 + usr.bin/grep/grep.h | 1 + usr.bin/grep/queue.c | 127 ++++++++++++++++++++++++++++++--------------------- 3 files changed, 78 insertions(+), 52 deletions(-) diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index 731e46bb112e..a7ecc2015571 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -712,6 +712,8 @@ main(int argc, char *argv[]) if ((aargc == 0 || aargc == 1) && !Hflag) hflag = true; + initqueue(); + if (aargc == 0 && dirbehave != DIR_RECURSE) exit(!procfile("-")); diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index 6d1e87ae4d7c..62e82c7f56b6 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -149,6 +149,7 @@ char *grep_strdup(const char *str); void grep_printline(struct str *line, int sep); /* queue.c */ +void initqueue(void); bool enqueue(struct str *x); void printqueue(void); void clearqueue(void); diff --git a/usr.bin/grep/queue.c b/usr.bin/grep/queue.c index b5f3aa14f0e2..ac15185f0694 100644 --- a/usr.bin/grep/queue.c +++ b/usr.bin/grep/queue.c @@ -6,6 +6,7 @@ * * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav * All rights reserved. + * Copyright (c) 2020 Kyle Evans * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -45,77 +46,99 @@ __FBSDID("$FreeBSD$"); #include "grep.h" -struct qentry { - STAILQ_ENTRY(qentry) list; - struct str data; -}; +typedef struct str qentry_t; -static STAILQ_HEAD(, qentry) queue = STAILQ_HEAD_INITIALIZER(queue); -static long long count; - -static struct qentry *dequeue(void); +static long long filled; +static qentry_t *qend, *qpool; /* - * Enqueue another line; return true if we've dequeued a line as a result + * qnext is the next entry to populate. qlist is where the list actually + * starts, for the purposes of printing. */ -bool -enqueue(struct str *x) +static qentry_t *qlist, *qnext; + +void +initqueue(void) { - struct qentry *item; - - item = grep_malloc(sizeof(struct qentry)); - item->data.dat = grep_malloc(sizeof(char) * x->len); - item->data.len = x->len; - item->data.line_no = x->line_no; - item->data.boff = x->boff; - item->data.off = x->off; - memcpy(item->data.dat, x->dat, x->len); - item->data.file = x->file; - - STAILQ_INSERT_TAIL(&queue, item, list); - - if (++count > Bflag) { - item = dequeue(); - free(item->data.dat); - free(item); - return (true); - } - return (false); + + qlist = qnext = qpool = grep_calloc(Bflag, sizeof(*qpool)); + qend = qpool + (Bflag - 1); } -static struct qentry * -dequeue(void) +static qentry_t * +advqueue(qentry_t *itemp) { - struct qentry *item; - item = STAILQ_FIRST(&queue); - if (item == NULL) - return (NULL); + if (itemp == qend) + return (qpool); + return (itemp + 1); +} - STAILQ_REMOVE_HEAD(&queue, list); - --count; - return (item); +/* + * Enqueue another line; return true if we've dequeued a line as a result + */ +bool +enqueue(struct str *x) +{ + qentry_t *item; + bool rotated; + + item = qnext; + qnext = advqueue(qnext); + rotated = false; + + if (filled < Bflag) { + filled++; + } else if (filled == Bflag) { + /* We had already filled up coming in; just rotate. */ + qlist = advqueue(qlist); + rotated = true; + free(item->dat); + } + item->dat = grep_malloc(sizeof(char) * x->len); + item->len = x->len; + item->line_no = x->line_no; + item->boff = x->boff; + item->off = x->off; + memcpy(item->dat, x->dat, x->len); + item->file = x->file; + + return (rotated); } void printqueue(void) { - struct qentry *item; - - while ((item = dequeue()) != NULL) { - grep_printline(&item->data, '-'); - free(item->data.dat); - free(item); - } + qentry_t *item; + + item = qlist; + do { + /* Buffer must have ended early. */ + if (item->dat == NULL) + break; + + grep_printline(item, '-'); + free(item->dat); + item->dat = NULL; + item = advqueue(item); + } while (item != qlist); + + qlist = qnext = qpool; + filled = 0; } void clearqueue(void) { - struct qentry *item; + qentry_t *item; - while ((item = dequeue()) != NULL) { - free(item->data.dat); - free(item); - } + item = qlist; + do { + free(item->dat); + item->dat = NULL; + item = advqueue(item); + } while (item != qlist); + + qlist = qnext = qpool; + filled = 0; } From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 03:22:34 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 092504CF897; Mon, 28 Dec 2020 03:22:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D42t16pT8z4cGY; Mon, 28 Dec 2020 03:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DC55012DE0; Mon, 28 Dec 2020 03:22:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3MXKe092284; Mon, 28 Dec 2020 03:22:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3MXvr092283; Mon, 28 Dec 2020 03:22:33 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:22:33 GMT Message-Id: <202012280322.0BS3MXvr092283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 35505aacb979 - stable/12 - lib/libc/regex: fix build with REDEBUG defined MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 35505aacb97901be1347a6bffbfeabafd6b3b1b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:22:34 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=35505aacb97901be1347a6bffbfeabafd6b3b1b7 commit 35505aacb97901be1347a6bffbfeabafd6b3b1b7 Author: Yuri Pankov AuthorDate: 2019-09-24 12:21:01 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:22:18 +0000 lib/libc/regex: fix build with REDEBUG defined (cherry picked from commit 3c78771400e74f5bc54ee8e9a28fbf70190fd250) --- lib/libc/regex/engine.c | 2 +- lib/libc/regex/regcomp.c | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index a25bfa08ede7..e7da4cbc2a5d 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -1068,7 +1068,7 @@ print(struct match *m, fprintf(d, " %s", pchar(ch)); for (i = 0; i < g->nstates; i++) if (ISSET(st, i)) { - fprintf(d, "%s%d", (first) ? "\t" : ", ", i); + fprintf(d, "%s%lu", (first) ? "\t" : ", ", i); first = 0; } fprintf(d, "\n"); diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 586621c5a745..b76e58a26082 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -196,12 +196,6 @@ static char nuls[10]; /* place to point scanner in event of error */ #define THERETHERE() (p->slen - 2) #define DROP(n) (p->slen -= (n)) -#ifndef NDEBUG -static int never = 0; /* for use in asserts; shuts lint up */ -#else -#define never 0 /* some s have bugs too */ -#endif - /* Macro used by computejump()/computematchjump() */ #define MIN(a,b) ((a)<(b)?(a):(b)) From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 03:23:10 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 EBC7E4CFB7B; Mon, 28 Dec 2020 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D42tk6BRfz4cBx; Mon, 28 Dec 2020 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C788612C28; Mon, 28 Dec 2020 03:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS3NAU2092391; Mon, 28 Dec 2020 03:23:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS3NApl092390; Mon, 28 Dec 2020 03:23:10 GMT (envelope-from git) Date: Mon, 28 Dec 2020 03:23:10 GMT Message-Id: <202012280323.0BS3NApl092390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 90dbd2a623c3 - stable/12 - regex(3): belatedly document REG_POSIX from r363734 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 90dbd2a623c345ad66228c48b5bf2e901bdb6c61 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 03:23:11 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=90dbd2a623c345ad66228c48b5bf2e901bdb6c61 commit 90dbd2a623c345ad66228c48b5bf2e901bdb6c61 Author: Kyle Evans AuthorDate: 2020-08-04 02:06:49 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 03:23:04 +0000 regex(3): belatedly document REG_POSIX from r363734 My original patch included this documented, but it appears that I failed to include the manpage update. Do so now. (cherry picked from commit ba8b64de05d0df84ad9064be950ca38bc7bafe7d) --- lib/libc/regex/regex.3 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/libc/regex/regex.3 b/lib/libc/regex/regex.3 index 8959272e9891..d22dec1e87f7 100644 --- a/lib/libc/regex/regex.3 +++ b/lib/libc/regex/regex.3 @@ -32,7 +32,7 @@ .\" @(#)regex.3 8.4 (Berkeley) 3/20/94 .\" $FreeBSD$ .\" -.Dd May 25, 2016 +.Dd April 15, 2017 .Dt REGEX 3 .Os .Sh NAME @@ -183,6 +183,17 @@ compatible with but not specified by .St -p1003.2 , and should be used with caution in software intended to be portable to other systems. +.It Dv REG_POSIX +Compile only +.St -p1003.2 +compliant expressions. +This flag has no effect unless linking against +.Nm libregex . +This is an extension, +compatible with but not specified by +.St -p1003.2 , +and should be used with +caution in software intended to be portable to other systems. .El .Pp When successful, From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 04:20:52 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 DFCBC4D073B; Mon, 28 Dec 2020 04:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D449J62yyz4frt; Mon, 28 Dec 2020 04:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C32AC13648; Mon, 28 Dec 2020 04:20:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4Kq7A054408; Mon, 28 Dec 2020 04:20:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4KqKE054407; Mon, 28 Dec 2020 04:20:52 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:20:52 GMT Message-Id: <202012280420.0BS4KqKE054407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: aaacbdb3993b - stable/12 - : reserve a regcomp field for REG_POSIX MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:20:52 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52 commit aaacbdb3993b7ba9b31c7f26412ffcc44ba94a52 Author: Kyle Evans AuthorDate: 2020-07-31 12:40:31 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 04:20:26 +0000 : reserve a regcomp field for REG_POSIX For libc regcomp, this will be a nop. libregex will take this to mean that it needs to turn off GNU extensions, effectively switching it back to the POSIX-compliant libc implementation at runtime. (cherry picked from commit 7c5ec5fe6afb50ba5c83ad0b3dab036f91b7dafe) --- include/regex.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/regex.h b/include/regex.h index 6b0838a9bd97..3bea3df4f3d4 100644 --- a/include/regex.h +++ b/include/regex.h @@ -71,6 +71,7 @@ typedef struct { #define REG_NOSPEC 0020 #define REG_PEND 0040 #define REG_DUMP 0200 +#define REG_POSIX 0400 /* only POSIX-compliant regex (libregex) */ /* regerror() flags */ #define REG_ENOSYS (-1) From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 04:55:30 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 EB8214D1209; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D44xG6N4Qz4h2K; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9C14139EC; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4tUh9090174; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4tUDf090173; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:55:30 GMT Message-Id: <202012280455.0BS4tUDf090173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 70233fc21258 - stable/12 - regex(3): Interpret many escaped ordinary characters as EESCAPE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 70233fc21258ab4347fd07401297d3d409a9c4a8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:55:31 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=70233fc21258ab4347fd07401297d3d409a9c4a8 commit 70233fc21258ab4347fd07401297d3d409a9c4a8 Author: Kyle Evans AuthorDate: 2020-07-29 23:21:56 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 04:20:27 +0000 regex(3): Interpret many escaped ordinary characters as EESCAPE MFC NOTE: This only merged the infrastructure back, the new regcomp symbol that actually interprets these as EESCAPE was *dropped*. This is purely to make future commits for libregex easier to merge back so that we can choose to use it. In IEEE 1003.1-2008 [1] and earlier revisions, BRE/ERE grammar allows for any character to be escaped, but "ORD_CHAR preceded by an unescaped character [gives undefined results]". Historically, we've interpreted an escaped ordinary character as the ordinary character itself. This becomes problematic when some extensions give special meanings to an otherwise ordinary character (e.g. GNU's \b, \s, \w), meaning we may have two different valid interpretations of the same sequence. To make this easier to deal with and given that the standard calls this undefined, we should throw an error (EESCAPE) if we run into this scenario to ease transition into a state where some escaped ordinaries are blessed with a special meaning -- it will either error out or have extended behavior, rather than have two entirely different versions of undefined behavior that leave the consumer of regex(3) guessing as to what behavior will be used or leaving them with false impressions. This change bumps the symbol version of regcomp to FBSD_1.6 and provides the old escape semantics for legacy applications, just in case one has an older application that would immediately turn into a pumpkin because of an extraneous escape that's embedded or otherwise critical to its operation. This is the final piece needed before enhancing libregex with GNU extensions and flipping the switch on bsdgrep. [1] http://pubs.opengroup.org/onlinepubs/9699919799.2016edition/ (cherry picked from commit adeebf4cd47c3e85155d92f386bda5e519b75ab2) --- contrib/netbsd-tests/lib/libc/regex/data/meta.in | 4 +- contrib/netbsd-tests/lib/libc/regex/data/subexp.in | 2 +- lib/libc/regex/regcomp.c | 103 +++++++++++++++++---- 3 files changed, 90 insertions(+), 19 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/data/meta.in b/contrib/netbsd-tests/lib/libc/regex/data/meta.in index 4533d3591bc6..eb24075aea62 100644 --- a/contrib/netbsd-tests/lib/libc/regex/data/meta.in +++ b/contrib/netbsd-tests/lib/libc/regex/data/meta.in @@ -4,7 +4,9 @@ a[bc]d & abd abd a\*c & a*c a*c a\\b & a\b a\b a\\\*b & a\*b a\*b -a\bc & abc abc +# Begin FreeBSD +a\bc &C EESCAPE +# End FreeBSD a\ &C EESCAPE a\\bc & a\bc a\bc \{ bC BADRPT diff --git a/contrib/netbsd-tests/lib/libc/regex/data/subexp.in b/contrib/netbsd-tests/lib/libc/regex/data/subexp.in index d3efe2eab270..e3d376bb7cb3 100644 --- a/contrib/netbsd-tests/lib/libc/regex/data/subexp.in +++ b/contrib/netbsd-tests/lib/libc/regex/data/subexp.in @@ -12,7 +12,7 @@ a(b+)c - abbbc abbbc bbb a(b*)c - ac ac @c (a|ab)(bc([de]+)f|cde) - abcdef abcdef a,bcdef,de # Begin FreeBSD -a\(b\|c\)d b ab|cd ab|cd b|c +a\(b|c\)d b ab|cd ab|cd b|c # End FreeBSD # the regression tester only asks for 9 subexpressions a(b)(c)(d)(e)(f)(g)(h)(i)(j)k - abcdefghijk abcdefghijk b,c,d,e,f,g,h,i,j diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index b76e58a26082..5cda77da1a6a 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -102,11 +102,14 @@ struct parse { sopno pend[NPAREN]; /* -> ) ([0] unused) */ bool allowbranch; /* can this expression branch? */ bool bre; /* convenience; is this a BRE? */ + int pflags; /* other parsing flags -- legacy escapes? */ bool (*parse_expr)(struct parse *, struct branchc *); void (*pre_parse)(struct parse *, struct branchc *); void (*post_parse)(struct parse *, struct branchc *); }; +#define PFLAG_LEGACY_ESC 0x00000001 + /* ========= begin header generated by ./mkh ========= */ #ifdef __cplusplus extern "C" { @@ -132,6 +135,7 @@ static void p_b_cclass(struct parse *p, cset *cs); static void p_b_eclass(struct parse *p, cset *cs); static wint_t p_b_symbol(struct parse *p); static wint_t p_b_coll_elem(struct parse *p, wint_t endc); +static bool may_escape(struct parse *p, const wint_t ch); static wint_t othercase(wint_t ch); static void bothcases(struct parse *p, wint_t ch); static void ordinary(struct parse *p, wint_t ch); @@ -199,22 +203,10 @@ static char nuls[10]; /* place to point scanner in event of error */ /* Macro used by computejump()/computematchjump() */ #define MIN(a,b) ((a)<(b)?(a):(b)) -/* - - regcomp - interface for parser and compilation - = extern int regcomp(regex_t *, const char *, int); - = #define REG_BASIC 0000 - = #define REG_EXTENDED 0001 - = #define REG_ICASE 0002 - = #define REG_NOSUB 0004 - = #define REG_NEWLINE 0010 - = #define REG_NOSPEC 0020 - = #define REG_PEND 0040 - = #define REG_DUMP 0200 - */ -int /* 0 success, otherwise REG_something */ -regcomp(regex_t * __restrict preg, +static int /* 0 success, otherwise REG_something */ +regcomp_internal(regex_t * __restrict preg, const char * __restrict pattern, - int cflags) + int cflags, int pflags) { struct parse pa; struct re_guts *g; @@ -273,6 +265,7 @@ regcomp(regex_t * __restrict preg, p->end = p->next + len; p->error = 0; p->ncsalloc = 0; + p->pflags = pflags; for (i = 0; i < NPAREN; i++) { p->pbegin[i] = 0; p->pend[i] = 0; @@ -345,6 +338,27 @@ regcomp(regex_t * __restrict preg, return(p->error); } +/* + - regcomp - interface for parser and compilation + = extern int regcomp(regex_t *, const char *, int); + = #define REG_BASIC 0000 + = #define REG_EXTENDED 0001 + = #define REG_ICASE 0002 + = #define REG_NOSUB 0004 + = #define REG_NEWLINE 0010 + = #define REG_NOSPEC 0020 + = #define REG_PEND 0040 + = #define REG_DUMP 0200 + */ +int /* 0 success, otherwise REG_something */ +regcomp(regex_t * __restrict preg, + const char * __restrict pattern, + int cflags) +{ + + return (regcomp_internal(preg, pattern, cflags, PFLAG_LEGACY_ESC)); +} + /* - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op, - return whether we should terminate or not @@ -435,7 +449,10 @@ p_ere_exp(struct parse *p, struct branchc *bc) EMIT(OEOW, 0); break; default: - ordinary(p, wc); + if (may_escape(p, wc)) + ordinary(p, wc); + else + SETERROR(REG_EESCAPE); break; } break; @@ -797,7 +814,10 @@ p_simp_re(struct parse *p, struct branchc *bc) return (false); /* Definitely not $... */ p->next--; wc = WGETNEXT(); - ordinary(p, wc); + if ((c & BACKSL) == 0 || may_escape(p, wc)) + ordinary(p, wc); + else + SETERROR(REG_EESCAPE); break; } @@ -1094,6 +1114,55 @@ p_b_coll_elem(struct parse *p, return(0); } +/* + - may_escape - determine whether 'ch' is escape-able in the current context + == static int may_escape(struct parse *p, const wint_t ch) + */ +static bool +may_escape(struct parse *p, const wint_t ch) +{ + + if ((p->pflags & PFLAG_LEGACY_ESC) != 0) + return (true); + if (isalpha(ch) || ch == '\'' || ch == '`') + return (false); + return (true); +#ifdef NOTYET + /* + * Build a whitelist of characters that may be escaped to produce an + * ordinary in the current context. This assumes that these have not + * been otherwise interpreted as a special character. Escaping an + * ordinary character yields undefined results according to + * IEEE 1003.1-2008. Some extensions (notably, some GNU extensions) take + * advantage of this and use escaped ordinary characters to provide + * special meaning, e.g. \b, \B, \w, \W, \s, \S. + */ + switch(ch) { + case '|': + case '+': + case '?': + /* The above characters may not be escaped in BREs */ + if (!(p->g->cflags®_EXTENDED)) + return (false); + /* Fallthrough */ + case '(': + case ')': + case '{': + case '}': + case '.': + case '[': + case ']': + case '\\': + case '*': + case '^': + case '$': + return (true); + default: + return (false); + } +#endif +} + /* - othercase - return the case counterpart of an alphabetic == static wint_t othercase(wint_t ch); From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 04:55:30 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 D831F4D0CEE; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D44xG5lpvz4h9F; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B809713C42; Mon, 28 Dec 2020 04:55:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4tUTG090157; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4tUW0090156; Mon, 28 Dec 2020 04:55:30 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:55:30 GMT Message-Id: <202012280455.0BS4tUW0090156@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 06e63004abb0 - stable/12 - libregex: implement GNU extensions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 06e63004abb0abc801e9f8af066ef10095189b10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:55:30 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=06e63004abb0abc801e9f8af066ef10095189b10 commit 06e63004abb0abc801e9f8af066ef10095189b10 Author: Kyle Evans AuthorDate: 2020-08-04 02:14:51 +0000 Commit: Kyle Evans CommitDate: 2020-12-28 04:34:53 +0000 libregex: implement GNU extensions 18a1e2e9: libregex: Implement a subset of the GNU extensions The entire patch-set is not yet mature enough for commit, but this usable subset is generally enough for googletest to be happy with and mostly map to some existing concepts, so they're not as invasive. The specific changes included here are: - Branching in BREs with \| - \w and \W for [[:alnum:]] and [^[:alnum:]] respectively - \s and \S for [[:space:]] and [^[:space:]] respectively - Additional quantifiers in BREs, \? and \+ (self-explanatory) There's some #ifdef'd out work for allowing empty branches as a match-all. This is a feature that's under assessment... future work will determine how standard this behavior is and act accordingly. 61898cde: libregex: disable some of the unimplemented test cases for now This should allow the tests to actually pass. Future work will uncomment the unimplemented tests as they're implemented. 7518fb34: libc: regex: factor out ISBOW/ISEOW macros These will be reused for \b (word boundary, which matches both sides). No functional change. ca53e5ae: libregex: implement \` and \' (begin-of-subj, end-of-subj) These are GNU extensions, generally equivalent to ^ and $ except that the new syntax will not match beginning of line after the first in a multi-line expression or the end of line before absolute last in a multi-line expression. 6b986646: libregex: implement \b and \B (word boundary, not word boundary) This is the last of the needed GNU expressions before we can unleash bsdgrep by default. \b is effectively an agnostic equivalent of \< and \>, while \B will match every space that isn't making a transition from nonchar -> char or char -> nonchar. 4afa7dd6: libc: regex: retire internal EMPTBR ("Empty branch present") It was realized just a little too late that this was a hack that belonged in individual regex(3)-using applications. It was surrounded in NOTYET and not implemented in the engine, so remove it. 4f1efa30: libc: regex: partial revert of r368358 (6b986646) MFC NOTE: Altered to match the legacy behavior of a\bc => abc. Part of the libregex functionality leaked into the tests it shares with the standard regex(3). Introduce a P flag to set the REG_POSIX cflag to indicate that libc regex should effectively do nothing while libregex should specifically run it in non-extended mode. This unbreaks the libc/regex test run. (cherry picked from commit 18a1e2e9b9f109a78c5a9274e4cfb4777801b4fb) (cherry picked from commit 61898cde69374d5a9994e2074605bc4101aff72d) (cherry picked from commit 7518fb346fe9603f99d2406a073b30fb8e4a270c) (cherry picked from commit ca53e5aedfebcc1b4091b68e01b2d5cae923f85e) (cherry picked from commit 6b986646d434baa21ae3d74d6a662ad206c7ddbd) (cherry picked from commit 4afa7dd61a3a1454a5b3cf5e6de2029c7e2d9a84) (cherry picked from commit 4f1efa309ca48a088595dd57969ae6a397dd49d1) --- contrib/netbsd-tests/lib/libc/regex/README | 1 + contrib/netbsd-tests/lib/libc/regex/data/meta.in | 2 +- contrib/netbsd-tests/lib/libc/regex/main.c | 5 +- lib/libc/regex/engine.c | 115 ++++++-- lib/libc/regex/regcomp.c | 336 +++++++++++++++++------ lib/libc/regex/regex2.h | 4 + lib/libregex/tests/gnuext.in | 4 + lib/libregex/tests/libregex_test.sh | 4 - 8 files changed, 365 insertions(+), 106 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/regex/README b/contrib/netbsd-tests/lib/libc/regex/README index 6d9a28cf60ca..0e8a09a764ff 100644 --- a/contrib/netbsd-tests/lib/libc/regex/README +++ b/contrib/netbsd-tests/lib/libc/regex/README @@ -28,6 +28,7 @@ The full list of flags: $ REG_NOTEOL # REG_STARTEND (see below) p REG_PEND + P REG_POSIX For REG_STARTEND, the start/end offsets are those of the substring enclosed in (). diff --git a/contrib/netbsd-tests/lib/libc/regex/data/meta.in b/contrib/netbsd-tests/lib/libc/regex/data/meta.in index eb24075aea62..61e432353f6b 100644 --- a/contrib/netbsd-tests/lib/libc/regex/data/meta.in +++ b/contrib/netbsd-tests/lib/libc/regex/data/meta.in @@ -5,7 +5,7 @@ a\*c & a*c a*c a\\b & a\b a\b a\\\*b & a\*b a\*b # Begin FreeBSD -a\bc &C EESCAPE +a\bc &P abc abc # End FreeBSD a\ &C EESCAPE a\\bc & a\bc a\bc diff --git a/contrib/netbsd-tests/lib/libc/regex/main.c b/contrib/netbsd-tests/lib/libc/regex/main.c index eac4e2d9b51e..243c8dc5ff80 100644 --- a/contrib/netbsd-tests/lib/libc/regex/main.c +++ b/contrib/netbsd-tests/lib/libc/regex/main.c @@ -338,7 +338,7 @@ options(int type, char *s) { char *p; int o = (type == 'c') ? copts : eopts; - const char *legal = (type == 'c') ? "bisnmp" : "^$#tl"; + const char *legal = (type == 'c') ? "bisnmpP" : "^$#tl"; for (p = s; *p != '\0'; p++) if (strchr(legal, *p) != NULL) @@ -362,6 +362,9 @@ options(int type, char *s) case 'p': o |= REG_PEND; break; + case 'P': + o |= REG_POSIX; + break; case '^': o |= REG_NOTBOL; break; diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index e7da4cbc2a5d..bb40018c07e1 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -109,7 +109,7 @@ static int matcher(struct re_guts *g, const char *string, size_t nmatch, regmatc static const char *dissect(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst); static const char *backref(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst, sopno lev, int); static const char *walk(struct match *m, const char *start, const char *stop, sopno startst, sopno stopst, bool fast); -static states step(struct re_guts *g, sopno start, sopno stop, states bef, wint_t ch, states aft); +static states step(struct re_guts *g, sopno start, sopno stop, states bef, wint_t ch, states aft, int sflags); #define MAX_RECURSION 100 #define BOL (OUT-1) #define EOL (BOL-1) @@ -118,7 +118,12 @@ static states step(struct re_guts *g, sopno start, sopno stop, states bef, wint_ #define BOW (BOL-4) #define EOW (BOL-5) #define BADCHAR (BOL-6) +#define NWBND (BOL-7) #define NONCHAR(c) ((c) <= OUT) +/* sflags */ +#define SBOS 0x0001 +#define SEOS 0x0002 + #ifdef REDEBUG static void print(struct match *m, const char *caption, states st, int ch, FILE *d); #endif @@ -457,6 +462,10 @@ dissect(struct match *m, case OEOL: case OBOW: case OEOW: + case OBOS: + case OEOS: + case OWBND: + case ONWBND: break; case OANY: case OANYOF: @@ -589,6 +598,17 @@ dissect(struct match *m, return(sp); } +#define ISBOW(m, sp) \ + (sp < m->endp && ISWORD(*sp) && \ + ((sp == m->beginp && !(m->eflags®_NOTBOL)) || \ + (sp > m->offp && !ISWORD(*(sp-1))))) +#define ISEOW(m, sp) \ + (((sp == m->endp && !(m->eflags®_NOTEOL)) || \ + (sp < m->endp && *sp == '\n' && \ + (m->g->cflags®_NEWLINE)) || \ + (sp < m->endp && !ISWORD(*sp)) ) && \ + (sp > m->beginp && ISWORD(*(sp-1)))) \ + /* - backref - figure out what matched what, figuring in back references == static const char *backref(struct match *m, const char *start, \ @@ -646,6 +666,18 @@ backref(struct match *m, if (wc == BADCHAR || !CHIN(cs, wc)) return(NULL); break; + case OBOS: + if (sp == m->beginp && (m->eflags & REG_NOTBOL) == 0) + { /* yes */ } + else + return(NULL); + break; + case OEOS: + if (sp == m->endp && (m->eflags & REG_NOTEOL) == 0) + { /* yes */ } + else + return(NULL); + break; case OBOL: if ((sp == m->beginp && !(m->eflags®_NOTBOL)) || (sp > m->offp && sp < m->endp && @@ -662,20 +694,29 @@ backref(struct match *m, else return(NULL); break; + case OWBND: + if (ISBOW(m, sp) || ISEOW(m, sp)) + { /* yes */ } + else + return(NULL); + break; + case ONWBND: + if (((sp == m->beginp) && !ISWORD(*sp)) || + (sp == m->endp && !ISWORD(*(sp - 1)))) + { /* yes, beginning/end of subject */ } + else if (ISWORD(*(sp - 1)) == ISWORD(*sp)) + { /* yes, beginning/end of subject */ } + else + return(NULL); + break; case OBOW: - if (sp < m->endp && ISWORD(*sp) && - ((sp == m->beginp && !(m->eflags®_NOTBOL)) || - (sp > m->offp && !ISWORD(*(sp-1))))) + if (ISBOW(m, sp)) { /* yes */ } else return(NULL); break; case OEOW: - if (( (sp == m->endp && !(m->eflags®_NOTEOL)) || - (sp < m->endp && *sp == '\n' && - (m->g->cflags®_NEWLINE)) || - (sp < m->endp && !ISWORD(*sp)) ) && - (sp > m->beginp && ISWORD(*(sp-1))) ) + if (ISEOW(m, sp)) { /* yes */ } else return(NULL); @@ -814,15 +855,16 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, wint_t c; wint_t lastc; /* previous c */ wint_t flagch; - int i; + int i, sflags; const char *matchp; /* last p at which a match ended */ size_t clen; + sflags = 0; AT("slow", start, stop, startst, stopst); CLEAR(st); SET1(st, startst); SP("sstart", st, *p); - st = step(m->g, startst, stopst, st, NOTHING, st); + st = step(m->g, startst, stopst, st, NOTHING, st, sflags); if (fast) ASSIGN(fresh, st); matchp = NULL; @@ -839,6 +881,7 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, for (;;) { /* next character */ lastc = c; + sflags = 0; if (p == m->endp) { c = OUT; clen = 0; @@ -861,9 +904,20 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, flagch = (flagch == BOL) ? BOLEOL : EOL; i += m->g->neol; } + if (lastc == OUT && (m->eflags & REG_NOTBOL) == 0) { + sflags |= SBOS; + /* Step one more for BOS. */ + i++; + } + if (c == OUT && (m->eflags & REG_NOTEOL) == 0) { + sflags |= SEOS; + /* Step one more for EOS. */ + i++; + } if (i != 0) { for (; i > 0; i--) - st = step(m->g, startst, stopst, st, flagch, st); + st = step(m->g, startst, stopst, st, flagch, st, + sflags); SP("sboleol", st, c); } @@ -877,9 +931,20 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, flagch = EOW; } if (flagch == BOW || flagch == EOW) { - st = step(m->g, startst, stopst, st, flagch, st); + st = step(m->g, startst, stopst, st, flagch, st, sflags); SP("sboweow", st, c); } + if (lastc != OUT && c != OUT && + ISWORD(lastc) == ISWORD(c)) { + flagch = NWBND; + } else if ((lastc == OUT && !ISWORD(c)) || + (c == OUT && !ISWORD(lastc))) { + flagch = NWBND; + } + if (flagch == NWBND) { + st = step(m->g, startst, stopst, st, flagch, st, sflags); + SP("snwbnd", st, c); + } /* are we done? */ if (ISSET(st, stopst)) { @@ -898,9 +963,10 @@ walk(struct match *m, const char *start, const char *stop, sopno startst, else ASSIGN(st, empty); assert(c != OUT); - st = step(m->g, startst, stopst, tmp, c, st); + st = step(m->g, startst, stopst, tmp, c, st, sflags); SP("saft", st, c); - assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st)); + assert(EQ(step(m->g, startst, stopst, st, NOTHING, st, sflags), + st)); p += clen; } @@ -934,7 +1000,8 @@ step(struct re_guts *g, sopno stop, /* state after stop state within strip */ states bef, /* states reachable before */ wint_t ch, /* character or NONCHAR code */ - states aft) /* states already known reachable after */ + states aft, /* states already known reachable after */ + int sflags) /* state flags */ { cset *cs; sop s; @@ -955,6 +1022,14 @@ step(struct re_guts *g, if (ch == OPND(s)) FWD(aft, bef, 1); break; + case OBOS: + if ((ch == BOL || ch == BOLEOL) && (sflags & SBOS) != 0) + FWD(aft, bef, 1); + break; + case OEOS: + if ((ch == EOL || ch == BOLEOL) && (sflags & SEOS) != 0) + FWD(aft, bef, 1); + break; case OBOL: if (ch == BOL || ch == BOLEOL) FWD(aft, bef, 1); @@ -971,6 +1046,14 @@ step(struct re_guts *g, if (ch == EOW) FWD(aft, bef, 1); break; + case OWBND: + if (ch == BOW || ch == EOW) + FWD(aft, bef, 1); + break; + case ONWBND: + if (ch == NWBND) + FWD(aft, aft, 1); + break; case OANY: if (!NONCHAR(ch)) FWD(aft, bef, 1); diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 5cda77da1a6a..00ab6a77141b 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -92,6 +92,7 @@ struct parse { const char *next; /* next character in RE */ const char *end; /* end of string (-> NUL normally) */ int error; /* has an error been seen? */ + int gnuext; sop *strip; /* malloced strip */ sopno ssize; /* malloced strip size (allocated) */ sopno slen; /* malloced strip length (used) */ @@ -131,7 +132,9 @@ static int p_count(struct parse *p); static void p_bracket(struct parse *p); static int p_range_cmp(wchar_t c1, wchar_t c2); static void p_b_term(struct parse *p, cset *cs); +static int p_b_pseudoclass(struct parse *p, char c); static void p_b_cclass(struct parse *p, cset *cs); +static void p_b_cclass_named(struct parse *p, cset *cs, const char[]); static void p_b_eclass(struct parse *p, cset *cs); static wint_t p_b_symbol(struct parse *p); static wint_t p_b_coll_elem(struct parse *p, wint_t endc); @@ -181,6 +184,7 @@ static char nuls[10]; /* place to point scanner in event of error */ #define SEESPEC(a) (p->bre ? SEETWO('\\', a) : SEE(a)) #define EAT(c) ((SEE(c)) ? (NEXT(), 1) : 0) #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0) +#define EATSPEC(a) (p->bre ? EATTWO('\\', a) : EAT(a)) #define NEXT() (p->next++) #define NEXT2() (p->next += 2) #define NEXTn(n) (p->next += (n)) @@ -270,14 +274,22 @@ regcomp_internal(regex_t * __restrict preg, p->pbegin[i] = 0; p->pend[i] = 0; } +#ifdef LIBREGEX + if (cflags®_POSIX) { + p->gnuext = false; + p->allowbranch = (cflags & REG_EXTENDED) != 0; + } else + p->gnuext = p->allowbranch = true; +#else + p->gnuext = false; + p->allowbranch = (cflags & REG_EXTENDED) != 0; +#endif if (cflags & REG_EXTENDED) { - p->allowbranch = true; p->bre = false; p->parse_expr = p_ere_exp; p->pre_parse = NULL; p->post_parse = NULL; } else { - p->allowbranch = false; p->bre = true; p->parse_expr = p_simp_re; p->pre_parse = p_bre_pre_parse; @@ -372,6 +384,10 @@ p_ere_exp(struct parse *p, struct branchc *bc) sopno pos; int count; int count2; +#ifdef LIBREGEX + int i; + int handled; +#endif sopno subno; int wascaret = 0; @@ -379,6 +395,9 @@ p_ere_exp(struct parse *p, struct branchc *bc) assert(MORE()); /* caller should have ensured this */ c = GETNEXT(); +#ifdef LIBREGEX + handled = 0; +#endif pos = HERE(); switch (c) { case '(': @@ -441,6 +460,59 @@ p_ere_exp(struct parse *p, struct branchc *bc) case '\\': (void)REQUIRE(MORE(), REG_EESCAPE); wc = WGETNEXT(); +#ifdef LIBREGEX + if (p->gnuext) { + handled = 1; + switch (wc) { + case '`': + EMIT(OBOS, 0); + break; + case '\'': + EMIT(OEOS, 0); + break; + case 'B': + EMIT(ONWBND, 0); + break; + case 'b': + EMIT(OWBND, 0); + break; + case 'W': + case 'w': + case 'S': + case 's': + p_b_pseudoclass(p, wc); + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + i = wc - '0'; + assert(i < NPAREN); + if (p->pend[i] != 0) { + assert(i <= p->g->nsub); + EMIT(OBACK_, i); + assert(p->pbegin[i] != 0); + assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); + assert(OP(p->strip[p->pend[i]]) == ORPAREN); + (void) dupl(p, p->pbegin[i]+1, p->pend[i]); + EMIT(O_BACK, i); + } else + SETERROR(REG_ESUBREG); + p->g->backrefs = 1; + break; + default: + handled = 0; + } + /* Don't proceed to the POSIX bits if we've already handled it */ + if (handled) + break; + } +#endif switch (wc) { case '<': EMIT(OBOW, 0); @@ -551,7 +623,7 @@ p_branch_eat_delim(struct parse *p, struct branchc *bc) (void)bc; nskip = 0; - while (EAT('|')) + while (EATSPEC('|')) ++nskip; return (nskip); } @@ -697,7 +769,11 @@ p_re(struct parse *p, } if (p->post_parse != NULL) p->post_parse(p, &bc); - (void) REQUIRE(HERE() != bc.start, REG_EMPTY); + (void) REQUIRE(p->gnuext || HERE() != bc.start, REG_EMPTY); +#ifdef LIBREGEX + if (HERE() == bc.start && !p_branch_empty(p, &bc)) + break; +#endif if (!p->allowbranch) break; /* @@ -724,101 +800,134 @@ static bool /* was the simple RE an unbackslashed $? */ p_simp_re(struct parse *p, struct branchc *bc) { int c; + int cc; /* convenient/control character */ int count; int count2; sopno pos; + bool handled; int i; wint_t wc; sopno subno; # define BACKSL (1<gnuext) { + handled = true; + switch (c) { + case BACKSL|'`': + EMIT(OBOS, 0); + break; + case BACKSL|'\'': + EMIT(OEOS, 0); + break; + case BACKSL|'B': + EMIT(ONWBND, 0); + break; + case BACKSL|'b': + EMIT(OWBND, 0); + break; + case BACKSL|'W': + case BACKSL|'w': + case BACKSL|'S': + case BACKSL|'s': + p_b_pseudoclass(p, cc); + break; + default: + handled = false; + } + } +#endif } - switch (c) { - case '.': - if (p->g->cflags®_NEWLINE) - nonnewline(p); - else - EMIT(OANY, 0); - break; - case '[': - p_bracket(p); - break; - case BACKSL|'<': - EMIT(OBOW, 0); - break; - case BACKSL|'>': - EMIT(OEOW, 0); - break; - case BACKSL|'{': - SETERROR(REG_BADRPT); - break; - case BACKSL|'(': - p->g->nsub++; - subno = p->g->nsub; - if (subno < NPAREN) - p->pbegin[subno] = HERE(); - EMIT(OLPAREN, subno); - /* the MORE here is an error heuristic */ - if (MORE() && !SEETWO('\\', ')')) - p_re(p, '\\', ')'); - if (subno < NPAREN) { - p->pend[subno] = HERE(); - assert(p->pend[subno] != 0); + if (!handled) { + switch (c) { + case '.': + if (p->g->cflags®_NEWLINE) + nonnewline(p); + else + EMIT(OANY, 0); + break; + case '[': + p_bracket(p); + break; + case BACKSL|'<': + EMIT(OBOW, 0); + break; + case BACKSL|'>': + EMIT(OEOW, 0); + break; + case BACKSL|'{': + SETERROR(REG_BADRPT); + break; + case BACKSL|'(': + p->g->nsub++; + subno = p->g->nsub; + if (subno < NPAREN) + p->pbegin[subno] = HERE(); + EMIT(OLPAREN, subno); + /* the MORE here is an error heuristic */ + if (MORE() && !SEETWO('\\', ')')) + p_re(p, '\\', ')'); + if (subno < NPAREN) { + p->pend[subno] = HERE(); + assert(p->pend[subno] != 0); + } + EMIT(ORPAREN, subno); + (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN); + break; + case BACKSL|')': /* should not get here -- must be user */ + SETERROR(REG_EPAREN); + break; + case BACKSL|'1': + case BACKSL|'2': + case BACKSL|'3': + case BACKSL|'4': + case BACKSL|'5': + case BACKSL|'6': + case BACKSL|'7': + case BACKSL|'8': + case BACKSL|'9': + i = (c&~BACKSL) - '0'; + assert(i < NPAREN); + if (p->pend[i] != 0) { + assert(i <= p->g->nsub); + EMIT(OBACK_, i); + assert(p->pbegin[i] != 0); + assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); + assert(OP(p->strip[p->pend[i]]) == ORPAREN); + (void) dupl(p, p->pbegin[i]+1, p->pend[i]); + EMIT(O_BACK, i); + } else + SETERROR(REG_ESUBREG); + p->g->backrefs = 1; + break; + case '*': + /* + * Ordinary if used as the first character beyond BOL anchor of + * a (sub-)expression, counts as a bad repetition operator if it + * appears otherwise. + */ + (void)REQUIRE(bc->nchain == 0, REG_BADRPT); + /* FALLTHROUGH */ + default: + if (p->error != 0) + return (false); /* Definitely not $... */ + p->next--; + wc = WGETNEXT(); + if ((c & BACKSL) == 0 || may_escape(p, wc)) + ordinary(p, wc); + else + SETERROR(REG_EESCAPE); + break; } - EMIT(ORPAREN, subno); - (void)REQUIRE(EATTWO('\\', ')'), REG_EPAREN); - break; - case BACKSL|')': /* should not get here -- must be user */ - SETERROR(REG_EPAREN); - break; - case BACKSL|'1': - case BACKSL|'2': - case BACKSL|'3': - case BACKSL|'4': - case BACKSL|'5': - case BACKSL|'6': - case BACKSL|'7': - case BACKSL|'8': - case BACKSL|'9': - i = (c&~BACKSL) - '0'; - assert(i < NPAREN); - if (p->pend[i] != 0) { - assert(i <= p->g->nsub); - EMIT(OBACK_, i); - assert(p->pbegin[i] != 0); - assert(OP(p->strip[p->pbegin[i]]) == OLPAREN); - assert(OP(p->strip[p->pend[i]]) == ORPAREN); - (void) dupl(p, p->pbegin[i]+1, p->pend[i]); - EMIT(O_BACK, i); - } else - SETERROR(REG_ESUBREG); - p->g->backrefs = 1; - break; - case '*': - /* - * Ordinary if used as the first character beyond BOL anchor of - * a (sub-)expression, counts as a bad repetition operator if it - * appears otherwise. - */ - (void)REQUIRE(bc->nchain == 0, REG_BADRPT); - /* FALLTHROUGH */ - default: - if (p->error != 0) - return (false); /* Definitely not $... */ - p->next--; - wc = WGETNEXT(); - if ((c & BACKSL) == 0 || may_escape(p, wc)) - ordinary(p, wc); - else - SETERROR(REG_EESCAPE); - break; } if (EAT('*')) { /* implemented as +? */ @@ -827,6 +936,14 @@ p_simp_re(struct parse *p, struct branchc *bc) ASTERN(O_PLUS, pos); INSERT(OQUEST_, pos); ASTERN(O_QUEST, pos); +#ifdef LIBREGEX + } else if (p->gnuext && EATTWO('\\', '?')) { + INSERT(OQUEST_, pos); + ASTERN(O_QUEST, pos); + } else if (p->gnuext && EATTWO('\\', '+')) { + INSERT(OPLUS_, pos); + ASTERN(O_PLUS, pos); +#endif } else if (EATTWO('\\', '{')) { count = p_count(p); if (EAT(',')) { @@ -1018,6 +1135,41 @@ p_b_term(struct parse *p, cset *cs) } } +/* + - p_b_pseudoclass - parse a pseudo-class (\w, \W, \s, \S) + == static int p_b_pseudoclass(struct parse *p, char c) + */ +static int +p_b_pseudoclass(struct parse *p, char c) { + cset *cs; + + if ((cs = allocset(p)) == NULL) + return(0); + + if (p->g->cflags®_ICASE) + cs->icase = 1; + + switch (c) { + case 'W': + cs->invert = 1; + /* PASSTHROUGH */ + case 'w': + p_b_cclass_named(p, cs, "alnum"); + break; + case 'S': + cs->invert = 1; + /* PASSTHROUGH */ + case 's': + p_b_cclass_named(p, cs, "space"); + break; + default: + return(0); + } + + EMIT(OANYOF, (int)(cs - p->g->sets)); + return(1); +} + /* - p_b_cclass - parse a character-class name and deal with it == static void p_b_cclass(struct parse *p, cset *cs); @@ -1027,7 +1179,6 @@ p_b_cclass(struct parse *p, cset *cs) { const char *sp = p->next; size_t len; - wctype_t wct; char clname[16]; while (MORE() && isalpha((uch)PEEK())) @@ -1039,6 +1190,17 @@ p_b_cclass(struct parse *p, cset *cs) } memcpy(clname, sp, len); clname[len] = '\0'; + + p_b_cclass_named(p, cs, clname); +} +/* + - p_b_cclass_named - deal with a named character class + == static void p_b_cclass_named(struct parse *p, cset *cs, const char []); + */ +static void +p_b_cclass_named(struct parse *p, cset *cs, const char clname[]) { + wctype_t wct; + if ((wct = wctype(clname)) == 0) { SETERROR(REG_ECTYPE); return; @@ -1718,6 +1880,10 @@ findmust(struct parse *p, struct re_guts *g) case OEOW: case OBOL: case OEOL: + case OBOS: + case OEOS: + case OWBND: + case ONWBND: case O_QUEST: case O_CH: case OEND: @@ -1869,6 +2035,8 @@ altoffset(sop *scan, int offset) try++; case OBOW: case OEOW: + case OWBND: + case ONWBND: case OLPAREN: case ORPAREN: case OOR2: diff --git a/lib/libc/regex/regex2.h b/lib/libc/regex/regex2.h index a7c45683229c..19e3b7992982 100644 --- a/lib/libc/regex/regex2.h +++ b/lib/libc/regex/regex2.h @@ -104,6 +104,10 @@ typedef unsigned long sopno; #define O_CH (18L< b \B[abc]+ - bc \B[abc]\+ b bc +\`abc & abc abc +abc\' & abc abc \`abc\' & abc abc \`.+\' - abNc abNc \`.\+\' b abNc abNc (\`a) - Na +(a\`) - aN (a\') - aN +(\'a) - Na diff --git a/lib/libregex/tests/libregex_test.sh b/lib/libregex/tests/libregex_test.sh index 071f407cdb10..8ebe9b64ab63 100755 --- a/lib/libregex/tests/libregex_test.sh +++ b/lib/libregex/tests/libregex_test.sh @@ -29,10 +29,6 @@ check() { local dataname="${1}"; shift - if [ "${dataname}" == "gnuext" ]; then - atf_expect_fail "GNU extensions are not currently implemented" - fi - prog="$(atf_get_srcdir)/h_regex" data="$(atf_get_srcdir)/data/${dataname}.in" From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 04:59:16 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 B6BA84D129F; Mon, 28 Dec 2020 04:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D451c4G1Vz4hKB; Mon, 28 Dec 2020 04:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8101313FF6; Mon, 28 Dec 2020 04:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BS4xG6u090339; Mon, 28 Dec 2020 04:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BS4xGIg090338; Mon, 28 Dec 2020 04:59:16 GMT (envelope-from git) Date: Mon, 28 Dec 2020 04:59:16 GMT Message-Id: <202012280459.0BS4xGIg090338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Yuri Pankov Subject: git: 3cc3872829b1 - stable/12 - tools/tools/locale: skip control character widths MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3cc3872829b1852f3edea43f187c959fb264e95d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 04:59:16 -0000 The branch stable/12 has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=3cc3872829b1852f3edea43f187c959fb264e95d commit 3cc3872829b1852f3edea43f187c959fb264e95d Author: Yuri Pankov AuthorDate: 2020-12-23 12:49:25 +0000 Commit: Yuri Pankov CommitDate: 2020-12-28 04:58:51 +0000 tools/tools/locale: skip control character widths Do not explicitly encode control characters widths as 0 allowing wcwidth() to return the proper implicit value for non-printable characters (-1). Reported by: naddy (cherry picked from commit f952bdf1425d6a877f99b5c5ca59f25fc8bedabe) --- tools/tools/locale/etc/final-maps/widths.txt | 65 ---------------------------- tools/tools/locale/tools/getwidths.c | 4 ++ 2 files changed, 4 insertions(+), 65 deletions(-) diff --git a/tools/tools/locale/etc/final-maps/widths.txt b/tools/tools/locale/etc/final-maps/widths.txt index f01a4d5a0dd5..74c28ac58463 100644 --- a/tools/tools/locale/etc/final-maps/widths.txt +++ b/tools/tools/locale/etc/final-maps/widths.txt @@ -3,71 +3,6 @@ # utf8proc 2.5.0. # ----------------------------------------------------------------------------- WIDTH - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 0 0 0 diff --git a/tools/tools/locale/tools/getwidths.c b/tools/tools/locale/tools/getwidths.c index 670ebd957878..f1c7c6cc463d 100644 --- a/tools/tools/locale/tools/getwidths.c +++ b/tools/tools/locale/tools/getwidths.c @@ -35,12 +35,16 @@ main(void) { int32_t wc; int i, wcw; + utf8proc_category_t wcc; setlocale(LC_CTYPE, "C.UTF-8"); printf("%s\n", utf8proc_version()); for (wc = 0; wc < 0x110000; wc++) { + wcc = utf8proc_category(wc); + if (wcc == UTF8PROC_CATEGORY_CC) + continue; wcw = utf8proc_charwidth(wc); if (wcw == 1) continue; From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 12:38:55 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 E21094B3981; Mon, 28 Dec 2020 12:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4HCz60zXz3N73; Mon, 28 Dec 2020 12:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B277519760; Mon, 28 Dec 2020 12:38:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCctbE091084; Mon, 28 Dec 2020 12:38:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCctJ8091083; Mon, 28 Dec 2020 12:38:55 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:38:55 GMT Message-Id: <202012281238.0BSCctJ8091083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 1952bc128c99 - stable/11 - MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 1952bc128c9903a1a2985063685268522e995c14 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:38:55 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=1952bc128c9903a1a2985063685268522e995c14 commit 1952bc128c9903a1a2985063685268522e995c14 Author: Hans Petter Selasky AuthorDate: 2020-12-14 11:56:16 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:38:06 +0000 MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. Refer to section 9.2.3 in the USB 2.0 specification: Interfaces are numbered from zero to one less than the number of concurrent interfaces supported by the configuration. PR: 251784 Sponsored by: Mellanox Technologies // NVIDIA Networking --- lib/libusb/libusb20_desc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/libusb/libusb20_desc.c b/lib/libusb/libusb20_desc.c index c285193664ab..ce3aaab84b08 100644 --- a/lib/libusb/libusb20_desc.c +++ b/lib/libusb/libusb20_desc.c @@ -79,9 +79,10 @@ libusb20_parse_config_desc(const void *config_desc) if (ptr[1] != LIBUSB20_DT_CONFIG) { return (NULL); /* not config descriptor */ } + /* - * The first "bInterfaceNumber" should never have the value 0xff. - * Then it is corrupt. + * The first "bInterfaceNumber" cannot start at 0xFFFF + * because the field is 8-bit. */ niface_no_alt = 0; nendpoint = 0; @@ -204,12 +205,15 @@ libusb20_parse_config_desc(const void *config_desc) if (libusb20_me_decode(ptr, ptr[0], &last_if->desc)) { /* ignore */ } - /* - * Sometimes USB devices have corrupt interface - * descriptors and we need to overwrite the provided - * interface number! - */ - last_if->desc.bInterfaceNumber = niface - 1; + + /* detect broken USB descriptors when USB debugging is enabled */ + if (last_if->desc.bInterfaceNumber != (uint8_t)(niface - 1)) { + const char *str = getenv("LIBUSB_DEBUG"); + if (str != NULL && str[0] != '\0' && str[0] != '0') { + printf("LIBUSB_DEBUG: bInterfaceNumber(%u) is not sequential(%u)\n", + last_if->desc.bInterfaceNumber, niface - 1); + } + } last_if->extra.ptr = LIBUSB20_ADD_BYTES(ptr, ptr[0]); last_if->extra.len = 0; last_if->extra.type = LIBUSB20_ME_IS_RAW; From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 12:39:51 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 037C84B3831; Mon, 28 Dec 2020 12:39:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4HF26czHz3Mxs; Mon, 28 Dec 2020 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC46619765; Mon, 28 Dec 2020 12:39:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCdod0091214; Mon, 28 Dec 2020 12:39:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCdolh091213; Mon, 28 Dec 2020 12:39:50 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:39:50 GMT Message-Id: <202012281239.0BSCdolh091213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 931b121469a9 - stable/12 - MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 931b121469a940147e34279783be6ac7343a980c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:39:51 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=931b121469a940147e34279783be6ac7343a980c commit 931b121469a940147e34279783be6ac7343a980c Author: Hans Petter Selasky AuthorDate: 2020-12-14 11:56:16 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:39:04 +0000 MFC r368632: Be bug compatible with other operating systems by allowing non-sequential interface numbering for USB descriptors in userspace. Else certain USB control requests using the interface number, won't be recognized by the USB firmware. Refer to section 9.2.3 in the USB 2.0 specification: Interfaces are numbered from zero to one less than the number of concurrent interfaces supported by the configuration. PR: 251784 Sponsored by: Mellanox Technologies // NVIDIA Networking --- lib/libusb/libusb20_desc.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/libusb/libusb20_desc.c b/lib/libusb/libusb20_desc.c index 517a2e5972c3..3052af09e9c2 100644 --- a/lib/libusb/libusb20_desc.c +++ b/lib/libusb/libusb20_desc.c @@ -81,9 +81,10 @@ libusb20_parse_config_desc(const void *config_desc) if (ptr[1] != LIBUSB20_DT_CONFIG) { return (NULL); /* not config descriptor */ } + /* - * The first "bInterfaceNumber" should never have the value 0xff. - * Then it is corrupt. + * The first "bInterfaceNumber" cannot start at 0xFFFF + * because the field is 8-bit. */ niface_no_alt = 0; nendpoint = 0; @@ -206,12 +207,15 @@ libusb20_parse_config_desc(const void *config_desc) if (libusb20_me_decode(ptr, ptr[0], &last_if->desc)) { /* ignore */ } - /* - * Sometimes USB devices have corrupt interface - * descriptors and we need to overwrite the provided - * interface number! - */ - last_if->desc.bInterfaceNumber = niface - 1; + + /* detect broken USB descriptors when USB debugging is enabled */ + if (last_if->desc.bInterfaceNumber != (uint8_t)(niface - 1)) { + const char *str = getenv("LIBUSB_DEBUG"); + if (str != NULL && str[0] != '\0' && str[0] != '0') { + printf("LIBUSB_DEBUG: bInterfaceNumber(%u) is not sequential(%u)\n", + last_if->desc.bInterfaceNumber, niface - 1); + } + } last_if->extra.ptr = LIBUSB20_ADD_BYTES(ptr, ptr[0]); last_if->extra.len = 0; last_if->extra.type = LIBUSB20_ME_IS_RAW; From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 12:52:49 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 5368A4B3C60; Mon, 28 Dec 2020 12:52:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4HX075B8z3P12; Mon, 28 Dec 2020 12:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABBD219DBB; Mon, 28 Dec 2020 12:52:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCqmiM012710; Mon, 28 Dec 2020 12:52:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCqmuE012709; Mon, 28 Dec 2020 12:52:48 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:52:48 GMT Message-Id: <202012281252.0BSCqmuE012709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 59ded046d5ed - stable/11 - MFC r368658: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 59ded046d5ed159b334337166dc5dd0509531d1c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:52:49 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=59ded046d5ed159b334337166dc5dd0509531d1c commit 59ded046d5ed159b334337166dc5dd0509531d1c Author: Hans Petter Selasky AuthorDate: 2020-12-15 11:51:17 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:51:31 +0000 MFC r368658: Improve handling of alternate settings in the USB stack. Limit the number of alternate settings to 256. Else the alternate index variable may wrap around. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/usb_parse.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/usb_parse.c b/sys/dev/usb/usb_parse.c index 07446966fccf..e90973120626 100644 --- a/sys/dev/usb/usb_parse.c +++ b/sys/dev/usb/usb_parse.c @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -139,8 +139,20 @@ usb_idesc_foreach(struct usb_config_descriptor *cd, break; if ((id->bDescriptorType == UDESC_INTERFACE) && (id->bLength >= sizeof(*id))) { - if (ps->iface_no_last == id->bInterfaceNumber) + if (ps->iface_no_last == id->bInterfaceNumber) { + /* + * Don't allow more than 256 alternate + * settings to avoid overflowing the + * alternate index which is a 8-bit + * variable. + */ + if (ps->iface_index_alt == 255) { + DPRINTF("Interface(%u) has more than 256 alternate settings\n", + id->bInterfaceNumber); + continue; + } new_iface = 0; + } ps->iface_no_last = id->bInterfaceNumber; break; } From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 12:54:38 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 E41044B3F86; Mon, 28 Dec 2020 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4HZ665D5z3P6L; Mon, 28 Dec 2020 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C44F619DBE; Mon, 28 Dec 2020 12:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSCscCm012859; Mon, 28 Dec 2020 12:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSCscbm012856; Mon, 28 Dec 2020 12:54:38 GMT (envelope-from git) Date: Mon, 28 Dec 2020 12:54:38 GMT Message-Id: <202012281254.0BSCscbm012856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 4f89b6f56fb6 - stable/12 - MFC r368658: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 4f89b6f56fb65c0b4a41875e21967a11ec28d837 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 12:54:39 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=4f89b6f56fb65c0b4a41875e21967a11ec28d837 commit 4f89b6f56fb65c0b4a41875e21967a11ec28d837 Author: Hans Petter Selasky AuthorDate: 2020-12-15 11:51:17 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 12:53:47 +0000 MFC r368658: Improve handling of alternate settings in the USB stack. Limit the number of alternate settings to 256. Else the alternate index variable may wrap around. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/dev/usb/usb_parse.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/dev/usb/usb_parse.c b/sys/dev/usb/usb_parse.c index 5cace00fadc7..15bd1c967044 100644 --- a/sys/dev/usb/usb_parse.c +++ b/sys/dev/usb/usb_parse.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -141,8 +141,20 @@ usb_idesc_foreach(struct usb_config_descriptor *cd, break; if ((id->bDescriptorType == UDESC_INTERFACE) && (id->bLength >= sizeof(*id))) { - if (ps->iface_no_last == id->bInterfaceNumber) + if (ps->iface_no_last == id->bInterfaceNumber) { + /* + * Don't allow more than 256 alternate + * settings to avoid overflowing the + * alternate index which is a 8-bit + * variable. + */ + if (ps->iface_index_alt == 255) { + DPRINTF("Interface(%u) has more than 256 alternate settings\n", + id->bInterfaceNumber); + continue; + } new_iface = 0; + } ps->iface_no_last = id->bInterfaceNumber; break; } From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:02:08 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 128FF4B3CFD; Mon, 28 Dec 2020 13:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4Hkm0490z3PPg; Mon, 28 Dec 2020 13:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E961619FDA; Mon, 28 Dec 2020 13:02:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSD27QC023387; Mon, 28 Dec 2020 13:02:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSD27PB023386; Mon, 28 Dec 2020 13:02:07 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:02:07 GMT Message-Id: <202012281302.0BSD27PB023386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: d511b855ed55 - stable/11 - MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: d511b855ed55bf72e88f7b00fa1268379f30a792 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:02:08 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d511b855ed55bf72e88f7b00fa1268379f30a792 commit d511b855ed55bf72e88f7b00fa1268379f30a792 Author: Hans Petter Selasky AuthorDate: 2020-12-15 12:05:07 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:00:42 +0000 MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. Allow setting the alternate interface number to fail when there is only one alternate setting present, to comply with the USB specification. Refactor how iface->num_altsetting is computed. Bump the __FreeBSD_version due to change of core USB structure. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/src/linux_usb.c | 5 ----- sys/dev/usb/usb_device.c | 6 +++++- sys/dev/usb/usb_request.c | 15 +++++++++++++-- sys/dev/usb/usbdi.h | 4 +++- sys/sys/param.h | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index abef31e20a07..1875bbfa5e11 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -937,17 +937,12 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev) if (p_ui) { p_ui->altsetting = p_uhi - 1; p_ui->cur_altsetting = p_uhi - 1; - p_ui->num_altsetting = 1; p_ui->bsd_iface_index = iface_index; p_ui->linux_udev = udev; p_ui++; } iface_no_curr = iface_no; iface_index++; - } else { - if (p_ui) { - (p_ui - 1)->num_altsetting++; - } } break; diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 0af33a3145ee..a502478fb4f5 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -1,6 +1,6 @@ /* $FreeBSD$ */ /*- - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -898,6 +898,9 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* initialise interface */ do_init = 1; } + /* update number of alternate settings, if any */ + if (iface_index == USB_IFACE_INDEX_ANY) + iface->num_altsetting = ips.iface_index_alt + 1; } else do_init = 0; @@ -906,6 +909,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* update current number of endpoints */ ep_curr = ep_max; } + /* check for init */ if (do_init) { /* setup the USB interface structure */ diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index c6e43ec1e5a7..4ecd01df5877 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -2,7 +2,7 @@ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1433,6 +1433,7 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, { struct usb_interface *iface = usbd_get_iface(udev, iface_index); struct usb_device_request req; + usb_error_t err; if ((iface == NULL) || (iface->idesc == NULL)) return (USB_ERR_INVAL); @@ -1444,7 +1445,17 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, req.wIndex[0] = iface->idesc->bInterfaceNumber; req.wIndex[1] = 0; USETW(req.wLength, 0); - return (usbd_do_request(udev, mtx, &req, 0)); + err = usbd_do_request(udev, mtx, &req, 0); + if (err == USB_ERR_STALLED && iface->num_altsetting == 1) { + /* + * The USB specification chapter 9.4.10 says that USB + * devices having only one alternate setting are + * allowed to STALL this request. Ignore this failure. + */ + err = 0; + DPRINTF("Setting default alternate number failed. (ignored)\n"); + } + return (err); } /*------------------------------------------------------------------------* diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 5e8ba96f72f6..d43e751cb759 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -173,6 +173,9 @@ struct usb_endpoint { struct usb_interface { struct usb_interface_descriptor *idesc; device_t subdev; + /* Total number of alternate settings, from 1 to 256 */ + uint16_t num_altsetting; + /* Current alternate interface index, from 0 to 255 */ uint8_t alt_index; uint8_t parent_iface_index; @@ -182,7 +185,6 @@ struct usb_interface { struct usb_device *linux_udev; void *bsd_priv_sc; /* device specific information */ char *pnpinfo; /* additional PnP-info for this interface */ - uint8_t num_altsetting; /* number of alternate settings */ uint8_t bsd_iface_index; }; diff --git a/sys/sys/param.h b/sys/sys/param.h index 390255ade2de..1b52f24b2d6c 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1104510 /* Master, propagated to newvers */ +#define __FreeBSD_version 1104511 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:05:56 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 A20784B42B2; Mon, 28 Dec 2020 13:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4Hq84Cmsz3PnG; Mon, 28 Dec 2020 13:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 83D781A0ED; Mon, 28 Dec 2020 13:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSD5uO7024417; Mon, 28 Dec 2020 13:05:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSD5uRY024416; Mon, 28 Dec 2020 13:05:56 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:05:56 GMT Message-Id: <202012281305.0BSD5uRY024416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: f3d75bed5475 - stable/12 - MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f3d75bed5475b15f21edf4052665b1212b548bd0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:05:56 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=f3d75bed5475b15f21edf4052665b1212b548bd0 commit f3d75bed5475b15f21edf4052665b1212b548bd0 Author: Hans Petter Selasky AuthorDate: 2020-12-15 12:05:07 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:04:56 +0000 MFC r368659 and r368664: Improve handling of alternate settings in the USB stack. Allow setting the alternate interface number to fail when there is only one alternate setting present, to comply with the USB specification. Refactor how iface->num_altsetting is computed. Bump the __FreeBSD_version due to change of core USB structure. PR: 251856 Submitted by: Ma, Horse Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/src/linux_usb.c | 5 ----- sys/dev/usb/usb_device.c | 6 +++++- sys/dev/usb/usb_request.c | 15 +++++++++++++-- sys/dev/usb/usbdi.h | 4 +++- sys/sys/param.h | 2 +- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_usb.c b/sys/compat/linuxkpi/common/src/linux_usb.c index abef31e20a07..1875bbfa5e11 100644 --- a/sys/compat/linuxkpi/common/src/linux_usb.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -937,17 +937,12 @@ usb_linux_create_usb_device(struct usb_device *udev, device_t dev) if (p_ui) { p_ui->altsetting = p_uhi - 1; p_ui->cur_altsetting = p_uhi - 1; - p_ui->num_altsetting = 1; p_ui->bsd_iface_index = iface_index; p_ui->linux_udev = udev; p_ui++; } iface_no_curr = iface_no; iface_index++; - } else { - if (p_ui) { - (p_ui - 1)->num_altsetting++; - } } break; diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index ba49bef533c5..d6e4c0663aff 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -2,7 +2,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -900,6 +900,9 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* initialise interface */ do_init = 1; } + /* update number of alternate settings, if any */ + if (iface_index == USB_IFACE_INDEX_ANY) + iface->num_altsetting = ips.iface_index_alt + 1; } else do_init = 0; @@ -908,6 +911,7 @@ usb_config_parse(struct usb_device *udev, uint8_t iface_index, uint8_t cmd) /* update current number of endpoints */ ep_curr = ep_max; } + /* check for init */ if (do_init) { /* setup the USB interface structure */ diff --git a/sys/dev/usb/usb_request.c b/sys/dev/usb/usb_request.c index e0475efeb081..13117c0b9c77 100644 --- a/sys/dev/usb/usb_request.c +++ b/sys/dev/usb/usb_request.c @@ -4,7 +4,7 @@ * * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved. * Copyright (c) 1998 Lennart Augustsson. All rights reserved. - * Copyright (c) 2008 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2008-2020 Hans Petter Selasky. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -1439,6 +1439,7 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, { struct usb_interface *iface = usbd_get_iface(udev, iface_index); struct usb_device_request req; + usb_error_t err; if ((iface == NULL) || (iface->idesc == NULL)) return (USB_ERR_INVAL); @@ -1450,7 +1451,17 @@ usbd_req_set_alt_interface_no(struct usb_device *udev, struct mtx *mtx, req.wIndex[0] = iface->idesc->bInterfaceNumber; req.wIndex[1] = 0; USETW(req.wLength, 0); - return (usbd_do_request(udev, mtx, &req, 0)); + err = usbd_do_request(udev, mtx, &req, 0); + if (err == USB_ERR_STALLED && iface->num_altsetting == 1) { + /* + * The USB specification chapter 9.4.10 says that USB + * devices having only one alternate setting are + * allowed to STALL this request. Ignore this failure. + */ + err = 0; + DPRINTF("Setting default alternate number failed. (ignored)\n"); + } + return (err); } /*------------------------------------------------------------------------* diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 8d4ed43a132f..885a19fcfbe2 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -175,6 +175,9 @@ struct usb_endpoint { struct usb_interface { struct usb_interface_descriptor *idesc; device_t subdev; + /* Total number of alternate settings, from 1 to 256 */ + uint16_t num_altsetting; + /* Current alternate interface index, from 0 to 255 */ uint8_t alt_index; uint8_t parent_iface_index; @@ -184,7 +187,6 @@ struct usb_interface { struct usb_device *linux_udev; void *bsd_priv_sc; /* device specific information */ char *pnpinfo; /* additional PnP-info for this interface */ - uint8_t num_altsetting; /* number of alternate settings */ uint8_t bsd_iface_index; }; diff --git a/sys/sys/param.h b/sys/sys/param.h index 857274424f6c..1473009481e0 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1202504 /* Master, propagated to newvers */ +#define __FreeBSD_version 1202505 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:16:01 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 94F764B4905; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4J2n3nQsz3QRk; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 738D419E7A; Mon, 28 Dec 2020 13:16:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDG1n8035258; Mon, 28 Dec 2020 13:16:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDG1nG035257; Mon, 28 Dec 2020 13:16:01 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:16:01 GMT Message-Id: <202012281316.0BSDG1nG035257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: cc273d9909a2 - stable/12 - MFC r368329 and r368341: Fix definition of int64_t and uint64_t when long is 64-bit. This gets the kernel shim code in line with the rest of the kernel, sys/x86/include/_types.h. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cc273d9909a2ab19b1bfe7900cc0cc0a9959f41b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:16:01 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cc273d9909a2ab19b1bfe7900cc0cc0a9959f41b commit cc273d9909a2ab19b1bfe7900cc0cc0a9959f41b Author: Hans Petter Selasky AuthorDate: 2020-12-04 14:50:55 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:15:34 +0000 MFC r368329 and r368341: Fix definition of int64_t and uint64_t when long is 64-bit. This gets the kernel shim code in line with the rest of the kernel, sys/x86/include/_types.h. Sponsored by: Mellanox Technologies // NVIDIA Networking --- stand/kshim/bsd_kernel.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h index 4dfe307fef0c..1297eddc69a1 100644 --- a/stand/kshim/bsd_kernel.h +++ b/stand/kshim/bsd_kernel.h @@ -205,9 +205,17 @@ typedef unsigned int uint32_t; #define _INT32_T_DECLARED typedef signed int int32_t; #define _UINT64_T_DECLARED +#ifndef __LP64__ typedef unsigned long long uint64_t; -#define _INT16_T_DECLARED +#else +typedef unsigned long uint64_t; +#endif +#define _INT64_T_DECLARED +#ifndef __LP64__ typedef signed long long int64_t; +#else +typedef signed long int64_t; +#endif typedef uint16_t uid_t; typedef uint16_t gid_t; From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:18:35 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 6FCEB4B4776; Mon, 28 Dec 2020 13:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4J5l2gtCz3Qn0; Mon, 28 Dec 2020 13:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4F1D31A135; Mon, 28 Dec 2020 13:18:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDIZB6035521; Mon, 28 Dec 2020 13:18:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDIZrQ035520; Mon, 28 Dec 2020 13:18:35 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:18:35 GMT Message-Id: <202012281318.0BSDIZrQ035520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 8bebb7024d64 - stable/12 - MFC r368415: Properly define the bool type in the BSD kernel shim. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 8bebb7024d64859082e0bfbc9be6e42672543d16 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:18:35 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=8bebb7024d64859082e0bfbc9be6e42672543d16 commit 8bebb7024d64859082e0bfbc9be6e42672543d16 Author: Hans Petter Selasky AuthorDate: 2020-12-07 16:08:31 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:18:00 +0000 MFC r368415: Properly define the bool type in the BSD kernel shim. Sponsored by: Mellanox Technologies // NVIDIA Networking --- stand/kshim/bsd_kernel.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stand/kshim/bsd_kernel.h b/stand/kshim/bsd_kernel.h index 1297eddc69a1..882b02c0d85d 100644 --- a/stand/kshim/bsd_kernel.h +++ b/stand/kshim/bsd_kernel.h @@ -256,7 +256,12 @@ typedef uint8_t *bus_space_handle_t; typedef int bus_dma_filter_t(void *, bus_addr_t); typedef void bus_dma_lock_t(void *, bus_dma_lock_op_t); -typedef uint32_t bool; +#ifndef __bool_true_false_are_defined +#define __bool_true_false_are_defined +typedef _Bool bool; +#define true 1 +#define false 0 +#endif /* SYSINIT API */ From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:20:34 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 CB7304B4937; Mon, 28 Dec 2020 13:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4J825Qvnz3R28; Mon, 28 Dec 2020 13:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AD48A1A39D; Mon, 28 Dec 2020 13:20:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDKYbW043073; Mon, 28 Dec 2020 13:20:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDKY9u043072; Mon, 28 Dec 2020 13:20:34 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:20:34 GMT Message-Id: <202012281320.0BSDKY9u043072@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 20a930e44db4 - stable/12 - MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 20a930e44db4f6e89c6ee950081b8d1d0f39998a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:20:34 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=20a930e44db4f6e89c6ee950081b8d1d0f39998a commit 20a930e44db4f6e89c6ee950081b8d1d0f39998a Author: Hans Petter Selasky AuthorDate: 2020-12-07 09:48:06 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:19:47 +0000 MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/bitops.h | 2 +- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 7e259760f7c3..3bcfd69ba5c5 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -364,7 +364,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order, int reg_op) index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); - nbitsinlong = min(nbits_reg, BITS_PER_LONG); + nbitsinlong = MIN(nbits_reg, BITS_PER_LONG); mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index a23edfb0b4de..2d4b05ba5cb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -343,7 +343,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } seg_size = ((j - cur) << PAGE_SHIFT) - off; - sg_set_page(s, pages[cur], min(size, seg_size), off); + sg_set_page(s, pages[cur], MIN(size, seg_size), off); size -= seg_size; off = 0; cur = j; From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:22:02 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 5B44E4B4C3C; Mon, 28 Dec 2020 13:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4J9k250Zz3R5c; Mon, 28 Dec 2020 13:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A1F21A336; Mon, 28 Dec 2020 13:22:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDM2Q6046453; Mon, 28 Dec 2020 13:22:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDM29x046452; Mon, 28 Dec 2020 13:22:02 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:22:02 GMT Message-Id: <202012281322.0BSDM29x046452@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: cabe7f05fa0d - stable/11 - MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: cabe7f05fa0d7e6c65c2ed2836e66b2237647de8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:22:02 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=cabe7f05fa0d7e6c65c2ed2836e66b2237647de8 commit cabe7f05fa0d7e6c65c2ed2836e66b2237647de8 Author: Hans Petter Selasky AuthorDate: 2020-12-07 09:48:06 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:21:05 +0000 MFC r368406: Prefer using the MIN() function macro over the min() inline function in the LinuxKPI. Linux defines min() to be a macro, while in FreeBSD min() is a static inline function clamping its arguments to "unsigned int". Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/bitops.h | 2 +- sys/compat/linuxkpi/common/include/linux/scatterlist.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index f3c62596bcf5..f93c6e002247 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -357,7 +357,7 @@ linux_reg_op(unsigned long *bitmap, int pos, int order, int reg_op) index = pos / BITS_PER_LONG; offset = pos - (index * BITS_PER_LONG); nlongs_reg = BITS_TO_LONGS(nbits_reg); - nbitsinlong = min(nbits_reg, BITS_PER_LONG); + nbitsinlong = MIN(nbits_reg, BITS_PER_LONG); mask = (1UL << (nbitsinlong - 1)); mask += mask - 1; diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index 2531bbb42c73..8a7a38351331 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -341,7 +341,7 @@ __sg_alloc_table_from_pages(struct sg_table *sgt, } seg_size = ((j - cur) << PAGE_SHIFT) - off; - sg_set_page(s, pages[cur], min(size, seg_size), off); + sg_set_page(s, pages[cur], MIN(size, seg_size), off); size -= seg_size; off = 0; cur = j; From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:23:53 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 D2D264B4BEE; Mon, 28 Dec 2020 13:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4JCs5ghBz3h44; Mon, 28 Dec 2020 13:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B5CFB1A348; Mon, 28 Dec 2020 13:23:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDNrsw046596; Mon, 28 Dec 2020 13:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDNrl6046595; Mon, 28 Dec 2020 13:23:53 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:23:53 GMT Message-Id: <202012281323.0BSDNrl6046595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 08e90940e777 - stable/12 - MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 08e90940e7774937164f47632a1a736505bc92b5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:23:53 -0000 The branch stable/12 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=08e90940e7774937164f47632a1a736505bc92b5 commit 08e90940e7774937164f47632a1a736505bc92b5 Author: Hans Petter Selasky AuthorDate: 2020-11-30 09:47:53 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:23:13 +0000 MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/semaphore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/semaphore.h b/sys/compat/linuxkpi/common/include/linux/semaphore.h index 59a35311a5cc..e4a72fd9b47a 100644 --- a/sys/compat/linuxkpi/common/include/linux/semaphore.h +++ b/sys/compat/linuxkpi/common/include/linux/semaphore.h @@ -65,6 +65,6 @@ init_MUTEX(struct semaphore *sem) sema_init(&sem->sema, 1, "lnxsema"); } -#define sema_init linux_sema_init +#define sema_init(...) linux_sema_init(__VA_ARGS__) #endif /* _LINUX_SEMAPHORE_H_ */ From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 13:24:37 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 56FA14B4950; Mon, 28 Dec 2020 13:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4JDj1yn1z3hCK; Mon, 28 Dec 2020 13:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3625F1A349; Mon, 28 Dec 2020 13:24:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSDObIg046715; Mon, 28 Dec 2020 13:24:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSDObut046714; Mon, 28 Dec 2020 13:24:37 GMT (envelope-from git) Date: Mon, 28 Dec 2020 13:24:37 GMT Message-Id: <202012281324.0BSDObut046714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: a703dd3cb841 - stable/11 - MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: a703dd3cb8418252ce0af0db0eba928db3388b6b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 13:24:37 -0000 The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a703dd3cb8418252ce0af0db0eba928db3388b6b commit a703dd3cb8418252ce0af0db0eba928db3388b6b Author: Hans Petter Selasky AuthorDate: 2020-11-30 09:47:53 +0000 Commit: Hans Petter Selasky CommitDate: 2020-12-28 13:24:04 +0000 MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope. Sponsored by: Mellanox Technologies // NVIDIA Networking --- sys/compat/linuxkpi/common/include/linux/semaphore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/semaphore.h b/sys/compat/linuxkpi/common/include/linux/semaphore.h index 59a35311a5cc..e4a72fd9b47a 100644 --- a/sys/compat/linuxkpi/common/include/linux/semaphore.h +++ b/sys/compat/linuxkpi/common/include/linux/semaphore.h @@ -65,6 +65,6 @@ init_MUTEX(struct semaphore *sem) sema_init(&sem->sema, 1, "lnxsema"); } -#define sema_init linux_sema_init +#define sema_init(...) linux_sema_init(__VA_ARGS__) #endif /* _LINUX_SEMAPHORE_H_ */ From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 18:45:23 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 EC0264BDD18; Mon, 28 Dec 2020 18:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4RLq6K98z4Ytw; Mon, 28 Dec 2020 18:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBBE51DED1; Mon, 28 Dec 2020 18:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIjNUt097141; Mon, 28 Dec 2020 18:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIjN15097140; Mon, 28 Dec 2020 18:45:23 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:45:23 GMT Message-Id: <202012281845.0BSIjN15097140@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 69d73d07bae6 - stable/12 - MFC r339889 (by glebius): MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 69d73d07bae61be453cc08aa60a62e68cba2e7ed Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:45:24 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=69d73d07bae61be453cc08aa60a62e68cba2e7ed commit 69d73d07bae61be453cc08aa60a62e68cba2e7ed Author: Gleb Smirnoff AuthorDate: 2018-10-29 22:10:52 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 18:40:52 +0000 MFC r339889 (by glebius): Add a note that epoch(9) may change, to untie our hands for any future MFCs. Approved by: glebius (cherry picked from commit 24929e2cccdc62b19edb66d5f71c62562a051c8c) --- share/man/man9/epoch.9 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index da3345f5c181..48ad09d2e249 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -200,6 +200,10 @@ free would have to follow a call to .Fn epoch_wait . .Sh ERRORS None. +.Sh NOTES +The +.Nm +kernel programming interface is under development and is subject to change. .El .Sh SEE ALSO .Xr locking 9 , From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 18:50:29 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 F40D44BDCC0; Mon, 28 Dec 2020 18:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4RSh6b7bz4YyC; Mon, 28 Dec 2020 18:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D107F1E34B; Mon, 28 Dec 2020 18:50:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIoSY5004895; Mon, 28 Dec 2020 18:50:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIoSgm004894; Mon, 28 Dec 2020 18:50:28 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:50:28 GMT Message-Id: <202012281850.0BSIoSgm004894@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: e5f0664b1f33 - stable/12 - MFC r360492 (by bcr): MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e5f0664b1f3311846e321595dfb96254c7ae8696 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:50:29 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e5f0664b1f3311846e321595dfb96254c7ae8696 commit e5f0664b1f3311846e321595dfb96254c7ae8696 Author: Benedict Reuschling AuthorDate: 2020-04-30 11:17:29 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 18:48:09 +0000 MFC r360492 (by bcr): Add HISTORY sections to disk(9), driver(9), and epoch(9). Submitted by: gbergling_gmail.com Differential Revision: https://reviews.freebsd.org/D24243 (cherry picked from commit 8c63b2db53862c523bc2cb3f7c4d0243018eb3de) --- share/man/man9/disk.9 | 7 ++++++- share/man/man9/driver.9 | 7 ++++++- share/man/man9/epoch.9 | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9 index e65dc889b50e..081e63c67000 100644 --- a/share/man/man9/disk.9 +++ b/share/man/man9/disk.9 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 3, 2017 +.Dd April 30, 2020 .Dt DISK 9 .Os .Sh NAME @@ -241,6 +241,11 @@ Typically used to store a pointer to the drivers .Vt softc structure for this disk device. .El +.Sh HISTORY +The +.Nm kernel disk storage API +first appeard in +.Fx 4.9 . .Sh SEE ALSO .Xr GEOM 4 , .Xr devfs 5 , diff --git a/share/man/man9/driver.9 b/share/man/man9/driver.9 index a23b1ac41543..5dba1b94a6bb 100644 --- a/share/man/man9/driver.9 +++ b/share/man/man9/driver.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2011 +.Dd April 30, 2020 .Dt DRIVER 9 .Os .Sh NAME @@ -102,6 +102,11 @@ macro will also create the devclass with the name of the driver and can optionally call extra initialisation code in the driver by specifying an extra module event handler and argument as the last two arguments. +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 2.2.7 . .Sh SEE ALSO .Xr devclass 9 , .Xr device 9 , diff --git a/share/man/man9/epoch.9 b/share/man/man9/epoch.9 index 48ad09d2e249..bb16980da2da 100644 --- a/share/man/man9/epoch.9 +++ b/share/man/man9/epoch.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2019 +.Dd April 30, 2020 .Dt EPOCH 9 .Os .Sh NAME @@ -205,6 +205,11 @@ The .Nm kernel programming interface is under development and is subject to change. .El +.Sh HISTORY +The +.Nm +framework first appeard in +.Fx 11.0 . .Sh SEE ALSO .Xr locking 9 , .Xr mtx_pool 9 , From owner-dev-commits-src-branches@freebsd.org Mon Dec 28 18:52:12 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 7F6334BDF6D; Mon, 28 Dec 2020 18:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4RVh39Llz4ZTn; Mon, 28 Dec 2020 18:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5FBAB1E81F; Mon, 28 Dec 2020 18:52:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BSIqCr8008186; Mon, 28 Dec 2020 18:52:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BSIqCba008185; Mon, 28 Dec 2020 18:52:12 GMT (envelope-from git) Date: Mon, 28 Dec 2020 18:52:12 GMT Message-Id: <202012281852.0BSIqCba008185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 7d69f46f6474 - stable/12 - MFC r368791: disk(9): Fix a few mandoc related errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7d69f46f6474d3d225fd7e1d6711c610db75eb55 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2020 18:52:12 -0000 The branch stable/12 has been updated by gbe (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=7d69f46f6474d3d225fd7e1d6711c610db75eb55 commit 7d69f46f6474d3d225fd7e1d6711c610db75eb55 Author: Gordon Bergling AuthorDate: 2020-12-19 09:55:02 +0000 Commit: Gordon Bergling CommitDate: 2020-12-28 18:51:29 +0000 MFC r368791: disk(9): Fix a few mandoc related errors - function name without markup: g_io_deliver() - function name without markup: disk_gone() - sections out of conventional order: Sh SEE ALSO - referenced manual not found: Xr MAKE_DEV 9 Actually the man page of MAKE_DEV has never existed. (cherry picked from commit 9512f75fa8608d150178116ad63672672331b5e8) --- share/man/man9/disk.9 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/share/man/man9/disk.9 b/share/man/man9/disk.9 index 081e63c67000..32c659c0a8e6 100644 --- a/share/man/man9/disk.9 +++ b/share/man/man9/disk.9 @@ -172,9 +172,11 @@ kernel panic to record a copy of the system RAM to the disk. Optional: if this method is provided, it gives the disk driver the opportunity to override the default GEOM response to BIO_GETATTR requests. This function should return -1 if the attribute is not handled, 0 if the -attribute is handled, or an errno to be passed to g_io_deliver(). +attribute is handled, or an errno to be passed to +.Fn g_io_deliver . .It Vt "disk_gone_t *" Va d_gone -Optional: if this method is provided, it will be called after disk_gone() +Optional: if this method is provided, it will be called after +.Fn disk_gone is called, once GEOM has finished its cleanup process. Once this callback is called, it is safe for the disk driver to free all of its resources, as it will not be receiving further calls from GEOM. @@ -241,15 +243,14 @@ Typically used to store a pointer to the drivers .Vt softc structure for this disk device. .El +.Sh SEE ALSO +.Xr GEOM 4 , +.Xr devfs 5 .Sh HISTORY The .Nm kernel disk storage API first appeard in .Fx 4.9 . -.Sh SEE ALSO -.Xr GEOM 4 , -.Xr devfs 5 , -.Xr MAKE_DEV 9 .Sh AUTHORS This manual page was written by .An Robert Watson . From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 15:37:11 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 5050D4C302D; Tue, 29 Dec 2020 15:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4z7C1nN4z4k2V; Tue, 29 Dec 2020 15:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3056964C1; Tue, 29 Dec 2020 15:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTFbBgU068724; Tue, 29 Dec 2020 15:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTFbBKo068723; Tue, 29 Dec 2020 15:37:11 GMT (envelope-from git) Date: Tue, 29 Dec 2020 15:37:11 GMT Message-Id: <202012291537.0BTFbBKo068723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 3dc739019319 - stable/12 - libi386: remove CLANG_NO_IAS workaround MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 3dc739019319c8dae539affe6294c30caed89321 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 15:37:11 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3dc739019319c8dae539affe6294c30caed89321 commit 3dc739019319c8dae539affe6294c30caed89321 Author: Ed Maste AuthorDate: 2018-10-20 22:35:06 +0000 Commit: Ed Maste CommitDate: 2020-12-29 15:35:40 +0000 libi386: remove CLANG_NO_IAS workaround Clang's Integrated Assembler was previously disabled for i386 with the note that it "doesn't grok .codeNN directives yet." This is no longer the case (and hasn't been for some time), and the assembled output .text is identical between gas and IAS. MFC after: 2 months Sponsored by: The FreeBSD Foundation (cherry picked from commit 188b0da1ce6708f4168309f5b925f1c9df836bc7) --- stand/i386/libi386/Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stand/i386/libi386/Makefile b/stand/i386/libi386/Makefile index 9e25f7815cf3..58128e962822 100644 --- a/stand/i386/libi386/Makefile +++ b/stand/i386/libi386/Makefile @@ -51,7 +51,3 @@ CFLAGS+= -I${BOOTSRC}/ficl -I${BOOTSRC}/ficl/i386 \ CFLAGS+= ${FORMAT_EXTENSIONS} .include - -# XXX: clang integrated-as doesn't grok .codeNN directives yet -CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS} -CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS} From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 1E1DE4C460F; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50Gz0NRHz4mYG; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F04C76B4E; Tue, 29 Dec 2020 16:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSwNA023605; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSw7a023604; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSw7a023604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c0e78ec7ff15 - stable/12 - build: flip the bsdgrep default back to WITH_GNU_GREP_COMPAT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c0e78ec7ff1523be5bcd4ec67933b71d6c2f779c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c0e78ec7ff1523be5bcd4ec67933b71d6c2f779c commit c0e78ec7ff1523be5bcd4ec67933b71d6c2f779c Author: Kyle Evans AuthorDate: 2020-12-29 15:50:31 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:50:31 +0000 build: flip the bsdgrep default back to WITH_GNU_GREP_COMPAT libregex is a more functional provider of gnugrep compatibility. Turn the option back on by default for folks that opt to use bsdgrep. This is a direct commit to stable/12, because the option was removed from 13.0 rather than cycling back through default-on. --- share/mk/src.opts.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ef816e274a16..58c3ebb4cf0f 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -109,6 +109,7 @@ __DEFAULT_YES_OPTIONS = \ GDB \ GNU_DIFF \ GNU_GREP \ + GNU_GREP_COMPAT \ GOOGLETEST \ GPIO \ HAST \ @@ -202,7 +203,6 @@ __DEFAULT_NO_OPTIONS = \ CLANG_FORMAT \ DTRACE_TESTS \ GH_BC \ - GNU_GREP_COMPAT \ HESIOD \ LIBSOFT \ LLVM_ASSERTIONS \ From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 2E5CE4C41CB; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50Gz0t5mz4msJ; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0E51A6F0E; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSw7j023622; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSw7M023621; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSw7M023621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: cadd3b8fcb41 - stable/12 - bsdgrep: switch to libregex for GNU_GREP_COMPAT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: cadd3b8fcb416b8474b91f237671b49bc7b834e6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cadd3b8fcb416b8474b91f237671b49bc7b834e6 commit cadd3b8fcb416b8474b91f237671b49bc7b834e6 Author: Kyle Evans AuthorDate: 2020-08-04 02:47:24 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:49:42 +0000 bsdgrep: switch to libregex for GNU_GREP_COMPAT libregex is incomplete, but it's a bit less buggy than the in-base libgnuregex and mostly OK. While here, rename -DIWTH_GNU -> -DWITH_GNU_COMPAT; the option implies that we're compatible with the GNU counterpart, not that we're including GNU anything. (cherry picked from commit cab7d341dcd98138443bbdb51649f966093a3a84) --- usr.bin/grep/Makefile | 4 ++-- usr.bin/grep/grep.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index c3b07b9252c6..b51f51c8bd5e 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -61,8 +61,8 @@ MLINKS+= grep.1 egrep.1 \ .endif .if ${MK_GNU_GREP_COMPAT} != "no" -CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU -LIBADD+= gnuregex +CFLAGS+= -DWITH_GNU_COMPAT +LIBADD+= regex .endif HAS_TESTS= diff --git a/usr.bin/grep/grep.c b/usr.bin/grep/grep.c index a7ecc2015571..96be836601ad 100644 --- a/usr.bin/grep/grep.c +++ b/usr.bin/grep/grep.c @@ -555,7 +555,7 @@ main(int argc, char *argv[]) filebehave = FILE_MMAP; break; case 'V': -#ifdef WITH_GNU +#ifdef WITH_GNU_COMPAT printf(errstr[9], getprogname(), VERSION); #else printf(errstr[8], getprogname(), VERSION); From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:28:59 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 11F0D4C45E3; Tue, 29 Dec 2020 16:28:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50Gy6wBJz4mvL; Tue, 29 Dec 2020 16:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E002C6E26; Tue, 29 Dec 2020 16:28:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGSw9N023588; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGSwSi023587; Tue, 29 Dec 2020 16:28:58 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:28:58 GMT Message-Id: <202012291628.0BTGSwSi023587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 1d316b008577 - stable/12 - src.conf(5): regenerate after GNU_GREP_COMPAT default change MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1d316b008577909f7c2d5ebd4408c301f1d75ba9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:28:59 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1d316b008577909f7c2d5ebd4408c301f1d75ba9 commit 1d316b008577909f7c2d5ebd4408c301f1d75ba9 Author: Kyle Evans AuthorDate: 2020-12-29 15:58:21 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 15:58:21 +0000 src.conf(5): regenerate after GNU_GREP_COMPAT default change --- share/man/man5/src.conf.5 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 34df02c632f1..0e36281c78df 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd December 2, 2020 +.Dd December 29, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -827,10 +827,9 @@ and .It Va WITHOUT_GNU_GREP Set to not build GNU .Xr grep 1 . -.It Va WITH_GNU_GREP_COMPAT -Set this option to include GNU extensions in -.Xr bsdgrep 1 -by linking against libgnuregex. +.It Va WITHOUT_GNU_GREP_COMPAT +Set this option to omit the gnu extensions to grep from being included in +BSD grep. .It Va WITHOUT_GOOGLETEST Set to neither build nor install .Lb libgmock , From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:43:02 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 4F7F94C4A2C; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50bB1r0Sz4p89; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 31F5373AE; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGh2I4045944; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGh29d045943; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:43:02 GMT Message-Id: <202012291643.0BTGh29d045943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 7e436c56ca38 - stable/12 - crunchgen: fix NULL-deref bug introduced in r364647 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 7e436c56ca3814a899d0ad04433fa1b1ed7f5570 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:43:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=7e436c56ca3814a899d0ad04433fa1b1ed7f5570 commit 7e436c56ca3814a899d0ad04433fa1b1ed7f5570 Author: Alex Richardson AuthorDate: 2020-12-04 15:53:37 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 16:37:32 +0000 crunchgen: fix NULL-deref bug introduced in r364647 While porting over the local changes from CheriBSD for upstreaming, I accidentally committed a broken version of find_entry_point(): we have to return NULL if the value is not found instead of a value with ep->name == NULL, since the checks in main were changed to check ep instead of ep->name for NULL. This only matters if the crunched tool cannot be found using normal lookup and one of the fallback paths is used, so it's unlikely to be triggered in rescue. However, I noticed that one of our CheriBSD test scripts was failing to run commands under `su` on minimal disk images where all binaries are hardlinks to a `cheribsdbox` tool generated with crunchgen. This also updates the bootstrapping check in Makefile.inc1 to bootstrap crunchgen up to the next version bump. (cherry picked from commit f7ff7baaf62dd2e7b1f7b00c584cd4b968b4de1d) --- usr.sbin/crunch/crunchgen/crunched_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index 1b9ff1708538..5ce4416a137f 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -97,9 +97,9 @@ find_entry_point(const char *basename) for (ep = entry_points; ep->name != NULL; ep++) if (!strcmp(basename, ep->name)) - break; + return (ep); - return (ep); + return (NULL); } static const char * From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:43:02 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 3F3904C4A2B; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50bB1JnXz4p5v; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1FC3371DB; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGh2RD045927; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGh2Wo045926; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:43:02 GMT Message-Id: <202012291643.0BTGh2Wo045926@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 929eb23231d5 - stable/12 - Lift scope of buf[] to make it extend to a potential access via *basename MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 929eb23231d5e5b19b57b7a514c7ff99d79967dc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:43:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=929eb23231d5e5b19b57b7a514c7ff99d79967dc commit 929eb23231d5e5b19b57b7a514c7ff99d79967dc Author: Stefan Eßer AuthorDate: 2020-12-10 09:31:05 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 16:37:32 +0000 Lift scope of buf[] to make it extend to a potential access via *basename It can be assumed that the contents of the buffer was still allocated and valid at the point of the out-of-scope access, so there was no security issue in practice. (cherry picked from commit 7483b9e4dcfb4c444f8b5d54117fb6c8c48c20e9) --- usr.sbin/crunch/crunchgen/crunched_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index 5ce4416a137f..45f61baae23e 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -114,6 +114,7 @@ main(int argc, char **argv, char **envp) { struct stub *ep = NULL; const char *basename = NULL; + char buf[MAXPATHLEN]; /* * Look at __progname first (this will be set if the crunched binary is @@ -141,7 +142,6 @@ main(int argc, char **argv, char **envp) * try AT_EXECPATH to get the actual binary that was executed. */ if (ep == NULL) { - char buf[MAXPATHLEN]; int error = elf_aux_info(AT_EXECPATH, &buf, sizeof(buf)); if (error == 0) { From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 16:43:02 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 62C414C4B24; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D50bB2PSxz4p8B; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4564871DC; Tue, 29 Dec 2020 16:43:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTGh20T045961; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTGh2to045960; Tue, 29 Dec 2020 16:43:02 GMT (envelope-from git) Date: Tue, 29 Dec 2020 16:43:02 GMT Message-Id: <202012291643.0BTGh2to045960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 51f54754d53e - stable/12 - [rcorder] [crunch] Fix C function declarations to include void MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 51f54754d53ea255c901d4bdca18a3619f2ba496 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 16:43:02 -0000 The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=51f54754d53ea255c901d4bdca18a3619f2ba496 commit 51f54754d53ea255c901d4bdca18a3619f2ba496 Author: Adrian Chadd AuthorDate: 2020-09-21 17:59:45 +0000 Commit: Kyle Evans CommitDate: 2020-12-29 16:37:29 +0000 [rcorder] [crunch] Fix C function declarations to include void This fixes a compile issue under gcc6 which complains about legacy style C function declarations. (cherry picked from commit 0dcdda0984d779cd2024030535a7d270b18b273d) --- sbin/rcorder/rcorder.c | 6 +++--- usr.sbin/crunch/crunchgen/crunched_main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/rcorder/rcorder.c b/sbin/rcorder/rcorder.c index efcb7e261fdb..a8d4f4fdc3e1 100644 --- a/sbin/rcorder/rcorder.c +++ b/sbin/rcorder/rcorder.c @@ -990,7 +990,7 @@ do_file(filenode *fnode, strnodelist *stack_ptr) } static void -generate_graphviz_header() +generate_graphviz_header(void) { if (do_graphviz != true) @@ -1003,7 +1003,7 @@ generate_graphviz_header() } static void -generate_graphviz_footer() +generate_graphviz_footer(void) { if (do_graphviz == true) @@ -1011,7 +1011,7 @@ generate_graphviz_footer() } static void -generate_graphviz_providers() +generate_graphviz_providers(void) { Hash_Entry *entry; Hash_Search psearch; diff --git a/usr.sbin/crunch/crunchgen/crunched_main.c b/usr.sbin/crunch/crunchgen/crunched_main.c index d32589451260..1b9ff1708538 100644 --- a/usr.sbin/crunch/crunchgen/crunched_main.c +++ b/usr.sbin/crunch/crunchgen/crunched_main.c @@ -183,7 +183,7 @@ crunched_main(int argc, char **argv, char **envp) } static void -crunched_usage() +crunched_usage(void) { int columns, len; struct stub *ep; From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 19:15:54 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 784174C8A76; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D53zZ2zQFz3H17; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 58F7A11153; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJFsvH012344; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJFsAj012343; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:15:54 GMT Message-Id: <202012291915.0BTJFsAj012343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 696db1d8624f - stable/12 - Update GNU_DIFF knob descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 696db1d8624f7491e9ada5b1b162ea70fe88aa98 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:15:54 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=696db1d8624f7491e9ada5b1b162ea70fe88aa98 commit 696db1d8624f7491e9ada5b1b162ea70fe88aa98 Author: Ed Maste AuthorDate: 2020-05-20 17:20:48 +0000 Commit: Ed Maste CommitDate: 2020-12-29 19:15:31 +0000 Update GNU_DIFF knob descriptions After r317209 the WITH_/WITHOUT_GNU_DIFF knob controls only diff3; diff is always BSD diff. MFC after: 1 week (cherry picked from commit e578c8c3b51fdfa8dd4eafd113457d516d447984) --- tools/build/options/WITHOUT_GNU_DIFF | 2 -- tools/build/options/WITH_GNU_DIFF | 2 -- 2 files changed, 4 deletions(-) diff --git a/tools/build/options/WITHOUT_GNU_DIFF b/tools/build/options/WITHOUT_GNU_DIFF index de8667fe4d73..48d7361ff8ca 100644 --- a/tools/build/options/WITHOUT_GNU_DIFF +++ b/tools/build/options/WITHOUT_GNU_DIFF @@ -1,5 +1,3 @@ .\" $FreeBSD$ Set to not build GNU -.Xr diff 1 -and .Xr diff3 1 . diff --git a/tools/build/options/WITH_GNU_DIFF b/tools/build/options/WITH_GNU_DIFF index 3741e440a9ba..41827190aa94 100644 --- a/tools/build/options/WITH_GNU_DIFF +++ b/tools/build/options/WITH_GNU_DIFF @@ -1,5 +1,3 @@ .\" $FreeBSD$ Build and install GNU -.Xr diff 1 -and .Xr diff3 1 . From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 19:15:54 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 813EB4C87C9; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D53zZ3JrJz3Gqf; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6039710EE9; Tue, 29 Dec 2020 19:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJFsFI012363; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJFsWC012362; Tue, 29 Dec 2020 19:15:54 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:15:54 GMT Message-Id: <202012291915.0BTJFsWC012362@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 32cd91996213 - stable/12 - Add some non-default src.conf(5) knob descriptions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 32cd91996213ad11a6e10139fbc88e94b53b11b9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:15:54 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=32cd91996213ad11a6e10139fbc88e94b53b11b9 commit 32cd91996213ad11a6e10139fbc88e94b53b11b9 Author: Ed Maste AuthorDate: 2018-11-21 14:50:45 +0000 Commit: Ed Maste CommitDate: 2020-12-29 19:15:04 +0000 Add some non-default src.conf(5) knob descriptions Some WITH_/WITHOUT_ defaults will likey change in the future (e.g. as we migrate to copyfree base system components). Add non-default descriptions for the benefit of WIP branches. (cherry picked from commit 0161256ccc89660285140ea2056441ec8e882831) --- tools/build/options/WITHOUT_BSD_GREP | 2 ++ tools/build/options/WITH_GCOV | 4 ++++ tools/build/options/WITH_GNU_DIFF | 5 +++++ tools/build/options/WITH_GNU_GREP | 3 +++ tools/build/options/WITH_SENDMAIL | 4 ++++ tools/build/options/WITH_TCP_WRAPPERS | 4 ++++ 6 files changed, 22 insertions(+) diff --git a/tools/build/options/WITHOUT_BSD_GREP b/tools/build/options/WITHOUT_BSD_GREP new file mode 100644 index 000000000000..b598d8aca012 --- /dev/null +++ b/tools/build/options/WITHOUT_BSD_GREP @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Install GNU grep as '[ef]grep' instead of BSD grep. diff --git a/tools/build/options/WITH_GCOV b/tools/build/options/WITH_GCOV new file mode 100644 index 000000000000..a9f3eb68a82b --- /dev/null +++ b/tools/build/options/WITH_GCOV @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Build and install the GNU +.Xr gcov 1 +tool. diff --git a/tools/build/options/WITH_GNU_DIFF b/tools/build/options/WITH_GNU_DIFF new file mode 100644 index 000000000000..3741e440a9ba --- /dev/null +++ b/tools/build/options/WITH_GNU_DIFF @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Build and install GNU +.Xr diff 1 +and +.Xr diff3 1 . diff --git a/tools/build/options/WITH_GNU_GREP b/tools/build/options/WITH_GNU_GREP new file mode 100644 index 000000000000..1d19a7df092c --- /dev/null +++ b/tools/build/options/WITH_GNU_GREP @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Build and install GNU +.Xr grep 1 . diff --git a/tools/build/options/WITH_SENDMAIL b/tools/build/options/WITH_SENDMAIL new file mode 100644 index 000000000000..ca399c968fe1 --- /dev/null +++ b/tools/build/options/WITH_SENDMAIL @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Build and install +.Xr sendmail 8 +and related programs. diff --git a/tools/build/options/WITH_TCP_WRAPPERS b/tools/build/options/WITH_TCP_WRAPPERS new file mode 100644 index 000000000000..8fd8e2aa6c56 --- /dev/null +++ b/tools/build/options/WITH_TCP_WRAPPERS @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Build and install +.Xr tcpd 8 , +and related utilities. From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 19:17:13 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 824A64C8AB3; Tue, 29 Dec 2020 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D54153F2sz3H9l; Tue, 29 Dec 2020 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6017F10EEA; Tue, 29 Dec 2020 19:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTJHDY6012659; Tue, 29 Dec 2020 19:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTJHDR9012658; Tue, 29 Dec 2020 19:17:13 GMT (envelope-from git) Date: Tue, 29 Dec 2020 19:17:13 GMT Message-Id: <202012291917.0BTJHDR9012658@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 2aa6c0802bce - stable/12 - uplcom: add ATen/Prolific USB-232 Controller D USB ID MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2aa6c0802bce936a3f9a8f20515babdcf515c2b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 19:17:13 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2aa6c0802bce936a3f9a8f20515babdcf515c2b8 commit 2aa6c0802bce936a3f9a8f20515babdcf515c2b8 Author: Ed Maste AuthorDate: 2020-11-17 18:28:20 +0000 Commit: Ed Maste CommitDate: 2020-12-29 19:16:59 +0000 uplcom: add ATen/Prolific USB-232 Controller D USB ID PR: 251166 Submitted by: marcus MFC after: 2 weeks (cherry picked from commit 46a5f8837dff05f6581b908170aeecb811f1e95e) --- share/man/man4/uplcom.4 | 4 ++++ sys/dev/usb/serial/uplcom.c | 1 + sys/dev/usb/usbdevs | 1 + 3 files changed, 6 insertions(+) diff --git a/share/man/man4/uplcom.4 b/share/man/man4/uplcom.4 index 66f3e59d9e12..b79aac28a80c 100644 --- a/share/man/man4/uplcom.4 +++ b/share/man/man4/uplcom.4 @@ -82,6 +82,8 @@ Anchor Serial adapter .It ATEN UC-232A .It +ATEN UC-232B +.It BAFO BF-800 and BF-810 .It Belkin F5U257 @@ -134,6 +136,8 @@ Prolific Generic USB-Serial Adapters .It Prolific Pharos USB-Serial Adapter .It +Prolific USB-Serial Controller D +.It RATOC REX-USB60 .It Radio Shack USB Serial Cable diff --git a/sys/dev/usb/serial/uplcom.c b/sys/dev/usb/serial/uplcom.c index 8c1f758a2e37..a054601cc8ea 100644 --- a/sys/dev/usb/serial/uplcom.c +++ b/sys/dev/usb/serial/uplcom.c @@ -260,6 +260,7 @@ static const STRUCT_USB_HOST_ID uplcom_devs[] = { UPLCOM_DEV(ALCOR, AU9720), /* Alcor AU9720 USB 2.0-RS232 */ UPLCOM_DEV(ANCHOR, SERIAL), /* Anchor Serial adapter */ UPLCOM_DEV(ATEN, UC232A), /* PLANEX USB-RS232 URS-03 */ + UPLCOM_DEV(ATEN, UC232B), /* Prolific USB-RS232 Controller D */ UPLCOM_DEV(BELKIN, F5U257), /* Belkin F5U257 USB to Serial */ UPLCOM_DEV(COREGA, CGUSBRS232R), /* Corega CG-USBRS232R */ UPLCOM_DEV(EPSON, CRESSI_EDY), /* Cressi Edy diving computer */ diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index ca7d7ee74f6b..b64526593c25 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -1276,6 +1276,7 @@ product ATEN UC1284 0x2001 Parallel printer product ATEN UC10T 0x2002 10Mbps Ethernet product ATEN UC110T 0x2007 UC-110T Ethernet product ATEN UC232A 0x2008 Serial +product ATEN UC232B 0x2022 Serial product ATEN UC210T 0x2009 UC-210T Ethernet product ATEN DSB650C 0x4000 DSB-650C From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 22:27:01 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 892D94CCA6B; Tue, 29 Dec 2020 22:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D58D53W33z3kZh; Tue, 29 Dec 2020 22:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B7781375C; Tue, 29 Dec 2020 22:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTMR1mM044027; Tue, 29 Dec 2020 22:27:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTMR1DK044026; Tue, 29 Dec 2020 22:27:01 GMT (envelope-from git) Date: Tue, 29 Dec 2020 22:27:01 GMT Message-Id: <202012292227.0BTMR1DK044026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hiroki Sato Subject: git: 6338833c50a7 - stable/12 - Add MODULE_PNP_INFO() to vmci(4). This allows devd(8) to load the kernel module automatically when FreeBSD is running on VMware. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: hrs X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6338833c50a7566d006b722c791a6a92071309b8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 22:27:01 -0000 The branch stable/12 has been updated by hrs: URL: https://cgit.FreeBSD.org/src/commit/?id=6338833c50a7566d006b722c791a6a92071309b8 commit 6338833c50a7566d006b722c791a6a92071309b8 Author: Hiroki Sato AuthorDate: 2019-08-25 18:46:10 +0000 Commit: Hiroki Sato CommitDate: 2020-12-29 21:48:32 +0000 Add MODULE_PNP_INFO() to vmci(4). This allows devd(8) to load the kernel module automatically when FreeBSD is running on VMware. Reviewed by: mp Differential Revision: https://reviews.freebsd.org/D21182 (cherry picked from commit 639eac208771e9eb3d1141882514be35377abeee) --- sys/dev/vmware/vmci/vmci.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/dev/vmware/vmci/vmci.c b/sys/dev/vmware/vmci/vmci.c index dc029419e20d..82e23daa4c71 100644 --- a/sys/dev/vmware/vmci/vmci.c +++ b/sys/dev/vmware/vmci/vmci.c @@ -73,6 +73,16 @@ static driver_t vmci_driver = { static devclass_t vmci_devclass; DRIVER_MODULE(vmci, pci, vmci_driver, vmci_devclass, 0, 0); MODULE_VERSION(vmci, VMCI_VERSION); +const struct { + uint16_t vendor; + uint16_t device; + const char *desc; +} vmci_ids[] = { + { VMCI_VMWARE_VENDOR_ID, VMCI_VMWARE_DEVICE_ID, + "VMware Virtual Machine Communication Interface" }, +}; +MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, vmci, vmci_ids, + nitems(vmci_ids)); MODULE_DEPEND(vmci, pci, 1, 1, 1); @@ -112,10 +122,9 @@ static int vmci_probe(device_t dev) { - if (pci_get_vendor(dev) == VMCI_VMWARE_VENDOR_ID && - pci_get_device(dev) == VMCI_VMWARE_DEVICE_ID) { - device_set_desc(dev, - "VMware Virtual Machine Communication Interface"); + if (pci_get_vendor(dev) == vmci_ids[0].vendor && + pci_get_device(dev) == vmci_ids[0].device) { + device_set_desc(dev, vmci_ids[0].desc); return (BUS_PROBE_DEFAULT); } From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 23:06:44 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 D1F334CD7B9; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D595w5W2zz3mKl; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AF4FF14481; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6iFe093308; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6iKH093307; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6iKH093307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: f728bcf204ee - stable/12 - [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f728bcf204ee0e956c54ed896141e3469a8f62a7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:44 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=f728bcf204ee0e956c54ed896141e3469a8f62a7 commit f728bcf204ee0e956c54ed896141e3469a8f62a7 Author: Adrian Chadd AuthorDate: 2020-11-17 17:12:28 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4 This fixes a type signedness comparison warning-to-error on gcc-6.4. The ternary operation casts it right but the actual assignment doesn't. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D26791 (cherry picked from commit 44c52406ced4cbba704f9bec588a8238d5a5ef32) --- sbin/nvmecontrol/firmware.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/nvmecontrol/firmware.c b/sbin/nvmecontrol/firmware.c index ec7e54afc57e..e6ebc9b70321 100644 --- a/sbin/nvmecontrol/firmware.c +++ b/sbin/nvmecontrol/firmware.c @@ -159,8 +159,9 @@ static void update_firmware(int fd, uint8_t *payload, int32_t payload_size, uint8_t fwug) { struct nvme_pt_command pt; - uint64_t max_xfer_size; - int32_t off, resid, size; + uint64_t max_xfer_size; + int32_t off; + uint32_t resid, size; void *chunk; off = 0; @@ -175,8 +176,7 @@ update_firmware(int fd, uint8_t *payload, int32_t payload_size, uint8_t fwug) errx(EX_OSERR, "unable to malloc %zd bytes", (size_t)max_xfer_size); while (resid > 0) { - size = (resid >= (int32_t)max_xfer_size) ? - max_xfer_size : resid; + size = (resid >= max_xfer_size) ? max_xfer_size : resid; memcpy(chunk, payload + off, size); memset(&pt, 0, sizeof(pt)); From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 23:06:45 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 1AAA54CD634; Tue, 29 Dec 2020 23:06:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D595x0JTlz3mWF; Tue, 29 Dec 2020 23:06:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EFC4114482; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6irg093359; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6ivw093358; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:45 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=269b7d8ac1e533a1f214904ab7bce50f5c14fe3e commit 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e Author: Kyle Evans AuthorDate: 2020-03-05 22:45:16 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 tftpd: tests: raise targeted cstd to c11 r358556 added alignas() use to the functional tests, which isn't defined until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. Reported by: mhorne, Jenkins/CI (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe) --- libexec/tftpd/tests/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile index 06c5537372a7..9aa420cec1a5 100644 --- a/libexec/tftpd/tests/Makefile +++ b/libexec/tftpd/tests/Makefile @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 LIBADD= util WARNS?= 6 +CSTD= c11 .include From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 23:06:44 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 EE0314CD4D8; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D595w6Qtpz3mN2; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB164141A1; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6iMn093325; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6igT093324; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6igT093324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 0286ee71041c - stable/12 - [libnetmap] Fix 32 bit compilation under gcc-6.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0286ee71041c8b831aeb1abe75b9d4f555c88a97 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:45 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=0286ee71041c8b831aeb1abe75b9d4f555c88a97 commit 0286ee71041c8b831aeb1abe75b9d4f555c88a97 Author: Adrian Chadd AuthorDate: 2020-11-02 15:01:37 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 [libnetmap] Fix 32 bit compilation under gcc-6.4 Use uintptr_t to cast a uint64_t to a pointer type. Yeah, it isn't technically correct for platforms with pointers > 64 bits, but it's fine here. This fixes 32 bit compat library builds on amd64 and also mips32 builds. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D26790 (cherry picked from commit 26c29e743bbdbb82762540f72d4bc449bae2e092) --- lib/libnetmap/nmreq.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/libnetmap/nmreq.c b/lib/libnetmap/nmreq.c index 259056de37b4..7f4b2703d22d 100644 --- a/lib/libnetmap/nmreq.c +++ b/lib/libnetmap/nmreq.c @@ -603,10 +603,9 @@ nmreq_options_decode(const char *opt, struct nmreq_opt_parser parsers[], struct nmreq_option * nmreq_find_option(struct nmreq_header *h, uint32_t t) { - struct nmreq_option *o; + struct nmreq_option *o = NULL; - for (o = (struct nmreq_option *)h->nr_options; o != NULL; - o = (struct nmreq_option *)o->nro_next) { + nmreq_foreach_option(h, o) { if (o->nro_reqtype == t) break; } @@ -633,8 +632,14 @@ nmreq_free_options(struct nmreq_header *h) { struct nmreq_option *o, *next; - for (o = (struct nmreq_option *)h->nr_options; o != NULL; o = next) { - next = (struct nmreq_option *)o->nro_next; + /* + * Note: can't use nmreq_foreach_option() here; it frees the + * list as it's walking and nmreq_foreach_option() isn't + * modification-safe. + */ + for (o = (struct nmreq_option *)(uintptr_t)h->nr_options; o != NULL; + o = next) { + next = (struct nmreq_option *)(uintptr_t)o->nro_next; free(o); } } From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 23:06:44 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 F025A4CD7BA; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D595w6X9fz3mWD; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D39461421E; Tue, 29 Dec 2020 23:06:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BTN6ieP093342; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BTN6i9k093341; Tue, 29 Dec 2020 23:06:44 GMT (envelope-from git) Date: Tue, 29 Dec 2020 23:06:44 GMT Message-Id: <202012292306.0BTN6i9k093341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 62a77bb7edb2 - stable/12 - [libsa] Fix typecast of pointer for st_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 62a77bb7edb28d572c8642edce974631037119bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:06:45 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=62a77bb7edb28d572c8642edce974631037119bb commit 62a77bb7edb28d572c8642edce974631037119bb Author: Adrian Chadd AuthorDate: 2020-04-16 23:29:49 +0000 Commit: Ryan Libby CommitDate: 2020-12-29 23:04:40 +0000 [libsa] Fix typecast of pointer for st_dev This code was trying to use a pointer value for st_dev, which is definitely not a pointer. Instead, cast to uintptr_t so it becomes a non-pointer value before casting it. Tested: mips-gcc cross compile, mips32 build (cherry picked from commit 6c88ef1c81fce18d6545c4ee8d0df32a25098770) --- stand/libsa/pkgfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/libsa/pkgfs.c b/stand/libsa/pkgfs.c index d4794963b2c1..4f52b6bb6b9b 100644 --- a/stand/libsa/pkgfs.c +++ b/stand/libsa/pkgfs.c @@ -399,7 +399,7 @@ pkg_stat(struct open_file *f, struct stat *sb) sb->st_size = tf->tf_size; sb->st_blocks = (tf->tf_size + 511) / 512; sb->st_mtime = pkg_atol(tf->tf_hdr.ut_mtime, 12); - sb->st_dev = (off_t)tf->tf_pkg; + sb->st_dev = (off_t)((uintptr_t)tf->tf_pkg); sb->st_ino = tf->tf_ofs; /* unique per tf_pkg */ return (0); } From owner-dev-commits-src-branches@freebsd.org Tue Dec 29 23:32:53 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 2C8714CE4B7; Tue, 29 Dec 2020 23:32:53 +0000 (UTC) (envelope-from kevans@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 4D59h50WJvz3nlY; Tue, 29 Dec 2020 23:32:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 043E32DDF7; Tue, 29 Dec 2020 23:32:53 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f181.google.com with SMTP id v5so9994659qtv.7; Tue, 29 Dec 2020 15:32:53 -0800 (PST) X-Gm-Message-State: AOAM531Da3rull9z259xldBHH9uwj+YDdZPH7hkdf1B0RIMOhHeci7wN 8/NKVulZWegRbbDS5fCWojmu1KNzxlyR3Cmu5DY= X-Google-Smtp-Source: ABdhPJx43GpNZv3ehczfD9EyEaFNDlzUimF6k4Ck95EGHucYESFzS6DvrcE7nL07F25SilD2txSFBW1VJEh8+TaIAQY= X-Received: by 2002:ac8:7141:: with SMTP id h1mr50340234qtp.211.1609284772412; Tue, 29 Dec 2020 15:32:52 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> From: Kyle Evans Date: Tue, 29 Dec 2020 17:32:40 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 23:32:53 -0000 Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. On Tue, Dec 29, 2020, 17:07 Ryan Libby wrote: > The branch stable/12 has been updated by rlibby: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=269b7d8ac1e533a1f214904ab7bce50f5c14fe3e > > commit 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e > Author: Kyle Evans > AuthorDate: 2020-03-05 22:45:16 +0000 > Commit: Ryan Libby > CommitDate: 2020-12-29 23:04:40 +0000 > > tftpd: tests: raise targeted cstd to c11 > > r358556 added alignas() use to the functional tests, which isn't > defined > until C11. Raise the -std to C11 to fix the build under > freebsd-gcc{6,9}. > > Reported by: mhorne, Jenkins/CI > > (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe) > --- > libexec/tftpd/tests/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile > index 06c5537372a7..9aa420cec1a5 100644 > --- a/libexec/tftpd/tests/Makefile > +++ b/libexec/tftpd/tests/Makefile > @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 > > LIBADD= util > WARNS?= 6 > +CSTD= c11 > > .include > From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 00:38:21 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 15CA54CFBAE; Wed, 30 Dec 2020 00:38:21 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 4D5C7c73kZz3sSK; Wed, 30 Dec 2020 00:38:20 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f170.google.com with SMTP id f26so12898689qka.0; Tue, 29 Dec 2020 16:38:20 -0800 (PST) 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=r13nv4a05Q2iJbQkkcE3kjogHS5DVaTt5ul/RV1ChMI=; b=dUGV/v246Vl+QdwCH2MJ44Gj4/mcFN5lbKG2VjSu2ZbgXDZeVtGVwFYylFN2UOh5zV GcvRvIkjJVVaijaINgXrxLG8gyAFQ2G0WSLtVYITfo6BeHRcW8lPD6QP9gX0tZkULawf Ct9zYTwnKW8fYxu5xwwUtcuZF8OklIaw0JQxOOgSiCbfCvGypkSq4mPheOUhswa+/YRC TGUD2uz+3xR2y33lC7oVLoBzl7i2zWn89iaCArlbxggX7aNOyRj6Kk1zCdMhNW1b4WAR U+XNlxnJokM2GfmJxHsk0Np4CH3COQxxz4kG0dHzgLgZgsRccx7knCHlU27QPqMxk2qv d1gA== X-Gm-Message-State: AOAM5306d+VP6YGaMBlOh9tASaMQf5XK8MyL7hUUSJY2TjbCcyhQ63b9 Szdj21cQpw1FQZami3Uc5XK7eESwDBZbNQ== X-Google-Smtp-Source: ABdhPJxzcz2fHcqjl10TyseRi6/IanYe72JJIxkoqIJkj0UYc7QxcPAAFmr6YGdg/BM3UDXimbhKIQ== X-Received: by 2002:a37:63c3:: with SMTP id x186mr52708317qkb.361.1609288699799; Tue, 29 Dec 2020 16:38:19 -0800 (PST) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com. [209.85.222.179]) by smtp.gmail.com with ESMTPSA id c139sm25643196qke.24.2020.12.29.16.38.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 16:38:19 -0800 (PST) Received: by mail-qk1-f179.google.com with SMTP id z11so12842839qkj.7; Tue, 29 Dec 2020 16:38:19 -0800 (PST) X-Received: by 2002:a37:6189:: with SMTP id v131mr49752730qkb.337.1609288699044; Tue, 29 Dec 2020 16:38:19 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Tue, 29 Dec 2020 16:38:08 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5C7c73kZz3sSK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:38:21 -0000 On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > Ah, thanks for the reminder. I'll take another look re in-tree gcc. Based on the other commits I've MFC'd, I'm pretty sure it's been broken for months anyway, but I'll see what I can do if the fixes are easy. > On Tue, Dec 29, 2020, 17:07 Ryan Libby wrote: >> >> The branch stable/12 has been updated by rlibby: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=269b7d8ac1e533a1f214904ab7bce50f5c14fe3e >> >> commit 269b7d8ac1e533a1f214904ab7bce50f5c14fe3e >> Author: Kyle Evans >> AuthorDate: 2020-03-05 22:45:16 +0000 >> Commit: Ryan Libby >> CommitDate: 2020-12-29 23:04:40 +0000 >> >> tftpd: tests: raise targeted cstd to c11 >> >> r358556 added alignas() use to the functional tests, which isn't defined >> until C11. Raise the -std to C11 to fix the build under freebsd-gcc{6,9}. >> >> Reported by: mhorne, Jenkins/CI >> >> (cherry picked from commit 924e10b809a9fcbc8688c1b5848f60b48e6103fe) >> --- >> libexec/tftpd/tests/Makefile | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libexec/tftpd/tests/Makefile b/libexec/tftpd/tests/Makefile >> index 06c5537372a7..9aa420cec1a5 100644 >> --- a/libexec/tftpd/tests/Makefile >> +++ b/libexec/tftpd/tests/Makefile >> @@ -10,5 +10,6 @@ TEST_METADATA.functional+= timeout=15 >> >> LIBADD= util >> WARNS?= 6 >> +CSTD= c11 >> >> .include From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 00:50:24 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 21F1F4D0289; Wed, 30 Dec 2020 00:50:24 +0000 (UTC) (envelope-from kevans@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 4D5CPX06ftz3ssh; Wed, 30 Dec 2020 00:50:24 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id E40C42EB80; Wed, 30 Dec 2020 00:50:23 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f180.google.com with SMTP id c7so12883084qke.1; Tue, 29 Dec 2020 16:50:23 -0800 (PST) X-Gm-Message-State: AOAM530C0IDPdH82YaS4+dPru+RWlg/fskjZPat2EbgutJe5P/Defl23 jdDjsmzdHem3D14RfTDYuYjhucEL6w83iQowy8w= X-Google-Smtp-Source: ABdhPJzFeCD7EnDXXRpQJFEWlIC3LZFW692Gp+mbEnEDKIq+Cqj5lMic6WMqqpvBjeSJRivZsFTMvuf2dCCOu5z4AWo= X-Received: by 2002:a05:620a:14a:: with SMTP id e10mr49364383qkn.103.1609289423405; Tue, 29 Dec 2020 16:50:23 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 18:50:12 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:50:24 -0000 On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > Based on the other commits I've MFC'd, I'm pretty sure it's been > broken for months anyway, but I'll see what I can do if the fixes are > easy. > This should not be the case, we've been running arm/mips/etc. in CI up until the git transition. From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 00:53:07 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 91DA44D06FE; Wed, 30 Dec 2020 00:53:07 +0000 (UTC) (envelope-from kevans@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 4D5CSg3jhDz3tKZ; Wed, 30 Dec 2020 00:53:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7272C2E77D; Wed, 30 Dec 2020 00:53:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id j26so10101049qtq.8; Tue, 29 Dec 2020 16:53:07 -0800 (PST) X-Gm-Message-State: AOAM5321FCxADTHK6FqcZKmP8Kh24Pnnxz4tWE4wSAmgmj7iXAUwJ3DF PYnIhEZpIFktHwp9CsphTmU1kikvWlEHEaz2zI4= X-Google-Smtp-Source: ABdhPJzIW2LkzhBPl0GeGOv2j0QpfkFHran+nskWUirJ6LfXgVKCE6VLsAQEj9iqiKq4lpx9efSZ4Shai+/PFLvvzAM= X-Received: by 2002:ac8:44cb:: with SMTP id b11mr50138712qto.60.1609289587090; Tue, 29 Dec 2020 16:53:07 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 18:52:56 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: Ryan Libby , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 00:53:07 -0000 On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > broken for months anyway, but I'll see what I can do if the fixes are > > easy. > > > > This should not be the case, we've been running arm/mips/etc. in CI up > until the git transition. Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 01:00:38 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 E69D14D0AA8; Wed, 30 Dec 2020 01:00:38 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 4D5CdL61gnz3thp; Wed, 30 Dec 2020 01:00:38 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f169.google.com with SMTP id h4so12905239qkk.4; Tue, 29 Dec 2020 17:00:38 -0800 (PST) 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=+yNFOdVgGztdWkwFYLFx4xuyZCRAGIxeDgb8udcbaqU=; b=L3XzXqp1VlF301BYlQjrbXssoAcIc1uD/EM2Ii6QrGJtAv7cyoES1SXsQ5yVyx7KBV d2uTO+HVGlaQKVzCySFkeJLozqnSCfWxSfuH92y1mZUCi8x3umc5qPqBtdiqmkD432nX JHj3ZSQAJL+j5Ek/XdJFXPGad7GJRv0GZWQH/t79FqGtaNtLqQYfIX7XbXzj2qsbVCGH FxpQYwBwknqETm40TT33hiHRMc0ignI6X3q8IUIF0Jq0iVsCpRniXvFo+xuhapQVZ3si s9ohjHZDR1KmlkwqzE6jqi0xvLBVd+P3pAmhaldEKOUwEalVgVaf7Zgqf6MVy7VUJ11l bbFQ== X-Gm-Message-State: AOAM531Q8mhWD0tuc7j9Cm2R8RfuOn0YrFdseoG/KT67V+NnV4oC6uJJ +d18HMFqm/GHiYMxBUl2A/YNV/y0trjPPQ== X-Google-Smtp-Source: ABdhPJzDrSByZwcp6OFvmua5VkSSNiTitjWLAkME5ATPNVO/MCkAHrM2AcqFiV0eiUQ3ZeE0J2UQug== X-Received: by 2002:a37:aa42:: with SMTP id t63mr50325564qke.271.1609290037331; Tue, 29 Dec 2020 17:00:37 -0800 (PST) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com. [209.85.219.42]) by smtp.gmail.com with ESMTPSA id r6sm27469862qkk.127.2020.12.29.17.00.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 17:00:37 -0800 (PST) Received: by mail-qv1-f42.google.com with SMTP id l14so7144328qvh.2; Tue, 29 Dec 2020 17:00:37 -0800 (PST) X-Received: by 2002:ad4:57ab:: with SMTP id g11mr54673920qvx.38.1609290036929; Tue, 29 Dec 2020 17:00:36 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Tue, 29 Dec 2020 17:00:26 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5CdL61gnz3thp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 01:00:39 -0000 On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > broken for months anyway, but I'll see what I can do if the fixes are > > > easy. > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > until the git transition. > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. Perhaps only x86 was broken... How was tftpd/tests not already broken with alignas from r367305 which MFC'd r358556? In any case my plan right now is to try to remember the gcc 4.2 voodoo, assess, and fix. Please let me know if you think this needs immediate revert before then. Ryan From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 01:21:35 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 6E3414D1301; Wed, 30 Dec 2020 01:21:35 +0000 (UTC) (envelope-from kevans@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 4D5D5W2X3Hz3vmd; Wed, 30 Dec 2020 01:21:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 43A4F2EE08; Wed, 30 Dec 2020 01:21:35 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f45.google.com with SMTP id bd6so7135103qvb.9; Tue, 29 Dec 2020 17:21:35 -0800 (PST) X-Gm-Message-State: AOAM530pyC6sq/KbgzRDSYItHWgsR98ppFH9bCvhRwEQBSf0FkjyysWl jMhebEoZn3YoRjazBbYoMMkTtGb6TTiS4HSawi0= X-Google-Smtp-Source: ABdhPJw1o1c1Qc/dvlnIXKe+DSLj41GahcSKe2HhZ6IvrSoY2C5g67ckZoQ0Y+26LCk6t330X9jlkcfzi0GlVsBbRIs= X-Received: by 2002:a0c:8b60:: with SMTP id d32mr54586011qvc.60.1609291294779; Tue, 29 Dec 2020 17:21:34 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 19:21:23 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 01:21:35 -0000 On Tue, Dec 29, 2020 at 7:00 PM Ryan Libby wrote: > > On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > > broken for months anyway, but I'll see what I can do if the fixes are > > > > easy. > > > > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > > until the git transition. > > > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. > > Perhaps only x86 was broken... > > How was tftpd/tests not already broken with alignas from r367305 which > MFC'd r358556? > That is an incredibly good question. The latest build for powerpc shows that it did in-fact descend into and build libexec/tftpd/tests > In any case my plan right now is to try to remember the gcc 4.2 > voodoo, assess, and fix. Please let me know if you think this needs > immediate revert before then. > Nah, I wouldn't expend the energy on a revert, tbh. If you don't get it figured out by tomorrow or so, I'll re-test and smack it. From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 03:02:54 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 B60274D28D7; Wed, 30 Dec 2020 03:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5GLQ4Hm5z4VrY; Wed, 30 Dec 2020 03:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8662917165; Wed, 30 Dec 2020 03:02:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BU32s5F086848; Wed, 30 Dec 2020 03:02:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BU32snB086847; Wed, 30 Dec 2020 03:02:54 GMT (envelope-from git) Date: Wed, 30 Dec 2020 03:02:54 GMT Message-Id: <202012300302.0BU32snB086847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 0efb22eebbbb - stable/12 - MFC r356352, r368272 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0efb22eebbbbd5f164cab39dca72a78cce82afe3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:02:54 -0000 The branch stable/12 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0efb22eebbbbd5f164cab39dca72a78cce82afe3 commit 0efb22eebbbbd5f164cab39dca72a78cce82afe3 Author: Alan Somers AuthorDate: 2020-01-04 18:59:46 +0000 Commit: Alan Somers CommitDate: 2020-12-30 03:02:47 +0000 MFC r356352, r368272 lio_listio_empty_nowait_thread sometimes does *not* hang. The other tests consistently do hang though. Sponsored by: DellEMC (cherry picked from commit 0cb4586a0be3b1b5909b73b24798032ddf2f4002) AIO tests: update expected failure messages after r368265 PR: 220398, 251515 (cherry picked from commit 23693bd8f3e36b4721d7b59d52154d3e3f49e3cd) --- tests/sys/aio/lio_test.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/sys/aio/lio_test.c b/tests/sys/aio/lio_test.c index 383d80bc0c3f..b6965cc9a4ee 100644 --- a/tests/sys/aio/lio_test.c +++ b/tests/sys/aio/lio_test.c @@ -143,8 +143,8 @@ ATF_TC_BODY(lio_listio_empty_nowait_kevent, tc) int kq, result; void *udata = (void*)0xdeadbeefdeadbeef; - atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - " asynchronous notification if nent==0"); + atf_tc_expect_timeout("Bug 251515 - lio_listio(2) never sends" + " kevent if nent==0"); kq = kqueue(); ATF_REQUIRE(kq > 0); sev.sigev_notify = SIGEV_KEVENT; @@ -168,8 +168,6 @@ ATF_TC_BODY(lio_listio_empty_nowait_signal, tc) struct aiocb *list = NULL; struct sigevent sev; - atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); sev.sigev_notify = SIGEV_SIGNAL; sev.sigev_signo = SIGUSR1; @@ -189,8 +187,6 @@ ATF_TC_BODY(lio_listio_empty_nowait_thread, tc) struct aiocb *list = NULL; struct sigevent sev; - atf_tc_expect_timeout("Bug 220398 - lio_listio(2) never sends" - " asynchronous notification if nent==0"); ATF_REQUIRE_EQ(0, sem_init(&completions, false, 0)); bzero(&sev, sizeof(sev)); sev.sigev_notify = SIGEV_THREAD; From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 03:10:15 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 328834D3818; Wed, 30 Dec 2020 03:10:15 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 4D5GVv0kptz4W4H; Wed, 30 Dec 2020 03:10:14 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qt1-f176.google.com with SMTP id z3so10224163qtw.9; Tue, 29 Dec 2020 19:10:14 -0800 (PST) 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=Xg8am78M2YOGiEQVPEXH22ENvr1qsE039C11ZTQJa/A=; b=etk7bwhRqwS+7QI4WgHCxCKx676AtgMmm1xd7eg5xM0Rwm2EV7Jb9YjpQ/jOfMasxN RoXkMkXszlhmwAtaIHkO/bmVjKQY0v+CRX1fZEUytJWcSW6TvQjrHVmV/aqOkyct/8HF Jz8QpvsrWBqTyoJfwVHtj1Gi27rGGq1vOGZu4EaIuJmCmGCmf7tusje/l0jw3F5POPVW DRMgpY6HUjAS6G9ilooX4XFDHvaednWjccbcu+Io4q6zGp5YrcYh1YJozfPf1+CB+/ht NEi5hXe8LoGZxDEhb5s6vT3Rj89C96DHhefssHPVFF8Z3AFuYHoG+BPHkipVtSGwdccm zzrg== X-Gm-Message-State: AOAM533PZ89qdAg2iPKuYFcWGqtoELvOqyiWAjZza8m+LS2HFYMxiwWc 2YT2XBFl7Fj4+98nM2Hkcd2LWn+kHyqFSw== X-Google-Smtp-Source: ABdhPJw6hiMWs0tmYmOuzfLaStxV55fwri2H0Cqlst8q8zOebbH23zDmlVLTDW28ts+i9SlxrGvKyA== X-Received: by 2002:ac8:6659:: with SMTP id j25mr52137321qtp.322.1609297813651; Tue, 29 Dec 2020 19:10:13 -0800 (PST) Received: from mail-qv1-f41.google.com (mail-qv1-f41.google.com. [209.85.219.41]) by smtp.gmail.com with ESMTPSA id u20sm27248963qtb.9.2020.12.29.19.10.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 29 Dec 2020 19:10:13 -0800 (PST) Received: by mail-qv1-f41.google.com with SMTP id bd6so7211999qvb.9; Tue, 29 Dec 2020 19:10:13 -0800 (PST) X-Received: by 2002:ad4:5762:: with SMTP id r2mr55275016qvx.45.1609297813071; Tue, 29 Dec 2020 19:10:13 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Tue, 29 Dec 2020 19:10:02 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5GVv0kptz4W4H X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:10:15 -0000 On Tue, Dec 29, 2020 at 5:21 PM Kyle Evans wrote: > > On Tue, Dec 29, 2020 at 7:00 PM Ryan Libby wrote: > > > > On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > > > > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > > > broken for months anyway, but I'll see what I can do if the fixes are > > > > > easy. > > > > > > > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > > > until the git transition. > > > > > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. > > > > Perhaps only x86 was broken... > > > > How was tftpd/tests not already broken with alignas from r367305 which > > MFC'd r358556? > > > > That is an incredibly good question. The latest build for powerpc > shows that it did in-fact descend into and build libexec/tftpd/tests > > > In any case my plan right now is to try to remember the gcc 4.2 > > voodoo, assess, and fix. Please let me know if you think this needs > > immediate revert before then. > > > > Nah, I wouldn't expend the energy on a revert, tbh. If you don't get > it figured out by tomorrow or so, I'll re-test and smack it. Okay, what's going on is that the tftpd/tests/Makefile was already not building the test for gcc < 4.3, due to lack of __COUNTER__. The use of _Alignas and -std=c11 would require gcc 4.7. If we cared, we would bump the minimum gcc version required accordingly. However, since there's no reason to build with gcc >= 4.3 and < 4.7, I don't think we care and I think the current state of affairs on stable/12 is acceptable. I checked powerpc.powerpc64 with in-tree gcc 4.2.1 and buildworld succeeded. Hopefully ci will be up again soon too. I checked amd64 and it failed due to pkru. I don't think we care to fix that either, but we technically could of course. For amd64 the external toolchain with gcc 6.4 is broken at the moment but will be fixed after a few more MFCs. Thanks for reviewing this MFC! From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 03:17:59 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 210C84D3A8B; Wed, 30 Dec 2020 03:17:59 +0000 (UTC) (envelope-from bdragon@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 4D5Ggq0Dzsz4Wbs; Wed, 30 Dec 2020 03:17:59 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id E96852FAEE; Wed, 30 Dec 2020 03:17:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 9FB8527C0054; Tue, 29 Dec 2020 22:17:58 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Tue, 29 Dec 2020 22:17:58 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id E03C7C200A5; Tue, 29 Dec 2020 22:17:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <3b4bc9dc-e868-4171-829e-682d8aab7369@www.fastmail.com> In-Reply-To: References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> Date: Tue, 29 Dec 2020 21:17:37 -0600 From: "Brandon Bergren" To: "Kyle Evans" , "Ryan Libby" Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: =?UTF-8?Q?Re:_git:_269b7d8ac1e5_-_stable/12_-_tftpd:_tests:_raise_target?= =?UTF-8?Q?ed_cstd_to_c11?= Content-Type: text/plain X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:17:59 -0000 On Tue, Dec 29, 2020, at 7:21 PM, Kyle Evans wrote: > > That is an incredibly good question. The latest build for powerpc > shows that it did in-fact descend into and build libexec/tftpd/tests The tests need to get *built* since they're part of the sets, even if they aren't currently *run* nightly on the CI. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 03:20:10 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 B074B4D38AB; Wed, 30 Dec 2020 03:20:10 +0000 (UTC) (envelope-from kevans@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 4D5GkL4WWzz4WwJ; Wed, 30 Dec 2020 03:20:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 88FDE2FBF8; Wed, 30 Dec 2020 03:20:10 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f180.google.com with SMTP id v5so10248936qtv.7; Tue, 29 Dec 2020 19:20:10 -0800 (PST) X-Gm-Message-State: AOAM533tZ1XgBd1SBI2YLk/EuROTU/j1co9LXH/4qdDGEo3PMue/9nnj KGuX8CBYktvh0v0la/4Xtd+8Fl2DpFNvmVqtkeg= X-Google-Smtp-Source: ABdhPJzZhgRK813mBdod4uCN4jn+0y7kqKCSEQRhZNSWgSQT7pkqRukcuOK+ZuBwLg99+6puJtyeY3lqQsz+x2gJdYU= X-Received: by 2002:ac8:44cb:: with SMTP id b11mr50494483qto.60.1609298410179; Tue, 29 Dec 2020 19:20:10 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 29 Dec 2020 21:19:59 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:20:10 -0000 On Tue, Dec 29, 2020 at 9:10 PM Ryan Libby wrote: > > On Tue, Dec 29, 2020 at 5:21 PM Kyle Evans wrote: > > > > On Tue, Dec 29, 2020 at 7:00 PM Ryan Libby wrote: > > > > > > On Tue, Dec 29, 2020 at 4:53 PM Kyle Evans wrote: > > > > > > > > On Tue, Dec 29, 2020 at 6:50 PM Kyle Evans wrote: > > > > > > > > > > On Tue, Dec 29, 2020 at 6:38 PM Ryan Libby wrote: > > > > > > > > > > > > On Tue, Dec 29, 2020 at 3:32 PM Kyle Evans wrote: > > > > > > > > > > > > > > Hmm, I hadn't done this because we still have in-tree GCC4.2. Might want to go ahead and skip these tests entirely a level up for 4.2. > > > > > > > > > > > > > > > > > > > Ah, thanks for the reminder. I'll take another look re in-tree gcc. > > > > > > Based on the other commits I've MFC'd, I'm pretty sure it's been > > > > > > broken for months anyway, but I'll see what I can do if the fixes are > > > > > > easy. > > > > > > > > > > > > > > > > This should not be the case, we've been running arm/mips/etc. in CI up > > > > > until the git transition. > > > > > > > > Sorry, arm is irrelevant for this branch- but mips/powerpc/sparc64. > > > > > > Perhaps only x86 was broken... > > > > > > How was tftpd/tests not already broken with alignas from r367305 which > > > MFC'd r358556? > > > > > > > That is an incredibly good question. The latest build for powerpc > > shows that it did in-fact descend into and build libexec/tftpd/tests > > > > > In any case my plan right now is to try to remember the gcc 4.2 > > > voodoo, assess, and fix. Please let me know if you think this needs > > > immediate revert before then. > > > > > > > Nah, I wouldn't expend the energy on a revert, tbh. If you don't get > > it figured out by tomorrow or so, I'll re-test and smack it. > > Okay, what's going on is that the tftpd/tests/Makefile was already not > building the test for gcc < 4.3, due to lack of __COUNTER__. The use of > _Alignas and -std=c11 would require gcc 4.7. If we cared, we would bump > the minimum gcc version required accordingly. However, since there's > no reason to build with gcc >= 4.3 and < 4.7, I don't think we care and > I think the current state of affairs on stable/12 is acceptable. > > I checked powerpc.powerpc64 with in-tree gcc 4.2.1 and buildworld > succeeded. Hopefully ci will be up again soon too. > > I checked amd64 and it failed due to pkru. I don't think we care to fix > that either, but we technically could of course. For amd64 the external > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > few more MFCs. > > Thanks for reviewing this MFC! Excellent, thanks for taking a look (and merging this back)! From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 03:20:58 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 501534D3847; Wed, 30 Dec 2020 03:20:58 +0000 (UTC) (envelope-from bdragon@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 4D5GlG1bgWz4WyY; Wed, 30 Dec 2020 03:20:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from auth1-smtp.messagingengine.com (auth1-smtp.messagingengine.com [66.111.4.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: bdragon/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 294412FE1F; Wed, 30 Dec 2020 03:20:58 +0000 (UTC) (envelope-from bdragon@FreeBSD.org) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailauth.nyi.internal (Postfix) with ESMTP id 04D8327C0054; Tue, 29 Dec 2020 22:20:58 -0500 (EST) Received: from imap1 ([10.202.2.51]) by compute3.internal (MEProxy); Tue, 29 Dec 2020 22:20:58 -0500 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddvvddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdluddtmdenucfjughrpefofgggkfgjfhffhffvufgtsehttdertder reejnecuhfhrohhmpedfuehrrghnughonhcuuegvrhhgrhgvnhdfuceosggurhgrghhonh eshfhrvggvuefuffdrohhrgheqnecuggftrfgrthhtvghrnhepjefhfedtuddtleegkeeg tdegjeekffdvjedttdehgffgveeugffgfeelvdeghffgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsggurhgrghhonhdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidquddtgedvfeehkeeigedqudekuddtkeehuddqsggurh grghhonheppefhrhgvvgeuufffrdhorhhgsehimhgrphdrtggt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 32650C200A5; Tue, 29 Dec 2020 22:20:58 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.1-61-gb52c239-fm-20201210.001-gb52c2396 Mime-Version: 1.0 Message-Id: <210fcf35-150f-46dd-981c-30e77b843716@www.fastmail.com> In-Reply-To: References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> Date: Tue, 29 Dec 2020 21:20:37 -0600 From: "Brandon Bergren" To: "Ryan Libby" , "Kyle Evans" Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: =?UTF-8?Q?Re:_git:_269b7d8ac1e5_-_stable/12_-_tftpd:_tests:_raise_target?= =?UTF-8?Q?ed_cstd_to_c11?= Content-Type: text/plain X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:20:58 -0000 On Tue, Dec 29, 2020, at 9:10 PM, Ryan Libby wrote: > I checked powerpc.powerpc64 with in-tree gcc 4.2.1 and buildworld > succeeded. Hopefully ci will be up again soon too. > OK, as long as buildworld is still working, I'm happy. -- Brandon Bergren bdragon@FreeBSD.org From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 03:23:04 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 2957F4D3BB6; Wed, 30 Dec 2020 03:23:04 +0000 (UTC) (envelope-from kevans@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 4D5Gnh0Qrgz4XBQ; Wed, 30 Dec 2020 03:23:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id F01B52FAF1; Wed, 30 Dec 2020 03:23:03 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f170.google.com with SMTP id z9so10274308qtn.4; Tue, 29 Dec 2020 19:23:03 -0800 (PST) X-Gm-Message-State: AOAM532qNSwV8IrqE6MY8Mk5B7prVN1hHGP2rCwVPTvHpOGicKlYd8vH WBli5MdnnNadeazunasvAhpN7WFX6cUiRBAYX10= X-Google-Smtp-Source: ABdhPJx0P4gE0v4YVSpg9LzEbRgV1LgQ5O0ZGnW8k5hS4OiogNz0UDz9wvirFNVBrYbETm3bITdfvitgmuhkX2ff3/Q= X-Received: by 2002:ac8:729a:: with SMTP id v26mr50929603qto.53.1609298583516; Tue, 29 Dec 2020 19:23:03 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> <3b4bc9dc-e868-4171-829e-682d8aab7369@www.fastmail.com> In-Reply-To: <3b4bc9dc-e868-4171-829e-682d8aab7369@www.fastmail.com> From: Kyle Evans Date: Tue, 29 Dec 2020 21:22:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Brandon Bergren Cc: Ryan Libby , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 03:23:04 -0000 On Tue, Dec 29, 2020 at 9:18 PM Brandon Bergren wrote: > > On Tue, Dec 29, 2020, at 7:21 PM, Kyle Evans wrote: > > > > That is an incredibly good question. The latest build for powerpc > > shows that it did in-fact descend into and build libexec/tftpd/tests > > The tests need to get *built* since they're part of the sets, even if they aren't currently *run* nightly on the CI. > Ryan already pointed out the flaw in my logic (they didn't actually get built, I should have checked libexec/tftpd/tests/Makefile), but the fact that they're not run wasn't significant to this discussion -- the problem observed would have been at compile-time due to an unknown standard or because we weren't specifying the appropriate standard (pre-merge). From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 11:33:57 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 2B5524BF22C; Wed, 30 Dec 2020 11:33:57 +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 4D5Th45ty6z3FYh; Wed, 30 Dec 2020 11:33:56 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.16.1/8.16.1) with ESMTPS id 0BUBXhL2017240 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 30 Dec 2020 13:33:47 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0BUBXhL2017240 Received: (from kostik@localhost) by tom.home (8.16.1/8.16.1/Submit) id 0BUBXha0017239; Wed, 30 Dec 2020 13:33:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 30 Dec 2020 13:33:43 +0200 From: Konstantin Belousov To: Ryan Libby Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 Message-ID: References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 4D5Th45ty6z3FYh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 11:33:57 -0000 On Tue, Dec 29, 2020 at 07:10:02PM -0800, Ryan Libby wrote: > I checked amd64 and it failed due to pkru. I don't think we care to fix > that either, but we technically could of course. For amd64 the external > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > few more MFCs. Could you be more specific, please? What is broken with PKRU, the gcc 6.4 build? For kernel, or libc? Does it work with not-so-ancient gcc? From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 11:51:28 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 1B5114BF56A; Wed, 30 Dec 2020 11:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5V4H5CB9z3GNp; Wed, 30 Dec 2020 11:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 165731D92A; Wed, 30 Dec 2020 11:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUBpPhV032196; Wed, 30 Dec 2020 11:51:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUBpPas032195; Wed, 30 Dec 2020 11:51:25 GMT (envelope-from git) Date: Wed, 30 Dec 2020 11:51:25 GMT Message-Id: <202012301151.0BUBpPas032195@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d3912bec58d0 - stable/12 - Implement strerror_l(). MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: d3912bec58d0b82509a0973cae02f156986d88fa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 11:51:28 -0000 The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d3912bec58d0b82509a0973cae02f156986d88fa commit d3912bec58d0b82509a0973cae02f156986d88fa Author: Konstantin Belousov AuthorDate: 2020-12-16 09:02:09 +0000 Commit: Konstantin Belousov CommitDate: 2020-12-30 10:44:23 +0000 Implement strerror_l(). PR: 251651 MFC of r368692, r368723 (cherry picked from commit 675079b1ea61b310f3a42cb0d352a49c1780f89a) (cherry picked from commit 65bf3043365bd86fc5d4d387ad0c42217f11330b) --- include/string.h | 2 +- include/xlocale/_string.h | 1 + lib/libc/include/libc_private.h | 5 ++++ lib/libc/nls/msgcat.c | 9 ++++++- lib/libc/string/Makefile.inc | 1 + lib/libc/string/Symbol.map | 4 ++++ lib/libc/string/strerror.3 | 52 +++++++++++++++++++++++++++++++++-------- lib/libc/string/strerror.c | 46 +++++++++++++++++++++++++++--------- 8 files changed, 97 insertions(+), 23 deletions(-) diff --git a/include/string.h b/include/string.h index 3c5cceaeb857..774cf5fe9756 100644 --- a/include/string.h +++ b/include/string.h @@ -140,7 +140,7 @@ int timingsafe_bcmp(const void *, const void *, size_t); int timingsafe_memcmp(const void *, const void *, size_t); #endif /* __BSD_VISIBLE */ -#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_) +#if __POSIX_VISIBLE >= 200112 || defined(_XLOCALE_H_) #include #endif diff --git a/include/xlocale/_string.h b/include/xlocale/_string.h index 7fdad7562860..6df9132de171 100644 --- a/include/xlocale/_string.h +++ b/include/xlocale/_string.h @@ -46,6 +46,7 @@ typedef struct _xlocale *locale_t; * POSIX2008 functions */ int strcoll_l(const char *, const char *, locale_t); +char *strerror_l(int num, locale_t); size_t strxfrm_l(char *, const char *, size_t, locale_t); #endif /* _XLOCALE_STRING1_H */ diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 181900fa4ba8..d3fe788e9654 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -429,4 +429,9 @@ void ___pthread_cleanup_pop_imp(int); void __throw_constraint_handler_s(const char * restrict msg, int error); +struct __nl_cat_d; +struct _xlocale; +struct __nl_cat_d *__catopen_l(const char *name, int type, + struct _xlocale *locale); + #endif /* _LIBC_PRIVATE_H_ */ diff --git a/lib/libc/nls/msgcat.c b/lib/libc/nls/msgcat.c index 5eb3273f7269..918d188142b8 100644 --- a/lib/libc/nls/msgcat.c +++ b/lib/libc/nls/msgcat.c @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "../locale/xlocale_private.h" +#include "libc_private.h" #define _DEFAULT_NLS_PATH "/usr/share/nls/%L/%N.cat:/usr/share/nls/%N/%L:/usr/local/share/nls/%L/%N.cat:/usr/local/share/nls/%N/%L" @@ -118,6 +119,12 @@ SLIST_HEAD(listhead, catentry) cache = nl_catd catopen(const char *name, int type) +{ + return (__catopen_l(name, type, __get_locale())); +} + +nl_catd +__catopen_l(const char *name, int type, locale_t locale) { struct stat sbuf; struct catentry *np; @@ -136,7 +143,7 @@ catopen(const char *name, int type) lang = NULL; else { if (type == NL_CAT_LOCALE) - lang = querylocale(LC_MESSAGES_MASK, __get_locale()); + lang = querylocale(LC_MESSAGES_MASK, locale); else lang = getenv("LANG"); diff --git a/lib/libc/string/Makefile.inc b/lib/libc/string/Makefile.inc index 3df53f05d390..6e6a3f42f723 100644 --- a/lib/libc/string/Makefile.inc +++ b/lib/libc/string/Makefile.inc @@ -64,6 +64,7 @@ MLINKS+=strcpy.3 stpcpy.3 \ strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_l.3 \ strerror.3 strerror_r.3 \ strerror.3 sys_errlist.3 \ strerror.3 sys_nerr.3 diff --git a/lib/libc/string/Symbol.map b/lib/libc/string/Symbol.map index 83c6eb34dc2a..450b745c7e0a 100644 --- a/lib/libc/string/Symbol.map +++ b/lib/libc/string/Symbol.map @@ -110,6 +110,10 @@ FBSD_1.5 { timingsafe_memcmp; }; +FBSD_1.6 { + strerror_l; +}; + FBSDprivate_1.0 { __strtok_r; }; diff --git a/lib/libc/string/strerror.3 b/lib/libc/string/strerror.3 index a47494fd0784..39f49d3007ac 100644 --- a/lib/libc/string/strerror.3 +++ b/lib/libc/string/strerror.3 @@ -32,12 +32,13 @@ .\" @(#)strerror.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd April 5, 2011 +.Dd December 7, 2020 .Dt STRERROR 3 .Os .Sh NAME .Nm perror , .Nm strerror , +.Nm strerror_l , .Nm strerror_r , .Nm sys_errlist , .Nm sys_nerr @@ -53,12 +54,15 @@ .In string.h .Ft "char *" .Fn strerror "int errnum" +.Ft "char *" +.Fn strerror_l "int errnum" "locale_t" .Ft int .Fn strerror_r "int errnum" "char *strerrbuf" "size_t buflen" .Sh DESCRIPTION The .Fn strerror , -.Fn strerror_r +.Fn strerror_l , +.Fn strerror_r , and .Fn perror functions look up the error message string corresponding to an @@ -68,8 +72,28 @@ The .Fn strerror function accepts an error number argument .Fa errnum -and returns a pointer to the corresponding -message string. +and returns a pointer to the corresponding message string +in the current locale. +.Fn strerror +is not thread-safe. +It returns a pointer to an internal static buffer that could be +overwritten by a +.Fn strerror +call from another thread. +.Pp +The +.Fn strerror_l +function accepts +.Fa errnum +error number and +.Fa locale +locale handle arguments and returns a pointer to a string +corresponding to the specified error in the given locale. +.Fn strerror_l +is thread-safe, its result can be only overwritten by +another call to +.Fn strerror_l +from the current thread. .Pp The .Fn strerror_r @@ -141,7 +165,8 @@ The external value contains a count of the messages in .Va sys_errlist . The use of these variables is deprecated; -.Fn strerror +.Fn strerror , +.Fn strerror_l , or .Fn strerror_r should be used instead. @@ -160,6 +185,10 @@ The .Fn strerror_r function conforms to .St -p1003.1-2001 . +The +.Fn strerror_l +function conforms to +.St -p1003.1-2008 . .Sh HISTORY The .Fn strerror @@ -173,18 +202,21 @@ function was implemented in .Fx 4.4 by .An Wes Peters Aq Mt wes@FreeBSD.org . +The +.Fn strerror_l +function was added in +.Fx 13.0 . .Sh BUGS The .Fn strerror function returns its result in a static buffer which will be overwritten by subsequent calls. .Pp -The return type for -.Fn strerror -is missing a type-qualifier; it should actually be -.Vt const char * . -.Pp Programs that use the deprecated .Va sys_errlist variable often fail to compile because they declare it inconsistently. +Size of the +.Va sys_errlist +object might increase during FreeBSD lifetime, +breaking some ABI stability guarantees. diff --git a/lib/libc/string/strerror.c b/lib/libc/string/strerror.c index 7cd984ea48ff..11b9701d968f 100644 --- a/lib/libc/string/strerror.c +++ b/lib/libc/string/strerror.c @@ -45,6 +45,8 @@ __FBSDID("$FreeBSD$"); #include #include "errlst.h" +#include "../locale/xlocale_private.h" +#include "libc_private.h" /* * Define buffer big enough to contain delimiter (": ", 2 bytes), @@ -78,34 +80,35 @@ errstr(int num, const char *uprefix, char *buf, size_t len) strlcat(buf, t, len); } -int -strerror_r(int errnum, char *strerrbuf, size_t buflen) +static int +strerror_rl(int errnum, char *strerrbuf, size_t buflen, locale_t locale) { int retval = 0; #if defined(NLS) int saved_errno = errno; nl_catd catd; - catd = catopen("libc", NL_CAT_LOCALE); + + catd = __catopen_l("libc", NL_CAT_LOCALE, locale); #endif if (errnum < 0 || errnum >= __hidden_sys_nerr) { errstr(errnum, #if defined(NLS) - catgets(catd, 1, 0xffff, __uprefix), + catgets(catd, 1, 0xffff, __uprefix), #else - __uprefix, + __uprefix, #endif - strerrbuf, buflen); + strerrbuf, buflen); retval = EINVAL; } else { if (strlcpy(strerrbuf, #if defined(NLS) - catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), + catgets(catd, 1, errnum, __hidden_sys_errlist[errnum]), #else - __hidden_sys_errlist[errnum], + __hidden_sys_errlist[errnum], #endif - buflen) >= buflen) - retval = ERANGE; + buflen) >= buflen) + retval = ERANGE; } #if defined(NLS) @@ -116,12 +119,33 @@ strerror_r(int errnum, char *strerrbuf, size_t buflen) return (retval); } +int +strerror_r(int errnum, char *strerrbuf, size_t buflen) +{ + return (strerror_rl(errnum, strerrbuf, buflen, __get_locale())); +} + +char * +strerror_l(int num, locale_t locale) +{ +#ifndef __NO_TLS + static _Thread_local char ebuf[NL_TEXTMAX]; + + if (strerror_rl(num, ebuf, sizeof(ebuf), locale) != 0) + errno = EINVAL; + return (ebuf); +#else + errno = ENOTSUP; + return (NULL); +#endif +} + char * strerror(int num) { static char ebuf[NL_TEXTMAX]; - if (strerror_r(num, ebuf, sizeof(ebuf)) != 0) + if (strerror_rl(num, ebuf, sizeof(ebuf), __get_locale()) != 0) errno = EINVAL; return (ebuf); } From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 17:43:53 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 9A4C94C9B50; Wed, 30 Dec 2020 17:43:53 +0000 (UTC) (envelope-from jhb@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 4D5dtx3dRyz4R1d; Wed, 30 Dec 2020 17:43:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro.local (unknown [IPv6:2601:648:8681:1cb0:e936:7c25:afe9:9450]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id D31176328; Wed, 30 Dec 2020 17:43:52 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Ryan Libby , Kyle Evans Cc: src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> Date: Wed, 30 Dec 2020 09:43:50 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 17:43:53 -0000 On 12/29/20 7:10 PM, Ryan Libby wrote: > I checked amd64 and it failed due to pkru. I don't think we care to fix > that either, but we technically could of course. For amd64 the external > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > few more MFCs. Just to be explicit, we do not care about building amd64 with 4.2.1 at this point on 12.x. Getting it building with less ancient GCC is a noble goal, but architectures that build fine with clang in stable/12 do not need to build with gcc 4.2.1. -- John Baldwin From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 17:53:42 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 1A9F44C9DC3; Wed, 30 Dec 2020 17:53:42 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [18.222.6.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5f6G0BlCz4RDS; Wed, 30 Dec 2020 17:53:41 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (unknown [18.188.142.31]) by mail.soaustin.net (Postfix) with ESMTPSA id 06D25170FD; Wed, 30 Dec 2020 17:53:41 +0000 (UTC) Date: Wed, 30 Dec 2020 17:53:39 +0000 From: Mark Linimon To: John Baldwin Cc: Ryan Libby , Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 Message-ID: <20201230175339.GA29398@lonesome.com> References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Rspamd-Queue-Id: 4D5f6G0BlCz4RDS X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 17:53:42 -0000 On Wed, Dec 30, 2020 at 09:43:50AM -0800, John Baldwin wrote: > Just to be explicit, we do not care about building amd64 with 4.2.1 at this > point on 12.x. AFAIK the only use case for gcc4.2.1 is powerpc* < 13. (I check new ports on powerpc64 vs. gcc4.2.1. I will be glad to see the end of it.) mcl From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 18:13:41 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 C4F304CABF2; Wed, 30 Dec 2020 18:13:41 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5fYK4twWz4T6S; Wed, 30 Dec 2020 18:13:41 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qv1-f47.google.com with SMTP id l14so8043166qvh.2; Wed, 30 Dec 2020 10:13:41 -0800 (PST) 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=uuzQj6MmchJ23JjyiOOxBhQM0EATZLEZGJypAuZJvxs=; b=uHV+fFhnTOjUv2e8j89XVOV1kngSiX/a9ePKZ7n8O4J32wSNrb7hKMOXUd61TBcEUP nfwrDk893GykTC2FVpf1mgGnSVZ6G2l0Ba0TjcY9MwY42yItiTOwShUC9LuZGFHZDuDr 8+hERhZrMymOJrOOTwzL67EyJQ9sG2CcxOHGwryRkStpF/fNH9/dhhxzOIu+gyHWqvao HG/XetYRyvk7DiUTylPaSQCWYbE4sDoP9okXC5Sp3Q38g6+zspyY/k0p9L0cqGjtmx2g IkuQZueh5bDOeTBE56hQA/EBGy6uY6IPueqkKe7jwXWI9asSwdzCL9N6E2p6v3CVUY+t a46g== X-Gm-Message-State: AOAM531J+VZZk58/XVmKY8dDvemeiKzGKl8KDS8/qxNHx2PWJE78MhEn ckyVrGIWrjK1YnQ31MWFrQAngU+wzYzyBg== X-Google-Smtp-Source: ABdhPJzE038MNmcA0eVs1g3WpJsXyqmKbSiveha1WXuUGetKxKxyiSvYUg2VKrrPK05DWGrZYBMmQQ== X-Received: by 2002:a0c:8304:: with SMTP id j4mr24045763qva.18.1609352020156; Wed, 30 Dec 2020 10:13:40 -0800 (PST) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com. [209.85.219.53]) by smtp.gmail.com with ESMTPSA id n4sm28784769qtl.22.2020.12.30.10.13.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 10:13:40 -0800 (PST) Received: by mail-qv1-f53.google.com with SMTP id a4so8004152qvd.12; Wed, 30 Dec 2020 10:13:39 -0800 (PST) X-Received: by 2002:ad4:5762:: with SMTP id r2mr58238716qvx.45.1609352019670; Wed, 30 Dec 2020 10:13:39 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> In-Reply-To: From: Ryan Libby Date: Wed, 30 Dec 2020 10:13:28 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: Konstantin Belousov Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5fYK4twWz4T6S X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:13:41 -0000 On Wed, Dec 30, 2020 at 3:33 AM Konstantin Belousov wrote: > > On Tue, Dec 29, 2020 at 07:10:02PM -0800, Ryan Libby wrote: > > I checked amd64 and it failed due to pkru. I don't think we care to fix > > that either, but we technically could of course. For amd64 the external > > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > > few more MFCs. > > Could you be more specific, please? > > What is broken with PKRU, the gcc 6.4 build? For kernel, or libc? > Does it work with not-so-ancient gcc? Sorry, I wasn't clear. gcc 6.4 from the external toolchain is fine with pkru. Separately, there are just a few remaining MFCs to make gcc 6.4 work out of the box with no WERROR suppression. gcc 4.2.1 for amd64 is broken, most immediately because of pkru in libc (because of new instructions and because of a use of the ifunc attribute). This is what I meant to say was technically fixable, but that we didn't care. (For those reading along who haven't checked, pkru(3) is x86-only, at least so far.) Ryan From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 18:15:29 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 2B82C4CACB7; Wed, 30 Dec 2020 18:15:29 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 4D5fbP0R2zz4TP9; Wed, 30 Dec 2020 18:15:28 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-qk1-f178.google.com with SMTP id z11so14577597qkj.7; Wed, 30 Dec 2020 10:15:28 -0800 (PST) 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=BspoO4zPLuABe+kv0nUa2BiLrcl7KliB87pxQ502A2k=; b=FirrOnikVsJKpHN8s0rtyF4w5zDhlh+onE/G1x+VK7kpF2aXB0aAA5hawIEtG60uzf kB26c514AbzeB31tgTIvxPwVvRmMCTLzlv/8WcRX71FLtEL41c7SWrnGyVfJZF2MHWg8 Di8P7R/sHqoK4cOILUARfZDdScDD8M+vZb1Y7DxNiDB1Xzqk8sVKAlntG85l2cIBEn2C h1Q8CKSO02cPx8l6kxNbvM24UuU5/12kq3kDtKrYPr4YlwKV5Fjw2MUXCkl1vSWoj1LB 7RBcp6HC7Bb2qEiAxQ/HjcMcdqq7jnOhYDa65lJjK2qfPe8zCg3WuQb/7sY4qe59jYhS ZBNQ== X-Gm-Message-State: AOAM533WJNaIpagMHwIkTY95yl7SOWFY/FIzAKvKKkY+AAlp8qgGGGrz NYsdiiqZxg3AvNPMmgUOQ+qhD/6mcJ3vJA== X-Google-Smtp-Source: ABdhPJwNOv+JnzzAg32HYxe+8/jyrLMoyrdhOXgJWmNaBBc+sMLrg2aoqEFanXhMSjNfyJPnJKrKmg== X-Received: by 2002:a37:9f4c:: with SMTP id i73mr54345760qke.82.1609352127395; Wed, 30 Dec 2020 10:15:27 -0800 (PST) Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com. [209.85.160.174]) by smtp.gmail.com with ESMTPSA id y67sm18499280qka.68.2020.12.30.10.15.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Dec 2020 10:15:27 -0800 (PST) Received: by mail-qt1-f174.google.com with SMTP id y15so11446339qtv.5; Wed, 30 Dec 2020 10:15:27 -0800 (PST) X-Received: by 2002:aed:2088:: with SMTP id 8mr39921384qtb.174.1609352126968; Wed, 30 Dec 2020 10:15:26 -0800 (PST) MIME-Version: 1.0 References: <202012292306.0BTN6ivw093358@gitrepo.freebsd.org> <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> In-Reply-To: <0af13399-f119-06aa-c249-2fe8069dd631@FreeBSD.org> From: Ryan Libby Date: Wed, 30 Dec 2020 10:15:16 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 269b7d8ac1e5 - stable/12 - tftpd: tests: raise targeted cstd to c11 To: John Baldwin Cc: Kyle Evans , src-committers , dev-commits-src-all@freebsd.org, dev-commits-src-branches@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4D5fbP0R2zz4TP9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 18:15:29 -0000 On Wed, Dec 30, 2020 at 9:43 AM John Baldwin wrote: > > On 12/29/20 7:10 PM, Ryan Libby wrote: > > I checked amd64 and it failed due to pkru. I don't think we care to fix > > that either, but we technically could of course. For amd64 the external > > toolchain with gcc 6.4 is broken at the moment but will be fixed after a > > few more MFCs. > > Just to be explicit, we do not care about building amd64 with 4.2.1 at this > point on 12.x. Getting it building with less ancient GCC is a noble goal, > but architectures that build fine with clang in stable/12 do not need to > build with gcc 4.2.1. > > -- > John Baldwin Yes, I'm on board with this. From owner-dev-commits-src-branches@freebsd.org Wed Dec 30 23:18:03 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 4FCB44D2DB5; Wed, 30 Dec 2020 23:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5nJW1phHz4rSB; Wed, 30 Dec 2020 23:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C83C2648D; Wed, 30 Dec 2020 23:18:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BUNI3Qq069696; Wed, 30 Dec 2020 23:18:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BUNI3Ov069695; Wed, 30 Dec 2020 23:18:03 GMT (envelope-from git) Date: Wed, 30 Dec 2020 23:18:03 GMT Message-Id: <202012302318.0BUNI3Ov069695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: be3bbda216c5 - stable/12 - Don't add -Wno-class-memaccess with older gcc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: be3bbda216c5cab1d846d1555f0afe8b5b17e45f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Dec 2020 23:18:03 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=be3bbda216c5cab1d846d1555f0afe8b5b17e45f commit be3bbda216c5cab1d846d1555f0afe8b5b17e45f Author: Brooks Davis AuthorDate: 2019-08-09 23:50:57 +0000 Commit: Ryan Libby CommitDate: 2020-12-30 18:33:01 +0000 Don't add -Wno-class-memaccess with older gcc. This is a gcc 8.0+ warning which needed to be silenced on for the riscv build. amd64-xtoolchain-gcc still uses gcc 6.4.0 and does not understand this flag. Reviewed by: asomers Feedback from: imp Differential Revision: https://reviews.freebsd.org/D21195 (cherry picked from commit 4a045a66fd912b0e28a0585dbd8991643ccc2cb0) --- tests/sys/fs/fusefs/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 96f08963b1e4..ebe4061c1668 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/fs/fusefs @@ -66,7 +68,10 @@ TEST_METADATA+= timeout=10 FUSEFS= ${SRCTOP}/sys/fs/fuse MOUNT= ${SRCTOP}/sbin/mount # Suppress warnings that GCC generates for the libc++ and gtest headers. -CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes -Wno-class-memaccess +CXXWARNFLAGS.gcc+= -Wno-placement-new -Wno-attributes +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80000 +CXXWARNFLAGS+= -Wno-class-memaccess +.endif CXXFLAGS+= -I${SRCTOP}/tests CXXFLAGS+= -I${FUSEFS} CXXFLAGS+= -I${MOUNT} From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 00:43:55 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 271E54D51DB; Thu, 31 Dec 2020 00:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5qCb0c7jz3D4m; Thu, 31 Dec 2020 00:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07CC0275A7; Thu, 31 Dec 2020 00:43:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV0hsmi079305; Thu, 31 Dec 2020 00:43:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV0hs3K079304; Thu, 31 Dec 2020 00:43:54 GMT (envelope-from git) Date: Thu, 31 Dec 2020 00:43:54 GMT Message-Id: <202012310043.0BV0hs3K079304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: ce87312019a1 - stable/12 - MFC: contrib/tzdata: import tzdata 2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ce87312019a18e6bd0c97c50e5762b38ffc21e76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 00:43:55 -0000 The branch stable/12 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=ce87312019a18e6bd0c97c50e5762b38ffc21e76 commit ce87312019a18e6bd0c97c50e5762b38ffc21e76 Author: Philip Paeps AuthorDate: 2020-12-30 04:50:26 +0000 Commit: Philip Paeps CommitDate: 2020-12-31 00:41:51 +0000 MFC: contrib/tzdata: import tzdata 2020f Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main Changes: https://github.com/eggert/tz/blob/2020f/NEWS (cherry picked from commit e35a01eec6926bfb5c088ca8961079b51a067bf3) --- contrib/tzdata/Makefile | 5 ++++- contrib/tzdata/NEWS | 8 ++++++++ contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 9 +++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 5064a190c5a5..1136af9298f1 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS) mkdir public.dir ln $(VERSION_DEPS) public.dir cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ + public.dir/vanguard.zi public.dir/main.zi \ + public.dir/rearguard.zi; \ + do \ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index 6014b45a0b4a..19470cc41c3d 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,13 @@ News for the tz database +Release 2020f - 2020-12-29 00:17:46 -0800 + + Change to build procedure + + 'make rearguard_tarballs' no longer generates a bad rearguard.zi, + fixing a 2020e bug. (Problem reported by Deborah Goldsmith.) + + Release 2020e - 2020-12-22 15:14:34 -0800 Briefly: diff --git a/contrib/tzdata/version b/contrib/tzdata/version index e788a597fa7b..a481df8cb9d4 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2020e +2020f diff --git a/contrib/tzdata/ziguard.awk b/contrib/tzdata/ziguard.awk index e27e799392ec..7d6f7c99c952 100644 --- a/contrib/tzdata/ziguard.awk +++ b/contrib/tzdata/ziguard.awk @@ -37,7 +37,7 @@ DATAFORM != "main" { # If this line should differ due to Czechoslovakia using negative SAVE values, # uncomment the desired version and comment out the undesired one. - if (zone == "Europe/Prague" && /1947 Feb 23/) { + if (zone == "Europe/Prague" && /^#?[\t ]+[01]:00[\t ]/ && /1947 Feb 23/) { if (($(in_comment + 2) != "-") == vanguard) { uncomment = in_comment } else { @@ -65,10 +65,11 @@ DATAFORM != "main" { # uncomment the desired version and comment out the undesired one. Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ Zone_using_Namibia_rule \ - = (zone == "Africa/Windhoek" \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ && ($(in_comment + 2) == "Namibia" \ - || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ - || in_comment + 3 == NF)) + || ($(in_comment + 2) == "-" && $(in_comment + 3) == "CAT" \ + && ((1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ + || in_comment + 3 == NF)))) if (Rule_Namibia || Zone_using_Namibia_rule) { if ((Rule_Namibia \ ? ($(in_comment + 9) ~ /^-/ \ From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 00:44:10 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 3A7684D52D8; Thu, 31 Dec 2020 00:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5qCt1Fmfz3Dgk; Thu, 31 Dec 2020 00:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1DA562751D; Thu, 31 Dec 2020 00:44:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV0iANp079456; Thu, 31 Dec 2020 00:44:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV0iAZl079455; Thu, 31 Dec 2020 00:44:10 GMT (envelope-from git) Date: Thu, 31 Dec 2020 00:44:10 GMT Message-Id: <202012310044.0BV0iAZl079455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Philip Paeps Subject: git: c41eeeac3cad - stable/11 - MFC: contrib/tzdata: import tzdata 2020f MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: philip X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: c41eeeac3cad996cc9194dc675cd78568a4a380f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 00:44:10 -0000 The branch stable/11 has been updated by philip: URL: https://cgit.FreeBSD.org/src/commit/?id=c41eeeac3cad996cc9194dc675cd78568a4a380f commit c41eeeac3cad996cc9194dc675cd78568a4a380f Author: Philip Paeps AuthorDate: 2020-12-30 04:50:26 +0000 Commit: Philip Paeps CommitDate: 2020-12-31 00:42:58 +0000 MFC: contrib/tzdata: import tzdata 2020f Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main Changes: https://github.com/eggert/tz/blob/2020f/NEWS (cherry picked from commit e35a01eec6926bfb5c088ca8961079b51a067bf3) --- contrib/tzdata/Makefile | 5 ++++- contrib/tzdata/NEWS | 8 ++++++++ contrib/tzdata/version | 2 +- contrib/tzdata/ziguard.awk | 9 +++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/contrib/tzdata/Makefile b/contrib/tzdata/Makefile index 5064a190c5a5..1136af9298f1 100644 --- a/contrib/tzdata/Makefile +++ b/contrib/tzdata/Makefile @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS) mkdir public.dir ln $(VERSION_DEPS) public.dir cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ + public.dir/vanguard.zi public.dir/main.zi \ + public.dir/rearguard.zi; \ + do \ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) diff --git a/contrib/tzdata/NEWS b/contrib/tzdata/NEWS index 6014b45a0b4a..19470cc41c3d 100644 --- a/contrib/tzdata/NEWS +++ b/contrib/tzdata/NEWS @@ -1,5 +1,13 @@ News for the tz database +Release 2020f - 2020-12-29 00:17:46 -0800 + + Change to build procedure + + 'make rearguard_tarballs' no longer generates a bad rearguard.zi, + fixing a 2020e bug. (Problem reported by Deborah Goldsmith.) + + Release 2020e - 2020-12-22 15:14:34 -0800 Briefly: diff --git a/contrib/tzdata/version b/contrib/tzdata/version index e788a597fa7b..a481df8cb9d4 100644 --- a/contrib/tzdata/version +++ b/contrib/tzdata/version @@ -1 +1 @@ -2020e +2020f diff --git a/contrib/tzdata/ziguard.awk b/contrib/tzdata/ziguard.awk index e27e799392ec..7d6f7c99c952 100644 --- a/contrib/tzdata/ziguard.awk +++ b/contrib/tzdata/ziguard.awk @@ -37,7 +37,7 @@ DATAFORM != "main" { # If this line should differ due to Czechoslovakia using negative SAVE values, # uncomment the desired version and comment out the undesired one. - if (zone == "Europe/Prague" && /1947 Feb 23/) { + if (zone == "Europe/Prague" && /^#?[\t ]+[01]:00[\t ]/ && /1947 Feb 23/) { if (($(in_comment + 2) != "-") == vanguard) { uncomment = in_comment } else { @@ -65,10 +65,11 @@ DATAFORM != "main" { # uncomment the desired version and comment out the undesired one. Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ Zone_using_Namibia_rule \ - = (zone == "Africa/Windhoek" \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ && ($(in_comment + 2) == "Namibia" \ - || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ - || in_comment + 3 == NF)) + || ($(in_comment + 2) == "-" && $(in_comment + 3) == "CAT" \ + && ((1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ + || in_comment + 3 == NF)))) if (Rule_Namibia || Zone_using_Namibia_rule) { if ((Rule_Namibia \ ? ($(in_comment + 9) ~ /^-/ \ From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 03:19:52 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 CAD354DAAC2; Thu, 31 Dec 2020 03:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D5tgX3zttz3QN9; Thu, 31 Dec 2020 03:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B68D1660; Thu, 31 Dec 2020 03:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BV3JqN5063608; Thu, 31 Dec 2020 03:19:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BV3Jqd0063607; Thu, 31 Dec 2020 03:19:52 GMT (envelope-from git) Date: Thu, 31 Dec 2020 03:19:52 GMT Message-Id: <202012310319.0BV3Jqd0063607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 53bc3221561a - stable/12 - MFC addr2line label checks when DW_AT_range and DW_AT_low_pc cannot be used MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 53bc3221561aac01410087646444dc4d4ef41f37 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 03:19:52 -0000 The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=53bc3221561aac01410087646444dc4d4ef41f37 commit 53bc3221561aac01410087646444dc4d4ef41f37 Author: Ed Maste AuthorDate: 2020-11-19 21:10:36 +0000 Commit: Ed Maste CommitDate: 2020-12-31 03:19:32 +0000 MFC addr2line label checks when DW_AT_range and DW_AT_low_pc cannot be used addr2line: swap if conditions for diff reduction in upcoming change No functional change intended. (cherry picked from commit 65c207758a9586116a023dea8eb3d173e85cb0a9) addr2line: add label checks when DW_AT_range and DW_AT_low_pc cannot be used Check label's ranges for address we want to translate if a CU doesn't have usable DW_AT_range or DW_AT_low_pc. Use more appropriate names: "struct CU" -> "struct range" Developed as part of upstream ELF Tool Chain bug report https://sourceforge.net/p/elftoolchain/tickets/552/ although this does not address the specific case reported there. Submitted by: Tiger Gao Sponsored by: The FreeBSD Foundation Differential Revision: D23782 (cherry picked from commit a36179937e7e768d1840896ac1ea13ba6f118a09) addr2line: rework check_range conditions Simplify logic and reduce indentation for DW_AT_low_pc case. Reviewed by: Tiger Gao, markj Sponsored by: The FreeBSD Foundation Differential Revision: D27426 (cherry picked from commit f4d6ed9a5c5f5e78b9e20ae0c4b3ab78922aaf20) addr2line: fix allocation leak in error path CID: 1437677 Reported by: Coverity Scan Sponsored by: The FreeBSD Foundation (cherry picked from commit 67b94fc58e61a78225930d54eadaba77f46a73b7) --- contrib/elftoolchain/addr2line/addr2line.c | 317 +++++++++++++++++++++-------- 1 file changed, 231 insertions(+), 86 deletions(-) diff --git a/contrib/elftoolchain/addr2line/addr2line.c b/contrib/elftoolchain/addr2line/addr2line.c index 123ce8cce9b3..db8f84eef780 100644 --- a/contrib/elftoolchain/addr2line/addr2line.c +++ b/contrib/elftoolchain/addr2line/addr2line.c @@ -56,8 +56,8 @@ struct Func { STAILQ_ENTRY(Func) next; }; -struct CU { - RB_ENTRY(CU) entry; +struct range { + RB_ENTRY(range) entry; Dwarf_Off off; Dwarf_Unsigned lopc; Dwarf_Unsigned hipc; @@ -88,16 +88,16 @@ static char unknown[] = { '?', '?', '\0' }; static Dwarf_Addr section_base; /* Need a new curlopc that stores last lopc value. */ static Dwarf_Unsigned curlopc = ~0ULL; -static RB_HEAD(cutree, CU) cuhead = RB_INITIALIZER(&cuhead); +static RB_HEAD(cutree, range) cuhead = RB_INITIALIZER(&cuhead); static int -lopccmp(struct CU *e1, struct CU *e2) +lopccmp(struct range *e1, struct range *e2) { return (e1->lopc < e2->lopc ? -1 : e1->lopc > e2->lopc); } -RB_PROTOTYPE(cutree, CU, entry, lopccmp); -RB_GENERATE(cutree, CU, entry, lopccmp) +RB_PROTOTYPE(cutree, range, entry, lopccmp); +RB_GENERATE(cutree, range, entry, lopccmp) #define USAGE_MESSAGE "\ Usage: %s [options] hexaddress...\n\ @@ -170,7 +170,7 @@ handle_high_pc(Dwarf_Die die, Dwarf_Unsigned lopc, Dwarf_Unsigned *hipc) } static struct Func * -search_func(struct CU *cu, Dwarf_Unsigned addr) +search_func(struct range *range, Dwarf_Unsigned addr) { struct Func *f, *f0; Dwarf_Unsigned lopc, hipc, addr_base; @@ -178,7 +178,7 @@ search_func(struct CU *cu, Dwarf_Unsigned addr) f0 = NULL; - STAILQ_FOREACH(f, &cu->funclist, next) { + STAILQ_FOREACH(f, &range->funclist, next) { if (f->ranges != NULL) { addr_base = 0; for (i = 0; i < f->ranges_cnt; i++) { @@ -215,7 +215,8 @@ search_func(struct CU *cu, Dwarf_Unsigned addr) } static void -collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) +collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, + struct range *range) { Dwarf_Die ret_die, abst_die, spec_die; Dwarf_Error de; @@ -237,7 +238,7 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) goto cont_search; } if (tag == DW_TAG_subprogram || tag == DW_TAG_entry_point || - tag == DW_TAG_inlined_subroutine) { + tag == DW_TAG_inlined_subroutine || tag == DW_TAG_label) { /* * Function address range can be specified by either * a DW_AT_ranges attribute which points to a range list or @@ -257,14 +258,21 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) } /* - * Search for DW_AT_low_pc/DW_AT_high_pc if ranges pointer - * not found. - */ - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) || - dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de)) - goto cont_search; - if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) - goto cont_search; + * Ranges pointer not found. Search for DW_AT_low_pc, and + * DW_AT_high_pc iff die is not a label. Labels doesn't have + * hipc attr. */ + if (tag == DW_TAG_label) { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, + &de) != DW_DLV_OK) + goto cont_search; + } else { + if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, + &de) || dwarf_attrval_unsigned(die, DW_AT_high_pc, + &hipc, &de)) + goto cont_search; + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + goto cont_search; + } get_func_name: /* @@ -322,7 +330,7 @@ collect_func(Dwarf_Debug dbg, Dwarf_Die die, struct Func *parent, struct CU *cu) dwarf_attrval_unsigned(die, DW_AT_call_line, &f->call_line, &de); } - STAILQ_INSERT_TAIL(&cu->funclist, f, next); + STAILQ_INSERT_TAIL(&range->funclist, f, next); } cont_search: @@ -333,9 +341,9 @@ cont_search: warnx("dwarf_child: %s", dwarf_errmsg(de)); else if (ret == DW_DLV_OK) { if (f != NULL) - collect_func(dbg, ret_die, f, cu); + collect_func(dbg, ret_die, f, range); else - collect_func(dbg, ret_die, parent, cu); + collect_func(dbg, ret_die, parent, range); } /* Search sibling. */ @@ -343,10 +351,10 @@ cont_search: if (ret == DW_DLV_ERROR) warnx("dwarf_siblingof: %s", dwarf_errmsg(de)); else if (ret == DW_DLV_OK) - collect_func(dbg, ret_die, parent, cu); + collect_func(dbg, ret_die, parent, range); /* Cleanup */ - if (die != cu->die) + if (die != range->die) dwarf_dealloc(dbg, die, DW_DLA_DIE); if (abst_die != NULL) @@ -357,14 +365,14 @@ cont_search: } static void -print_inlines(struct CU *cu, struct Func *f, Dwarf_Unsigned call_file, +print_inlines(struct range *range, struct Func *f, Dwarf_Unsigned call_file, Dwarf_Unsigned call_line) { char demangled[1024]; char *file; - if (call_file > 0 && (Dwarf_Signed) call_file <= cu->nsrcfiles) - file = cu->srcfiles[call_file - 1]; + if (call_file > 0 && (Dwarf_Signed) call_file <= range->nsrcfiles) + file = range->srcfiles[call_file - 1]; else file = unknown; @@ -389,14 +397,14 @@ print_inlines(struct CU *cu, struct Func *f, Dwarf_Unsigned call_file, (uintmax_t) call_line); if (f->inlined_caller != NULL) - print_inlines(cu, f->inlined_caller, f->call_file, + print_inlines(range, f->inlined_caller, f->call_file, f->call_line); } -static struct CU * +static struct range * culookup(Dwarf_Unsigned addr) { - struct CU find, *res; + struct range find, *res; find.lopc = addr; res = RB_NFIND(cutree, &cuhead, &find); @@ -414,12 +422,150 @@ culookup(Dwarf_Unsigned addr) } /* - * Check whether addr falls into range(s) of current CU, and save current CU - * to lookup tree if so. + * When DW_AT_ranges, DW_AT_low_pc/DW_AT_high_pc are all absent, we check the + * children of cu die for labels. If the address falls into one of the labels + * ranges(aranges), return the label DIE. + */ +static int +check_labels(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, + struct range **range) { + Dwarf_Addr start; + Dwarf_Arange *aranges; + Dwarf_Die prev_die, ret_die; + Dwarf_Error de; + Dwarf_Half tag; + Dwarf_Off die_off; + Dwarf_Unsigned lopc, length; + Dwarf_Signed arcnt; + struct range *labelp, **labels; + int i, j, label_cnt, ret; + + prev_die = ret_die = NULL; + labels = NULL; + i = label_cnt = 0; + + /* Find aranges. */ + ret = dwarf_get_aranges(dbg, &aranges, &arcnt, &de); + if (ret != DW_DLV_OK && ret != DW_DLV_NO_ENTRY) + warnx("dwarf_get_aranges failed: %s", dwarf_errmsg(de)); + + /* Child of current CU. */ + ret = dwarf_child(die, &prev_die, &de); + if (ret == DW_DLV_ERROR) + warnx("dwarf_child: %s", dwarf_errmsg(de)); + + /* Count labels. */ + while (1) { + if (dwarf_tag(prev_die, &tag, &de) != DW_DLV_OK) { + warnx("dwarf_tag failed: %s", + dwarf_errmsg(de)); + return DW_DLV_ERROR; + } + if (tag == DW_TAG_label) { + if (dwarf_attrval_unsigned(prev_die, DW_AT_low_pc, + &lopc, &de) == DW_DLV_OK) + label_cnt++; + } + + if (dwarf_siblingof(dbg, prev_die, &ret_die, &de) != DW_DLV_OK) + break; + + if (prev_die != NULL) + dwarf_dealloc(dbg, prev_die, DW_DLA_DIE); + prev_die = ret_die; + } + + if (label_cnt == 0) + return (DW_DLV_NO_ENTRY); + + /* Allocate space for labels. */ + if ((labels = calloc(label_cnt, sizeof(struct range *))) == NULL) + err(EXIT_FAILURE, "calloc"); + + /* Add labels to list. */ + ret = dwarf_child(die, &prev_die, &de); + if (ret == DW_DLV_ERROR) + warnx("dwarf_child: %s", dwarf_errmsg(de)); + while (1) { + if (dwarf_tag(prev_die, &tag, &de) != DW_DLV_OK) { + warnx("dwarf_tag failed: %s", + dwarf_errmsg(de)); + free(labels); + return DW_DLV_ERROR; + } + if (tag == DW_TAG_label) { + if (dwarf_attrval_unsigned(prev_die, DW_AT_low_pc, + &lopc, &de) == DW_DLV_OK) { + if (curlopc == lopc) { + for (i = 0; i < label_cnt - 1; i++) { + if (labels[i] != *range) + free(labels[i]); + } + free(labels); + return DW_DLV_ERROR; + } + labelp = calloc(1, sizeof(struct range)); + if (labelp == NULL) + err(EXIT_FAILURE, "calloc"); + labelp->lopc = lopc; + labelp->die = prev_die; + labelp->dbg = dbg; + STAILQ_INIT(&labelp->funclist); + labels[i++] = labelp; + } + } + if (dwarf_siblingof(dbg, prev_die, &ret_die, &de) != DW_DLV_OK) + break; + if (prev_die != NULL && tag != DW_TAG_label) + dwarf_dealloc(dbg, prev_die, DW_DLA_DIE); + prev_die = ret_die; + } + + /* Set hipc for each label using aranges */ + for (i = 0; i < label_cnt; i++) { + for (j = 0; j < arcnt; j++) { + if (dwarf_get_arange_info(aranges[j], &start, &length, + &die_off, &de) != DW_DLV_OK) { + warnx("dwarf_get_arange_info failed: %s", + dwarf_errmsg(de)); + continue; + } + if (labels[i]->lopc == (Dwarf_Unsigned)start) { + labels[i]->hipc = start + length; + break; + } + } + } + + /* If addr in label's range, we have found the range for this label. */ + for (i = 0; i < label_cnt; i++) { + if (addr >= labels[i]->lopc && addr < labels[i]->hipc) { + *range = labels[i]; + RB_INSERT(cutree, &cuhead, (*range)); + curlopc = (*range)->lopc; + break; + } + } + + for (i = 0; i < label_cnt - 1; i++) { + if (labels[i] != *range) + free(labels[i]); + } + free(labels); + + if (*range != NULL) + return (DW_DLV_OK); + else + return (DW_DLV_NO_ENTRY); +} + +/* + * Check whether addr falls into range(s) of current CU. + * If so, save current CU to lookup tree. */ static int check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, - struct CU **cu) + struct range **range) { Dwarf_Error de; Dwarf_Unsigned addr_base, lopc, hipc; @@ -427,38 +573,15 @@ check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, Dwarf_Signed ranges_cnt; Dwarf_Ranges *ranges; int i, ret; - bool in_range; + bool in_cu; addr_base = 0; ranges = NULL; ranges_cnt = 0; - in_range = false; + in_cu = false; - ret = dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de); - if (ret == DW_DLV_NO_ENTRY) { - if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == - DW_DLV_OK) { - if (lopc == curlopc) - return (DW_DLV_ERROR); - if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, - &de) == DW_DLV_OK) { - /* - * Check if the address falls into the PC - * range of this CU. - */ - if (handle_high_pc(die, lopc, &hipc) != - DW_DLV_OK) - return (DW_DLV_ERROR); - } else { - /* Assume ~0ULL if DW_AT_high_pc not present */ - hipc = ~0ULL; - } - - if (addr >= lopc && addr < hipc) { - in_range = true; - } - } - } else if (ret == DW_DLV_OK) { + if (dwarf_attrval_unsigned(die, DW_AT_ranges, &ranges_off, &de) == + DW_DLV_OK) { ret = dwarf_get_ranges(dbg, ranges_off, &ranges, &ranges_cnt, NULL, &de); if (ret != DW_DLV_OK) @@ -485,23 +608,45 @@ check_range(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr, return (DW_DLV_ERROR); if (addr >= lopc && addr < hipc){ - in_range = true; + in_cu = true; break; } } + } else if (dwarf_attrval_unsigned(die, DW_AT_low_pc, &lopc, &de) == + DW_DLV_OK) { + if (lopc == curlopc) + return (DW_DLV_ERROR); + if (dwarf_attrval_unsigned(die, DW_AT_high_pc, &hipc, &de) == + DW_DLV_OK) { + /* + * Check if the address falls into the PC + * range of this CU. + */ + if (handle_high_pc(die, lopc, &hipc) != DW_DLV_OK) + return (DW_DLV_ERROR); + } else { + /* Assume ~0ULL if DW_AT_high_pc not present. */ + hipc = ~0ULL; + } + + if (addr >= lopc && addr < hipc) { + in_cu = true; + } } else { - return (DW_DLV_ERROR); + /* Addr not found above, try labels. */ + ret = check_labels(dbg, die, addr, range); + return ret; } - - if (in_range) { - if ((*cu = calloc(1, sizeof(struct CU))) == NULL) + + if (in_cu) { + if ((*range = calloc(1, sizeof(struct range))) == NULL) err(EXIT_FAILURE, "calloc"); - (*cu)->lopc = lopc; - (*cu)->hipc = hipc; - (*cu)->die = die; - (*cu)->dbg = dbg; - STAILQ_INIT(&(*cu)->funclist); - RB_INSERT(cutree, &cuhead, *cu); + (*range)->lopc = lopc; + (*range)->hipc = hipc; + (*range)->die = die; + (*range)->dbg = dbg; + STAILQ_INIT(&(*range)->funclist); + RB_INSERT(cutree, &cuhead, *range); curlopc = lopc; return (DW_DLV_OK); } else { @@ -519,7 +664,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) Dwarf_Unsigned addr, lineno, plineno; Dwarf_Signed lcount; Dwarf_Addr lineaddr, plineaddr; - struct CU *cu; + struct range *range; struct Func *f; const char *funcname; char *file, *file0, *pfile; @@ -533,10 +678,10 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) die = NULL; ret = DW_DLV_OK; - cu = culookup(addr); - if (cu != NULL) { - die = cu->die; - dbg = cu->dbg; + range = culookup(addr); + if (range != NULL) { + die = range->die; + dbg = range->dbg; goto status_ok; } @@ -575,7 +720,7 @@ translate(Dwarf_Debug dbg, Elf *e, const char* addrstr) warnx("could not find DW_TAG_compile_unit die"); goto next_cu; } - ret = check_range(dbg, die, addr, &cu); + ret = check_range(dbg, die, addr, &range); if (ret == DW_DLV_OK) break; if (ret == DW_DLV_ERROR) @@ -633,16 +778,16 @@ status_ok: out: f = NULL; funcname = NULL; - if (ret == DW_DLV_OK && (func || inlines) && cu != NULL) { - if (cu->srcfiles == NULL) - if (dwarf_srcfiles(die, &cu->srcfiles, &cu->nsrcfiles, - &de)) + if (ret == DW_DLV_OK && (func || inlines) && range != NULL) { + if (range->srcfiles == NULL) + if (dwarf_srcfiles(die, &range->srcfiles, + &range->nsrcfiles, &de)) warnx("dwarf_srcfiles: %s", dwarf_errmsg(de)); - if (STAILQ_EMPTY(&cu->funclist)) { - collect_func(dbg, die, NULL, cu); + if (STAILQ_EMPTY(&range->funclist)) { + collect_func(dbg, range->die, NULL, range); die = NULL; } - f = search_func(cu, addr); + f = search_func(range, addr); if (f != NULL) funcname = f->name; } @@ -685,9 +830,9 @@ out: (void) printf("%s:%ju\n", base ? basename(file) : file, (uintmax_t) lineno); - if (ret == DW_DLV_OK && inlines && cu != NULL && - cu->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) - print_inlines(cu, f->inlined_caller, f->call_file, + if (ret == DW_DLV_OK && inlines && range != NULL && + range->srcfiles != NULL && f != NULL && f->inlined_caller != NULL) + print_inlines(range, f->inlined_caller, f->call_file, f->call_line); } From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 07:51:06 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 D90F34DF53D; Thu, 31 Dec 2020 07:51:06 +0000 (UTC) (envelope-from rpokala@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 4D60hV5fgMz3vy9; Thu, 31 Dec 2020 07:51:06 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 0D46ECDFB; Thu, 31 Dec 2020 07:51:05 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.44.20121301 Date: Wed, 30 Dec 2020 23:51:02 -0800 Subject: Re: 162b82dfa0cb - MFC r355876 (by cem): From: Ravi Pokala To: Stefan Esser , Yuri Pankov , Warner Losh CC: src-committers , , Message-ID: <954BA92D-1D1C-41CA-870F-27CAE2A5C502@panasas.com> Thread-Topic: 162b82dfa0cb - MFC r355876 (by cem): References: <202012251825.0BPIPntO091296@gitrepo.freebsd.org> <751dc337-b4dc-52de-f2ee-a843eb5e43c5@FreeBSD.org> <20be96cf-1cda-d914-5759-aae90169d8c0@yuripv.dev> <12fd95e4-3a29-115c-72ff-b734baeffe5b@freebsd.org> In-Reply-To: <12fd95e4-3a29-115c-72ff-b734baeffe5b@freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 07:51:06 -0000 -----Original Message----- From: on behalf of Stefan Esser Date: 2020-12-26, Saturday at 00:49 To: Yuri Pankov , Warner Losh Cc: src-committers , , Subject: Re: git: 162b82dfa0cb - MFC r355876 (by cem): Am 26.12.20 um 06:36 schrieb Yuri Pankov: > Warner Losh wrote: >> I was rather hoping we'd land around using the old commit message, as >> is, and let the cherry-picked message at the end signify the MFC, at >> least for simple cherry-picks. >> >> For squashed ones, a sensible new summary line and an appropriate commit >> message would be good as well... Where appropriate is approximately what >> we do today, with all the hashes that we're merging mentioned. > > I am following the docs (and those make sense to me), `git cherry-pick > -x` is just enough; if it's direct commit, I'd add a note. So yes, any > commit to stable/* is MFC, unless stated otherwise. I'd like to get back the branch in the subject line, not only the first line of the commit message: It used to be: "svn commit: r368706 - in stable/12:", but now we only have the git hash in the subject line and "The branch ... has been updated ..." in the first line of the commit message. I was going to request this as well, but it looks like we started getting them as of 2020-12-26 20:50-ish. So, thank you to whoever did that! :-) -Ravi (rpokala@) Filtering out commits to -STABLE/RELENG is possible via "X-Git-Refname" (I hope this header line will be kept in exactly the current form to not require later adjustment of the filter), but it is no longer easy to see whether a commit affects -CURRENT by just looking at the subject line of the commit message ... Regards, STefan From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 15:38:36 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 8B44F4C53BE; Thu, 31 Dec 2020 15:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6C3w3bjbz4v9m; Thu, 31 Dec 2020 15:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EBEE12BCB; Thu, 31 Dec 2020 15:38:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFcawY068485; Thu, 31 Dec 2020 15:38:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFcagC068484; Thu, 31 Dec 2020 15:38:36 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:38:36 GMT Message-Id: <202012311538.0BVFcagC068484@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: dfa4fe11d6fe - stable/12 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: dfa4fe11d6fe90936836c28ec4f70181f0165ca4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:38:36 -0000 The branch stable/12 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=dfa4fe11d6fe90936836c28ec4f70181f0165ca4 commit dfa4fe11d6fe90936836c28ec4f70181f0165ca4 Author: Glen Barber AuthorDate: 2020-12-31 15:23:36 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:32:52 +0000 copyrights: Happy New Year 2021 Good riddance 2020. Sponsored by: Rubicon Communications, LLC (netgate.com) (cherry picked from commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b) --- COPYRIGHT | 3 +-- sys/sys/copyright.h | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 4a40a9f3c6cf..3cf4fa961551 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,10 +1,9 @@ -# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2020 The FreeBSD Project. +Copyright (c) 1992-2021 The FreeBSD Project. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 55a91c06e048..9bb86f18da22 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,8 +23,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ @@ -36,7 +34,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2020 The FreeBSD Project.\n" + "Copyright (c) 1992-2021 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 15:40:43 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 815084C5610; Thu, 31 Dec 2020 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6C6M2k3Nz4vFJ; Thu, 31 Dec 2020 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 503BF12CD3; Thu, 31 Dec 2020 15:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFeh47076286; Thu, 31 Dec 2020 15:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFehiX076285; Thu, 31 Dec 2020 15:40:43 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:40:43 GMT Message-Id: <202012311540.0BVFehiX076285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 446867bf801a - stable/11 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 446867bf801ae39b9a42df2ba6c9444a0c236d42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:40:43 -0000 The branch stable/11 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=446867bf801ae39b9a42df2ba6c9444a0c236d42 commit 446867bf801ae39b9a42df2ba6c9444a0c236d42 Author: Glen Barber AuthorDate: 2020-12-31 15:23:36 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:40:15 +0000 copyrights: Happy New Year 2021 Good riddance 2020. Sponsored by: Rubicon Communications, LLC (netgate.com) (cherry picked from commit c3e89a30fdc2c985b73f46ab2f414d53945fc00b) --- COPYRIGHT | 3 +-- sys/sys/copyright.h | 10 +++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 4a40a9f3c6cf..3cf4fa961551 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,10 +1,9 @@ -# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2020 The FreeBSD Project. +Copyright (c) 1992-2021 The FreeBSD Project. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 8c33d74c700b..8df68cbc4aec 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,5 +1,11 @@ /*- +<<<<<<< HEAD * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. +======= + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. +>>>>>>> c3e89a30fdc... copyrights: Happy New Year 2021 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -21,8 +27,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ @@ -34,7 +38,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2020 The FreeBSD Project.\n" + "Copyright (c) 1992-2021 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 15:45:23 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 8B06E4C5A4E; Thu, 31 Dec 2020 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6CCl3VP7z3C42; Thu, 31 Dec 2020 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B2D013017; Thu, 31 Dec 2020 15:45:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFjNpS080378; Thu, 31 Dec 2020 15:45:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFjNvE080377; Thu, 31 Dec 2020 15:45:23 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:45:23 GMT Message-Id: <202012311545.0BVFjNvE080377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 320f0e909d00 - stable/12 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 320f0e909d003e23d7712a0c1e83a04f33dde2e0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:45:23 -0000 The branch stable/12 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=320f0e909d003e23d7712a0c1e83a04f33dde2e0 commit 320f0e909d003e23d7712a0c1e83a04f33dde2e0 Author: Glen Barber AuthorDate: 2020-12-31 15:44:52 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:44:52 +0000 copyrights: Happy New Year 2021 Good riddance 2020. (This fixes the previous MFC) Sponsored by: Rubicon Communications, LLC (netgate.com) --- COPYRIGHT | 1 + sys/sys/copyright.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/COPYRIGHT b/COPYRIGHT index 3cf4fa961551..18faf948fbba 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,3 +1,4 @@ +# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 9bb86f18da22..b34d6d20de23 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -23,6 +23,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 15:45:33 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 6C8C44C593F; Thu, 31 Dec 2020 15:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6CCw65Ffz3C58; Thu, 31 Dec 2020 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB05D13018; Thu, 31 Dec 2020 15:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVFjWeL080516; Thu, 31 Dec 2020 15:45:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVFjWV2080515; Thu, 31 Dec 2020 15:45:32 GMT (envelope-from git) Date: Thu, 31 Dec 2020 15:45:32 GMT Message-Id: <202012311545.0BVFjWV2080515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: 057a5704a32a - stable/11 - copyrights: Happy New Year 2021 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/stable/11 X-Git-Reftype: branch X-Git-Commit: 057a5704a32a3495c35ae8d80b64d4ecd2ee6ac0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 15:45:33 -0000 The branch stable/11 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=057a5704a32a3495c35ae8d80b64d4ecd2ee6ac0 commit 057a5704a32a3495c35ae8d80b64d4ecd2ee6ac0 Author: Glen Barber AuthorDate: 2020-12-31 15:44:24 +0000 Commit: Glen Barber CommitDate: 2020-12-31 15:44:24 +0000 copyrights: Happy New Year 2021 Good riddance 2020. (This fixes the previous MFC) Sponsored by: Rubicon Communications, LLC (netgate.com) --- COPYRIGHT | 1 + sys/sys/copyright.h | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/COPYRIGHT b/COPYRIGHT index 3cf4fa961551..18faf948fbba 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,3 +1,4 @@ +# $FreeBSD$ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 The compilation of software known as FreeBSD is distributed under the diff --git a/sys/sys/copyright.h b/sys/sys/copyright.h index 8df68cbc4aec..dfcd2dc013cc 100644 --- a/sys/sys/copyright.h +++ b/sys/sys/copyright.h @@ -1,11 +1,7 @@ /*- -<<<<<<< HEAD - * Copyright (C) 1992-2020 The FreeBSD Project. All rights reserved. -======= * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (C) 1992-2021 The FreeBSD Project. All rights reserved. ->>>>>>> c3e89a30fdc... copyrights: Happy New Year 2021 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -27,6 +23,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 17:05:34 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 E4FE54C86A5; Thu, 31 Dec 2020 17:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6F0G67zNz3HpB; Thu, 31 Dec 2020 17:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6131140AC; Thu, 31 Dec 2020 17:05:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVH5YNo080198; Thu, 31 Dec 2020 17:05:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVH5YNB080196; Thu, 31 Dec 2020 17:05:34 GMT (envelope-from git) Date: Thu, 31 Dec 2020 17:05:34 GMT Message-Id: <202012311705.0BVH5YNB080196@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Stefan Eßer Subject: git: de924aa90ca0 - stable/12 - MFC: Fix calendar -a processing of files included in the user's home directory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: de924aa90ca0d5bd7bbb31125864f0ffca021495 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 17:05:35 -0000 The branch stable/12 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=de924aa90ca0d5bd7bbb31125864f0ffca021495 commit de924aa90ca0d5bd7bbb31125864f0ffca021495 Author: Stefan Eßer AuthorDate: 2020-10-29 08:26:38 +0000 Commit: Stefan Eßer CommitDate: 2020-12-31 17:04:47 +0000 MFC: Fix calendar -a processing of files included in the user's home directory The existing code performed a chdir() into the home directory, but the parser fell back to using the invoking user's home directory as the base directory for the search for an include file. Since use of the -a option is limited to UID==0, the directory searched was typically ~root/.calendar, not the .calendar directory of the user whose file is being processed. PR: 205580 Reported by: greg.bal4@gmail.com (Greg Balfour) MFC after: 3 days (cherry picked from commit 3fa2a149d68d22fa32ba7b6c09773388ac490fd1) The code in -CURRENT is quite different (forks sub-processes tp process the files for each user) but this change should provide the same functionality as the referenced commit to -CURRENT. --- usr.bin/calendar/calendar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index a9e6c19e9a0d..6293d15a4e10 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -221,8 +221,10 @@ main(int argc, char *argv[]) (void)setegid(pw->pw_gid); (void)initgroups(pw->pw_name, pw->pw_gid); (void)seteuid(pw->pw_uid); - if (!chdir(pw->pw_dir)) + if (!chdir(pw->pw_dir)) { + setenv("HOME", pw->pw_dir, 1); cal(); + } (void)seteuid(0); } else From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 19:42:41 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 C20A24CCFF1; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6JTY59FXz3kb5; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A4AF1163BF; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVJgfSk075211; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVJgf3d075210; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git) Date: Thu, 31 Dec 2020 19:42:41 GMT Message-Id: <202012311942.0BVJgf3d075210@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 14c77f30b201 - stable/12 - Don't transmit mbufs that aren't yet ready on TOE sockets. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 14c77f30b201bf76119d59678e72051c093333c2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 19:42:41 -0000 The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=14c77f30b201bf76119d59678e72051c093333c2 commit 14c77f30b201bf76119d59678e72051c093333c2 Author: John Baldwin AuthorDate: 2020-12-03 22:01:13 +0000 Commit: John Baldwin CommitDate: 2020-12-31 18:54:49 +0000 Don't transmit mbufs that aren't yet ready on TOE sockets. This includes mbufs waiting for data from sendfile() I/O requests, or mbufs awaiting encryption for KTLS. Sponsored by: Chelsio Communications (cherry picked from commit 99963f5343a017e934e4d8ea2371a86789a46ff9) --- sys/dev/cxgbe/tom/t4_cpl_io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 8e8c2b8639e6..43861f10b689 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -746,6 +746,8 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) for (m = sndptr; m != NULL; m = m->m_next) { int n; + if ((m->m_flags & M_NOTAVAIL) != 0) + break; if (IS_AIOTX_MBUF(m)) n = sglist_count_vmpages(aiotx_mbuf_pages(m), aiotx_mbuf_pgoff(m), m->m_len); @@ -821,8 +823,9 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) /* nothing to send */ if (plen == 0) { - KASSERT(m == NULL, - ("%s: nothing to send, but m != NULL", __func__)); + KASSERT(m == NULL || (m->m_flags & M_NOTAVAIL) != 0, + ("%s: nothing to send, but m != NULL is ready", + __func__)); break; } @@ -910,7 +913,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) toep->txsd_avail--; t4_l2t_send(sc, wr, toep->l2te); - } while (m != NULL); + } while (m != NULL && (m->m_flags & M_NOTAVAIL) == 0); /* Send a FIN if requested, but only if there's no more data to send */ if (m == NULL && toep->flags & TPF_SEND_FIN) From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 19:42:41 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 B38E74CCDEA; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6JTY4gwTz3kgc; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 93E49162D6; Thu, 31 Dec 2020 19:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVJgfde075194; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVJgfDk075193; Thu, 31 Dec 2020 19:42:41 GMT (envelope-from git) Date: Thu, 31 Dec 2020 19:42:41 GMT Message-Id: <202012311942.0BVJgfDk075193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e36ac668971c - stable/12 - Use the 't' modifier to print a ptrdiff_t. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: e36ac668971c1bdf97e099bda88cb9cae3ea74c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 19:42:41 -0000 The branch stable/12 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e36ac668971c1bdf97e099bda88cb9cae3ea74c9 commit e36ac668971c1bdf97e099bda88cb9cae3ea74c9 Author: John Baldwin AuthorDate: 2020-12-16 00:11:30 +0000 Commit: John Baldwin CommitDate: 2020-12-31 18:54:49 +0000 Use the 't' modifier to print a ptrdiff_t. Obtained from: CheriBSD Sponsored by: DARPA (cherry picked from commit ce8395ecfda2c8e332a2adf9a9432c2e7f35ea81) --- sys/compat/linuxkpi/common/include/linux/printk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index 31802bdd2c99..e6510e9e9834 100644 --- a/sys/compat/linuxkpi/common/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h @@ -68,7 +68,7 @@ print_hex_dump(const char *level, const char *prefix_str, printf("[%p] ", buf); break; case DUMP_PREFIX_OFFSET: - printf("[%p] ", (const char *)((const char *)buf - + printf("[%#tx] ", ((const char *)buf - (const char *)buf_old)); break; default: From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 20:47:20 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 ABF4A4CF1C8; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6Kw84Wqdz3qN0; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8A6AA1708B; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVKlKcY049578; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVKlKjF049577; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git) Date: Thu, 31 Dec 2020 20:47:20 GMT Message-Id: <202012312047.0BVKlKjF049577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 24236af8d5eb - stable/12 - libc: hide alphasort_thunk behind I_AM_SCANDIR_B MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 24236af8d5eb595eaf8c171eca53df23e755c432 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 20:47:20 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=24236af8d5eb595eaf8c171eca53df23e755c432 commit 24236af8d5eb595eaf8c171eca53df23e755c432 Author: Mateusz Guzik AuthorDate: 2020-08-23 11:06:59 +0000 Commit: Ryan Libby CommitDate: 2020-12-31 19:56:33 +0000 libc: hide alphasort_thunk behind I_AM_SCANDIR_B Should unbreak gcc build as reported by tinderbox: lib/libc/gen/scandir.c:59:12: warning: 'alphasort_thunk' declared 'static' but never defined [-Wunused-function] (cherry picked from commit 992bcb37c28ad1a6426df7996f297187ae3d901a) --- lib/libc/gen/scandir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 7e5bcce905fb..2b8d244bcc59 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -56,7 +56,9 @@ void qsort_b(void *, size_t, size_t, void *); #define SELECT(x) select(x) #endif +#ifndef I_AM_SCANDIR_B static int alphasort_thunk(void *thunk, const void *p1, const void *p2); +#endif int #ifdef I_AM_SCANDIR_B From owner-dev-commits-src-branches@freebsd.org Thu Dec 31 20:47:20 2020 Return-Path: Delivered-To: dev-commits-src-branches@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 993F24CF609; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6Kw83w4dz3qMy; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7905516BF5; Thu, 31 Dec 2020 20:47:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BVKlKmw049561; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BVKlKZp049560; Thu, 31 Dec 2020 20:47:20 GMT (envelope-from git) Date: Thu, 31 Dec 2020 20:47:20 GMT Message-Id: <202012312047.0BVKlKZp049560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ryan Libby Subject: git: 939430f23771 - stable/12 - Fix the build of scandir_b with GCC. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 939430f23771bb2bdd85337a58f5ba0757f60782 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2020 20:47:20 -0000 The branch stable/12 has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=939430f23771bb2bdd85337a58f5ba0757f60782 commit 939430f23771bb2bdd85337a58f5ba0757f60782 Author: John Baldwin AuthorDate: 2020-08-31 21:55:25 +0000 Commit: Ryan Libby CommitDate: 2020-12-31 19:56:33 +0000 Fix the build of scandir_b with GCC. Use explicit typedefs for block thunk structures as in r264143. Reviewed by: kib, adrian MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26256 (cherry picked from commit d10af81d2defe43db0db0a7dca3eefb047bd8ddc) --- lib/libc/gen/scandir.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/libc/gen/scandir.c b/lib/libc/gen/scandir.c index 2b8d244bcc59..10cd7633dac1 100644 --- a/lib/libc/gen/scandir.c +++ b/lib/libc/gen/scandir.c @@ -56,15 +56,18 @@ void qsort_b(void *, size_t, size_t, void *); #define SELECT(x) select(x) #endif -#ifndef I_AM_SCANDIR_B +#ifdef I_AM_SCANDIR_B +typedef DECLARE_BLOCK(int, select_block, const struct dirent *); +typedef DECLARE_BLOCK(int, dcomp_block, const struct dirent **, + const struct dirent **); +#else static int alphasort_thunk(void *thunk, const void *p1, const void *p2); #endif int #ifdef I_AM_SCANDIR_B -scandir_b(const char *dirname, struct dirent ***namelist, - DECLARE_BLOCK(int, select, const struct dirent *), - DECLARE_BLOCK(int, dcomp, const struct dirent **, const struct dirent **)) +scandir_b(const char *dirname, struct dirent ***namelist, select_block select, + dcomp_block dcomp) #else scandir(const char *dirname, struct dirent ***namelist, int (*select)(const struct dirent *), int (*dcomp)(const struct dirent **,